From patchwork Mon Jan 14 12:58:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10762325 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 E1B501390 for ; Mon, 14 Jan 2019 12:59:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D27B828837 for ; Mon, 14 Jan 2019 12:59:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C6A4528875; Mon, 14 Jan 2019 12:59:37 +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 52BFA2883C for ; Mon, 14 Jan 2019 12:59:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 063498E0005; Mon, 14 Jan 2019 07:59:36 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id F2BE58E0002; Mon, 14 Jan 2019 07:59:35 -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 DF42C8E0005; Mon, 14 Jan 2019 07:59:35 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by kanga.kvack.org (Postfix) with ESMTP id B19BE8E0002 for ; Mon, 14 Jan 2019 07:59:35 -0500 (EST) Received: by mail-qt1-f198.google.com with SMTP id n95so24333086qte.16 for ; Mon, 14 Jan 2019 04:59:35 -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=sffXrF4Js5th34lnNFzJQ2qZ7FArnPNvu+uVwZIlZxA=; b=mL8XdfGaTlTuEtZQeZw8gOpg+sJe1pLSYGGf9G009FRbnWFjhVpSzMxH0Z3l7Taa2Q Nn+TXAv9kzmVCnjlHBYasK7DCNtofhYLgykRMC3JINbGRB/NNj0A/+NRfb+8hqn8K1+Y GTM7UYqoTGWY0qIET157rP8TL/CNnhvQlcriwK9vMPNFT9hzZYPn4bDyC2FZrazuRQiC LMbha88o9Hlc0amZ47WpIrFusEZm8JN9Okgg2hQ/8fzseHCGyoCZ62GKs93J085J1Anp z7AGUjyEb0+ED1i6sHdwDF/iB+gKsAHOigC8e9EFZUwduFnlBUlDLyukSrjW6uzaw1o1 Lpeg== 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: AJcUukcRP8Tau/Hwv0PZ/D3+tJbTifSQHU5S3eI1dw8nSCdGmqhf+xxH QI4iVwUTSkXouQBx9QVVCxhVVF6eCbMmD/2hzCc8F2C46pfitn8XeVH4j/txxkn8yC1gjC3Dwr7 C+v9azV95y8fbLqvos6sN83PctgPEDEsgS9evRQO6jHWDm+74nIVU+m5o8UDgpjMOWw== X-Received: by 2002:a37:a904:: with SMTP id s4mr23005007qke.237.1547470775503; Mon, 14 Jan 2019 04:59:35 -0800 (PST) X-Google-Smtp-Source: ALg8bN43gSbyw03vMF7MeE4uA/prAPJFrIkZoABxJpxXQgQR8YXatwjHWWymK5fG7bqM3n0yvY2y X-Received: by 2002:a37:a904:: with SMTP id s4mr23004990qke.237.1547470775027; Mon, 14 Jan 2019 04:59:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547470775; cv=none; d=google.com; s=arc-20160816; b=uBIMySOC21/mcIT4yxxwfX1D281ITzMWHnqyEEPBz83W72MxMXnKvIA39LZQeJdu77 pY+LL85jXCTqDgf8Pf54vvrQEHbRRRjL3I7T9atrTdce0ctomlUt3mzfm02FGGw2iXm6 7OvMC1MZi7JztHR1JOrLvMhQ80y6AdNphP/eieJVnBO1Dv0jTsbSscmrRW0QjclKYxy/ S9xnqte8VEx+KDTbycflnhid0ovlrghrRbrfZX8PJZusnsGSbJ7LJndI/KkkVFCzWV0L cA+7Gz5ZzO2qgdQ0MyrJSr3oPDxrWn5lysmWHICUKYAYUOnSPghvHd90V+iv7IY/XYN7 tuSA== 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=sffXrF4Js5th34lnNFzJQ2qZ7FArnPNvu+uVwZIlZxA=; b=1EsiGatWUrNe+3K+egPYn62Kc3gGUQVYcfhc99WzK+YeuOIZ/jKLawuBlrzWp+cRIj jFK/ukvMeGPCHcWIwGG+P8UBmTDylzksjwk7e/6vF5B2zsHzmE+AbYIg4VZfs+IOPZZh 2sFaZMuicWiNkBYNoQK3mj1qFsV7DooA56MSlLpIOppdm3oNpLXUe7fKcRHFTfoo+/jT 7Rtl9UHTMWqtumMKEDxRQWr41wxg4SlUih+Y+JhBeLN2XSiJ2CiowmFCoqFKmmBvzIIs bR81c7e9/8s0nsfKnc6I1ENy7ORfqgr3s/FkynlFjp1HaBuc/wK0Pg47LS+yWVMumLxk 2aIw== 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 c83si6011369qke.5.2019.01.14.04.59.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Jan 2019 04:59:35 -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-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 25DA92D7E2; Mon, 14 Jan 2019 12:59:34 +0000 (UTC) Received: from t460s.redhat.com (unknown [10.36.118.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id A75695D73F; Mon, 14 Jan 2019 12:59:30 +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 , Martin Schwidefsky , Heiko Carstens , Matthew Wilcox , Mike Rapoport , Michal Hocko , Vasily Gorbik , Kees Cook , Souptick Joarder , Andrew Morton , Michal Hocko Subject: [PATCH v2 2/9] s390/vdso: don't clear PG_reserved Date: Mon, 14 Jan 2019 13:58:56 +0100 Message-Id: <20190114125903.24845-3-david@redhat.com> In-Reply-To: <20190114125903.24845-1-david@redhat.com> References: <20190114125903.24845-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 14 Jan 2019 12:59:34 +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. Suggested-by: Martin Schwidefsky Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Matthew Wilcox Cc: Mike Rapoport Cc: Michal Hocko Cc: Vasily Gorbik Cc: Kees Cook Cc: Souptick Joarder Cc: Andrew Morton Cc: Michal Hocko Signed-off-by: David Hildenbrand --- 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; }