From patchwork Wed Dec 5 12:28:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10714011 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D7D417D5 for ; Wed, 5 Dec 2018 12:30:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C8D52CC55 for ; Wed, 5 Dec 2018 12:30:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 70DA42CE94; Wed, 5 Dec 2018 12:30:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4C052CC55 for ; Wed, 5 Dec 2018 12:30:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6B9486B7452; Wed, 5 Dec 2018 07:30:08 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6670D6B7453; Wed, 5 Dec 2018 07:30:08 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 57F486B7454; Wed, 5 Dec 2018 07:30:08 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by kanga.kvack.org (Postfix) with ESMTP id 2B7606B7452 for ; Wed, 5 Dec 2018 07:30:08 -0500 (EST) Received: by mail-qk1-f200.google.com with SMTP id h68so19975903qke.3 for ; Wed, 05 Dec 2018 04:30:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=AHOZQxBkJ1h5ptlXCEr+F06XJiW9l91fFbVwclEPXpI=; b=XanKqjcsIJWTNGqwhR9qIw4sa//Jub+lfjyJtb7q6HkQeCcCoTpvbpyE/niwuP8AGr eQRyef5FTPO9maeFCJa0TKGLGWEttWDPpNM7YgzW3u1NNC8+ucmTGEUjG/2ilYbwu41F ll1LbPzn2+ImuYu1iudBhhbqCFRegz2+HYMGGNxZh++hnjUhP28yN4qRTWCAb/55VCZs 9oG3bsVkP0C0siBDkHc4ZhrYXdV1kcgcFuHAS7CGo9N04Pcx0MRs2VFUzoHDz2O4HCeW ktzNBhwsIkmLKiId1f08PZOweU4g3QO3dHS2MwTuk0tVj9j8uxUpUbTSqt8z3D8PoL5A FrQQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: AA+aEWbb8HENQc4A6h+YqVmxVVRNH+nXmklRhorI21Fbtg+LJIvYNGWB vjFOc9VIYOOfGSx82miTT2bXiJE1ui+g1GBMrd82Pf0UHIyG6qhFNuauVmWrcf3pwaQTm0cbvzB FnscHMDXuXUGg01/3A0P0ZI9myp1qspkAxMyl38Aa2RRDE/2MQ5IZft7upD9LMOtY+g== X-Received: by 2002:a0c:884d:: with SMTP id 13mr23646182qvm.170.1544013007933; Wed, 05 Dec 2018 04:30:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/XJqvk2ahgoQVaDH6QV71ZghqHehqSENAhb/0yfcd1vfhaddsneLe+SNj/cvkdwL8ZWvPCu X-Received: by 2002:a0c:884d:: with SMTP id 13mr23646131qvm.170.1544013007195; Wed, 05 Dec 2018 04:30:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544013007; cv=none; d=google.com; s=arc-20160816; b=KYOhN2kcZ5XaWJ1C+NYRxleH2nij+/xAlXi2cxK5N4aXQuC38wZywhBXbXC+avxd2/ I7dMoMxGClM7VFPtIO7RPftA25P17Yknqnc7Pu877JrkA0pDWQti/yqHNOvjfhNimUXQ OKtGxo1zo63FsnTG/iprqB29Iox+dpSCbs4Sigzhw2HEk7bkhDUSdUzt0aM15PZWp7Dy TCwW6rg7GwHJq575pq5IWU7VMP/DiZhiy/M8VQLvn6Xs8h2sXvvMUqqHrTjiAkd0nTi8 lu2uIWeQCJGtaGE17FTnF5Q0TFXvxpQT9btA86XxVhXFesjfTDV5K66AaPSTHW7zBX6x qvuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=AHOZQxBkJ1h5ptlXCEr+F06XJiW9l91fFbVwclEPXpI=; b=MO0guGuxASw2O7BRaXzDjhjqwTAOJMT0AdWWJlACzM5EmdxJZwCXj3saLGlDFvDku1 vbXKwFKGO8f1t0dLQWh/+io6txlaPLeY4Zw5CNyxBEMCcD9JeLoWUwPe/IymQ6yrfV6F KI2b1WdpE/Nb6hfQ9qVoXAFjgBMiIviUQkNNjZw1AlfO2i8PEzVAYR0haiCMtj8MyQZx tICS/VCLClLRBtd2vZz5T+YjN9PDx/fkRnC06yfIuDPiY8S4KmnpyWWny+qNpWjP3Af5 B9HZKr16uquRKLlW3WH7PLX30lA3CX+eKSjdx7ugVHOlUAPmdH3y7oKUVn//zLOOlVdi xYlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id f188si8213803qkb.226.2018.12.05.04.30.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 04:30:07 -0800 (PST) Received-SPF: pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E3F19227D7; Wed, 5 Dec 2018 12:30:05 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-65.ams2.redhat.com [10.36.117.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 82EBA842AD; Wed, 5 Dec 2018 12:30:02 +0000 (UTC) From: David Hildenbrand To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-mediatek@lists.infradead.org, David Hildenbrand , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Christophe Leroy , Kees Cook , Andrew Morton , Michal Hocko , Matthew Wilcox Subject: [PATCH RFC 3/7] powerpc/vdso: don't clear PG_reserved Date: Wed, 5 Dec 2018 13:28:47 +0100 Message-Id: <20181205122851.5891-4-david@redhat.com> In-Reply-To: <20181205122851.5891-1-david@redhat.com> References: <20181205122851.5891-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 05 Dec 2018 12:30:06 +0000 (UTC) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Christophe Leroy Cc: Kees Cook Cc: Andrew Morton Cc: Michal Hocko Cc: Matthew Wilcox Signed-off-by: David Hildenbrand --- arch/powerpc/kernel/vdso.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index 65b3bdb99f0b..d59dc2e9a695 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c @@ -795,7 +795,6 @@ static int __init vdso_init(void) BUG_ON(vdso32_pagelist == NULL); for (i = 0; i < vdso32_pages; i++) { struct page *pg = virt_to_page(vdso32_kbase + i*PAGE_SIZE); - ClearPageReserved(pg); get_page(pg); vdso32_pagelist[i] = pg; } @@ -809,7 +808,6 @@ static int __init vdso_init(void) BUG_ON(vdso64_pagelist == NULL); for (i = 0; i < vdso64_pages; i++) { struct page *pg = virt_to_page(vdso64_kbase + i*PAGE_SIZE); - ClearPageReserved(pg); get_page(pg); vdso64_pagelist[i] = pg; }