lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <20190423151712.79391-1-ldufour@linux.ibm.com> Date: Tue, 23 Apr 2019 17:17:12 +0200 From: Laurent Dufour <ldufour@...ux.ibm.com> To: mpe@...erman.id.au Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de> Subject: [PATCH] powerpc/mm: Comment arch_unmap() During a different patch review, the check in arch_munmap() was found spucious due the lake of explanation. Adding a comment to clarify the test. Suggested-by: Thomas Gleixner <tglx@...utronix.de> Cc: Michael Ellerman <mpe@...erman.id.au> Signed-off-by: Laurent Dufour <ldufour@...ux.ibm.com> --- arch/powerpc/include/asm/mmu_context.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h index 6ee8195a2ffb..638f481b3c9f 100644 --- a/arch/powerpc/include/asm/mmu_context.h +++ b/arch/powerpc/include/asm/mmu_context.h @@ -240,6 +240,17 @@ static inline void arch_unmap(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long start, unsigned long end) { + /* + * There are 2 assumptions here: + * 1. the VDSO is one page size (guaranteed by vdso_data_store) + * 2. 'start' and 'end' are page aligned (guaranteed by the caller) + * The test is wrote in a way to handle unmap operation surrounding the + * VDSO area like: + * | VDSO | + * ^ start ^ end + * The test also covers the munmap() operation done to the exact VDSO's + * boundaries. + */ if (start <= mm->context.vdso_base && mm->context.vdso_base < end) mm->context.vdso_base = 0; } -- 2.21.0
Powered by blists - more mailing lists