linux/fs/proc
Peter Xu 4980e837ca mm/pagemap: fix wr-protect even if PM_SCAN_WP_MATCHING not set
The new pagemap ioctl contains a fast path for wr-protections without
looking into category masks.  It forgets to check PM_SCAN_WP_MATCHING
before applying the wr-protections.  It can cause, e.g., pte markers
installed on archs that do not even support uffd wr-protect.

WARNING: CPU: 0 PID: 5059 at mm/memory.c:1520 zap_pte_range mm/memory.c:1520 [inline]

Link: https://lkml.kernel.org/r/20231116201547.536857-3-peterx@redhat.com
Fixes: 12f6b01a0b ("fs/proc/task_mmu: add fast paths to get/clear PAGE_IS_WRITTEN flag")
Signed-off-by: Peter Xu <peterx@redhat.com>
Reported-by: syzbot+7ca4b2719dc742b8d0a4@syzkaller.appspotmail.com
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Andrei Vagin <avagin@gmail.com>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-12-06 16:12:45 -08:00
..
array.c fs/proc: do_task_stat: use __for_each_thread() 2023-10-04 10:41:57 -07:00
base.c As usual, lots of singleton and doubleton patches all over the tree and 2023-11-02 20:53:31 -10:00
bootconfig.c fs/proc: Add boot loader arguments as comment to /proc/bootconfig 2023-10-07 10:45:56 +09:00
cmdline.c proc: mark /proc/cmdline as permanent 2023-02-02 22:50:02 -08:00
consoles.c proc: consoles: use console_list_lock for list iteration 2022-12-02 11:25:02 +01:00
cpuinfo.c x86/aperfmperf: Replace aperfmperf_get_khz() 2022-04-27 20:22:19 +02:00
devices.c proc: mark more files as permanent 2022-10-03 14:21:45 -07:00
fd.c file: convert to SLAB_TYPESAFE_BY_RCU 2023-10-19 11:02:48 +02:00
fd.h fs: port ->permission() to pass mnt_idmap 2023-01-19 09:24:28 +01:00
generic.c fs: pass the request_mask to generic_fillattr 2023-08-09 08:56:36 +02:00
inode.c As usual, lots of singleton and doubleton patches all over the tree and 2023-11-02 20:53:31 -10:00
internal.h proc: nommu: fix empty /proc/<pid>/maps 2023-09-19 13:21:34 -07:00
interrupts.c
Kconfig proc: make config PROC_CHILDREN depend on PROC_FS 2022-10-03 14:21:43 -07:00
kcore.c proc/kcore: do not try to access unaccepted memory 2023-10-04 10:32:22 -07:00
kmsg.c printk changes for 6.1 2022-10-10 11:24:19 -07:00
loadavg.c proc: mark more files as permanent 2022-10-03 14:21:45 -07:00
Makefile proc: bootconfig: Add /proc/bootconfig to show boot config list 2020-01-13 13:19:39 -05:00
meminfo.c mm: memtest: convert to memtest_report_meminfo() 2023-08-21 13:37:47 -07:00
namespaces.c Merge branch 'work.openat2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-01-29 11:20:24 -08:00
nommu.c fs: create helper file_user_path() for user displayed mapped file path 2023-10-19 11:03:15 +02:00
page.c mm, pagemap: remove SLOB and SLQB from comments and documentation 2023-03-29 10:32:11 +02:00
proc_net.c v6.6-fs.proc.uapi 2023-08-28 11:43:19 -07:00
proc_sysctl.c sysctl-6.7-rc1 2023-11-01 20:51:41 -10:00
proc_tty.c proc: delete unused <linux/uaccess.h> includes 2022-07-17 17:31:39 -07:00
root.c fs: super: dynamically allocate the s_shrink 2023-10-04 10:32:26 -07:00
self.c proc: convert to new timestamp accessors 2023-10-18 14:08:26 +02:00
softirqs.c proc: mark more files as permanent 2022-10-03 14:21:45 -07:00
stat.c proc/stat: remove arch_idle_time() 2023-04-18 16:39:33 -07:00
task_mmu.c mm/pagemap: fix wr-protect even if PM_SCAN_WP_MATCHING not set 2023-12-06 16:12:45 -08:00
task_nommu.c vfs-6.7.misc 2023-10-30 09:14:19 -10:00
thread_self.c proc: convert to new timestamp accessors 2023-10-18 14:08:26 +02:00
uptime.c proc: mark more files as permanent 2022-10-03 14:21:45 -07:00
util.c
version.c proc: mark more files as permanent 2022-10-03 14:21:45 -07:00
vmcore.c proc/vmcore: fix signedness bug in read_from_oldmem() 2023-07-27 13:07:05 -07:00