linux/arch
Barry Song 6434e69814 mm: arm64: fix the out-of-bounds issue in contpte_clear_young_dirty_ptes
We are passing a huge nr to __clear_young_dirty_ptes() right now.  While
we should pass the number of pages, we are actually passing CONT_PTE_SIZE.
This is causing lots of crashes of MADV_FREE, panic oops could vary
everytime.

Link: https://lkml.kernel.org/r/20240524005444.135417-1-21cnbao@gmail.com
Fixes: 89e86854fb ("mm/arm64: override clear_young_dirty_ptes() batch helper")
Signed-off-by: Barry Song <v-songbaohua@oppo.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Acked-by: Lance Yang <ioworker0@gmail.com>
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Chris Li <chrisl@kernel.org>
Cc: Barry Song <21cnbao@gmail.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Jeff Xie <xiehuan09@gmail.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Yin Fengwei <fengwei.yin@intel.com>
Cc: Zach O'Keefe <zokeefe@google.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-06-05 19:19:24 -07:00
..
alpha mseal: wire up mseal syscall 2024-05-23 19:40:26 -07:00
arc asm-generic cleanups for 6.10 2024-05-20 15:18:34 -07:00
arm mseal: wire up mseal syscall 2024-05-23 19:40:26 -07:00
arm64 mm: arm64: fix the out-of-bounds issue in contpte_clear_young_dirty_ptes 2024-06-05 19:19:24 -07:00
csky The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
hexagon hexagon: vmlinux.lds.S: handle attributes section 2024-03-26 11:07:23 -07:00
loongarch - A series ("kbuild: enable more warnings by default") from Arnd 2024-05-22 18:59:29 -07:00
m68k mseal: wire up mseal syscall 2024-05-23 19:40:26 -07:00
microblaze mseal: wire up mseal syscall 2024-05-23 19:40:26 -07:00
mips mseal: wire up mseal syscall 2024-05-23 19:40:26 -07:00
nios2 Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
openrisc openrisc: Move FPU state out of pt_regs 2024-04-15 15:20:39 +01:00
parisc mseal: wire up mseal syscall 2024-05-23 19:40:26 -07:00
powerpc Jeff Xu's implementation of the mseal() syscall. 2024-05-24 12:47:28 -07:00
riscv RISC-V Patches for the 6.10 Merge Window, Part 2 2024-05-24 10:46:35 -07:00
s390 mseal: wire up mseal syscall 2024-05-23 19:40:26 -07:00
sh mseal: wire up mseal syscall 2024-05-23 19:40:26 -07:00
sparc Jeff Xu's implementation of the mseal() syscall. 2024-05-24 12:47:28 -07:00
um This pull request contains the following changes for UML: 2024-05-25 13:17:48 -07:00
x86 Misc fixes: 2024-05-25 14:48:40 -07:00
xtensa mseal: wire up mseal syscall 2024-05-23 19:40:26 -07:00
.gitignore
Kconfig arch: add ARCH_HAS_KERNEL_FPU_SUPPORT 2024-05-19 14:36:17 -07:00