+18
−3
+1
−1
+1
−1
Loading
mainline inclusion from mainline-v6.12-rc7 commit 0fb4a7ad270b3b209e510eb9dc5b07bf02b7edaf category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB7051 CVE: CVE-2024-53056 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0fb4a7ad270b3b209e510eb9dc5b07bf02b7edaf -------------------------------- Refactor the map_deny_write_exec() to not unnecessarily require a VMA parameter but rather to accept VMA flags parameters, which allows us to use this function early in mmap_region() in a subsequent commit. While we're here, we refactor the function to be more readable and add some additional documentation. Link: https://lkml.kernel.org/r/6be8bb59cd7c68006ebb006eb9d8dc27104b1f70.1730224667.git.lorenzo.stoakes@oracle.com Fixes: deb0f656 ("mm/mmap: undo ->mmap() when arch_validate_flags() fails") Signed-off-by:Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Reported-by:
Jann Horn <jannh@google.com> Reviewed-by:
Liam R. Howlett <Liam.Howlett@oracle.com> Reviewed-by:
Vlastimil Babka <vbabka@suse.cz> Reviewed-by:
Jann Horn <jannh@google.com> Cc: Andreas Larsson <andreas@gaisler.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: David S. Miller <davem@davemloft.net> Cc: Helge Deller <deller@gmx.de> Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mark Brown <broonie@kernel.org> Cc: Peter Xu <peterx@redhat.com> Cc: Will Deacon <will@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Conflicts: mm/vma.h [Ma Wupeng: comment conflict, no real function involved] Signed-off-by:
Ma Wupeng <mawupeng1@huawei.com>