The VDSO is part of the kernel image and therefore the struct pages are
marked as reserved during boot.

As we install a special mapping, the actual struct pages will never be
exposed to MM via the page tables. We can therefore leave the pages
marked as reserved.

Suggested-by: Martin Schwidefsky <schwidef...@de.ibm.com>
Cc: Martin Schwidefsky <schwidef...@de.ibm.com>
Cc: Heiko Carstens <heiko.carst...@de.ibm.com>
Cc: Matthew Wilcox <wi...@infradead.org>
Cc: Mike Rapoport <r...@linux.vnet.ibm.com>
Cc: Michal Hocko <mho...@suse.com>
Cc: Vasily Gorbik <g...@linux.ibm.com>
Cc: Kees Cook <keesc...@chromium.org>
Cc: Souptick Joarder <jrdr.li...@gmail.com>
Cc: Andrew Morton <a...@linux-foundation.org>
Cc: Michal Hocko <mho...@kernel.org>
Signed-off-by: David Hildenbrand <da...@redhat.com>
---
 arch/s390/kernel/vdso.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c
index 4ff354887db4..e7920a68a12e 100644
--- a/arch/s390/kernel/vdso.c
+++ b/arch/s390/kernel/vdso.c
@@ -291,7 +291,6 @@ static int __init vdso_init(void)
        BUG_ON(vdso32_pagelist == NULL);
        for (i = 0; i < vdso32_pages - 1; i++) {
                struct page *pg = virt_to_page(vdso32_kbase + i*PAGE_SIZE);
-               ClearPageReserved(pg);
                get_page(pg);
                vdso32_pagelist[i] = pg;
        }
@@ -309,7 +308,6 @@ static int __init vdso_init(void)
        BUG_ON(vdso64_pagelist == NULL);
        for (i = 0; i < vdso64_pages - 1; i++) {
                struct page *pg = virt_to_page(vdso64_kbase + i*PAGE_SIZE);
-               ClearPageReserved(pg);
                get_page(pg);
                vdso64_pagelist[i] = pg;
        }
-- 
2.17.2

Reply via email to