Message ID | 1527434080182145@kroah.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B2327601C7 for <patchwork-linux-mm@patchwork.kernel.org>; Sun, 27 May 2018 15:34:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8FC1428B26 for <patchwork-linux-mm@patchwork.kernel.org>; Sun, 27 May 2018 15:34:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8137428B62; Sun, 27 May 2018 15:34:30 +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,DKIM_SIGNED, DKIM_VALID, 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 B505B28B26 for <patchwork-linux-mm@patchwork.kernel.org>; Sun, 27 May 2018 15:34:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4676F6B0003; Sun, 27 May 2018 11:34:28 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 43C1F6B0006; Sun, 27 May 2018 11:34:28 -0400 (EDT) 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 351316B0007; Sun, 27 May 2018 11:34:28 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f197.google.com (mail-pf0-f197.google.com [209.85.192.197]) by kanga.kvack.org (Postfix) with ESMTP id E79F86B0003 for <linux-mm@kvack.org>; Sun, 27 May 2018 11:34:27 -0400 (EDT) Received: by mail-pf0-f197.google.com with SMTP id e3-v6so5917628pfe.15 for <linux-mm@kvack.org>; Sun, 27 May 2018 08:34:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:subject:to:cc:from:date :message-id:mime-version:content-transfer-encoding; bh=+XzrJdgE0pBwUcPscot8HeKiTljBlbhlvIgsyxn5ePQ=; b=h/MKuCB5kPzIUbyjwM7xxPM2nbXT7LQjdBpjlRPs9iF36du2YIBGZdwleQXoe3KgTB M4BfMMpGtPSRU/2QpwIMUV/gOONHWqyBG2T7bhptyPHgcEeUkLTPC9KspQSY6O0dSjH2 xHmn8OVINkesKOYBl1LbYZZYeGLehwz0jhu9nb0o3dwzPHXSUqkbvdlEAbFhO8Dvv0Xx 5NjrAxYSAkvbvuyLxBQPTdQMc4CsXQkvVovwKtybfLwUYt5ZYKEMpvE9lphGtuXAlzR+ Qm/CcSyTcXRHqhMzC/QkojzNofwbCH3qJBYiZ1GFE6+im52MzYCDW2PEtJ4ZoYoB6BnN dOCA== X-Gm-Message-State: ALKqPwdigFK7r/3ZJvbGv/2vnEoZI8xCB7Y1Dft5TcSmqIB0GUxFw0Ss vDEbckCXgR5QrPMWs8d90u6FDYbwHlWSaqjJMheUOYKvOkagcltAXCI95QZJo7Ud5aKwsItkw+P JnRzASonkF9MQk9HSyqJau1aGv7PxuVmNjsqnAhP3VobX7WUnAzAPg6jb/uVG3LI= X-Received: by 2002:a62:7f91:: with SMTP id a139-v6mr10117226pfd.25.1527435267554; Sun, 27 May 2018 08:34:27 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpHDuzKLB4Qpe9CxQibJNIcCd85/0jChSV3IO0+m9agpbgU4pqMkkmW00cZNpGKe9ZKsmbd X-Received: by 2002:a62:7f91:: with SMTP id a139-v6mr10117178pfd.25.1527435266650; Sun, 27 May 2018 08:34:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527435266; cv=none; d=google.com; s=arc-20160816; b=XUN4uHX7kLqE2HQygu/vpdCxhvyvLZkRbwJyTp+chFBsdsmuXOYyavLIUIw2P/Q1uW hZ66B4XLdGIuZvw97kXuZ6xuhWnSibBCeWoYH4bU0A7MhyeW7/Q632vLQCq+J+m6PNA/ 9myvQIy00ch9WcD/CbrwWwYqLHl7CJfdhAbILYudsbFGO1mz/lTBw4w8tLXSXaDBH3rx DbkpFJ5tcLlJ5MhtsETwtAwr63aWTwwNPqFSSrSkXg7VkebKozBxuCcqP0F8G62dR8zY 8ymRTpylpCcacrO4UhAOvoNg3Bu1WIa8Vrv3PaxwvXbztsjWGAdl6ONuLXjqfGJKKpyv QKrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:from:cc:to :subject:dkim-signature:arc-authentication-results; bh=+XzrJdgE0pBwUcPscot8HeKiTljBlbhlvIgsyxn5ePQ=; b=P/aL7Rs5DEStFNgTGN0+ZGg2zubLzPX60TqPQg2FossSkrhNtcU85F62lI9gFEVM5M knCqymVQBuQe23fhKk5zsiYiPJbIlrbHh9gw90ZTnoje+B54irZIFkYH9VudPUhxOFqs hLGshhug/OmlHOuGTF7gbYCp6XaDJcTdh1CkXU6wEaY1D4uLDbubz6zOqwwsTGHpBss/ 6tWMfsRxOt5KIufJcJqxKmGnDDcWk29C3RKX6ADMaxv9zaoIh1/YrkQA/hoywKCuZbsg QiSKi1UgqJxLFb/gMdu0M5eZa+ROXV4NyTiTPP/9HUz10ftQvfVL8ieJuJLjVu63rh/J Iqqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=R2R/eOXA; spf=pass (google.com: domain of srs0=ri55=io=linuxfoundation.org=gregkh@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=SRS0=rI55=IO=linuxfoundation.org=gregkh@kernel.org Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99]) by mx.google.com with ESMTPS id f8-v6si7290767pgr.35.2018.05.27.08.34.26 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 May 2018 08:34:26 -0700 (PDT) Received-SPF: pass (google.com: domain of srs0=ri55=io=linuxfoundation.org=gregkh@kernel.org designates 198.145.29.99 as permitted sender) client-ip=198.145.29.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=R2R/eOXA; spf=pass (google.com: domain of srs0=ri55=io=linuxfoundation.org=gregkh@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=SRS0=rI55=IO=linuxfoundation.org=gregkh@kernel.org Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF36B208A0; Sun, 27 May 2018 15:34:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527435266; bh=S/i+MvdBPZ/GrOWt2UZ41ZwE21TXe43RvrpTyidOdgI=; h=Subject:To:Cc:From:Date:From; b=R2R/eOXA755TVPDavHNAUuFy44Etkw/6onxWuIHJctv6dC8FaaGGQIHch5UWuD/Ej SI6INRiEymBIcOJ96XUnlaWksgjsgWabmhd9IT76dEnjn9nq+Ck2m5YLZ7CiOMFzpM ZKIJPiaNZqQx4bAARTbEzOoVD8RRqPnFAD6ZVLDk= Subject: Patch "x86/mm: Do not forbid _PAGE_RW before init for __ro_after_init" has been added to the 4.14-stable tree To: 20180406205514.8D898241@viggo.jf.intel.com, aarcange@redhat.com, alexander.levin@microsoft.com, arjan@linux.intel.com, bp@alien8.de, dan.j.williams@intel.com, dave.hansen@linux.intel.com, dwmw2@infradead.org, gregkh@linuxfoundation.org, hughd@google.com, jgross@suse.com, jpoimboe@redhat.com, keescook@chromium.org, linux-mm@kvack.org, luto@kernel.org, mingo@kernel.org, namit@vmware.com, peterz@infradead.org, tglx@linutronix.de, torvalds@linux-foundation.org Cc: <stable-commits@vger.kernel.org> From: <gregkh@linuxfoundation.org> Date: Sun, 27 May 2018 17:14:40 +0200 Message-ID: <1527434080182145@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit X-stable: commit 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: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
--- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -298,9 +298,11 @@ static inline pgprot_t static_protection /* * The .rodata section needs to be read-only. Using the pfn - * catches all aliases. + * catches all aliases. This also includes __ro_after_init, + * so do not enforce until kernel_set_to_readonly is true. */ - if (within(pfn, __pa_symbol(__start_rodata) >> PAGE_SHIFT, + if (kernel_set_to_readonly && + within(pfn, __pa_symbol(__start_rodata) >> PAGE_SHIFT, __pa_symbol(__end_rodata) >> PAGE_SHIFT)) pgprot_val(forbidden) |= _PAGE_RW;