tmp_suning_uos_patched/fs/proc
Jens Axboe 13fb0e1ecf proc: don't allow async path resolution of /proc/thread-self components
commit 0d4370cfe36b7f1719123b621a4ec4d9c7a25f89 upstream.

If this is attempted by an io-wq kthread, then return -EOPNOTSUPP as we
don't currently support that. Once we can get task_pid_ptr() doing the
right thing, then this can go away again.

Use PF_IO_WORKER for this to speciically target the io_uring workers.
Modify the /proc/self/ check to use PF_IO_WORKER as well.

Cc: stable@vger.kernel.org
Fixes: 8d4c3e76e3 ("proc: don't allow async path resolution of /proc/self components")
Reported-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-04 11:38:42 +01:00
..
array.c
base.c exec: Transform exec_update_mutex into a rw_semaphore 2021-01-09 13:46:24 +01:00
bootconfig.c
cmdline.c
consoles.c
cpuinfo.c proc/cpuinfo: switch to ->read_iter 2020-11-06 10:05:18 -08:00
devices.c
fd.c
fd.h
generic.c proc: fix lookup in /proc/net subdirectories after setns(2) 2020-12-30 11:53:56 +01:00
inode.c proc: wire up generic_file_splice_read for iter ops 2020-11-06 10:05:18 -08:00
internal.h proc: fix lookup in /proc/net subdirectories after setns(2) 2020-12-30 11:53:56 +01:00
interrupts.c
Kconfig
kcore.c
kmsg.c
loadavg.c
Makefile
meminfo.c proc/meminfo: avoid open coded reading of vm_committed_as 2020-08-07 11:33:26 -07:00
namespaces.c
nommu.c
page.c mm: Add PG_arch_2 page flag 2020-09-04 12:46:06 +01:00
proc_net.c proc: fix lookup in /proc/net subdirectories after setns(2) 2020-12-30 11:53:56 +01:00
proc_sysctl.c proc: use kvzalloc for our kernel buffer 2021-03-04 11:38:21 +01:00
proc_tty.c
root.c
self.c proc: don't allow async path resolution of /proc/thread-self components 2021-03-04 11:38:42 +01:00
softirqs.c
stat.c proc/stat: switch to ->read_iter 2020-11-06 10:05:18 -08:00
task_mmu.c mm: proc: Invalidate TLB after clearing soft-dirty page state 2021-03-04 11:37:45 +01:00
task_nommu.c
thread_self.c proc: don't allow async path resolution of /proc/thread-self components 2021-03-04 11:38:42 +01:00
uptime.c
util.c
version.c
vmcore.c