Message ID | 1525218559212224@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 7E378601C3 for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 1 May 2018 23:55:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CA1228D1E for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 1 May 2018 23:55:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5ED5C28D3B; Tue, 1 May 2018 23:55:34 +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 A5BC328D1E for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 1 May 2018 23:55:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C0F696B0003; Tue, 1 May 2018 19:55:31 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BBE626B0006; Tue, 1 May 2018 19:55:31 -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 AADDA6B0007; Tue, 1 May 2018 19:55:31 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg0-f72.google.com (mail-pg0-f72.google.com [74.125.83.72]) by kanga.kvack.org (Postfix) with ESMTP id 673536B0003 for <linux-mm@kvack.org>; Tue, 1 May 2018 19:55:31 -0400 (EDT) Received: by mail-pg0-f72.google.com with SMTP id q7-v6so1973441pgt.11 for <linux-mm@kvack.org>; Tue, 01 May 2018 16:55:31 -0700 (PDT) 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:subject:to:cc :from:date:message-id:mime-version:content-transfer-encoding; bh=yz62iuTFWtc7bDVX96s835YI+s8JXSz65GjYiO8jJDk=; b=cGqUUiFiHNfMYOD/hiCeNXSQxcUotq8ICnh2Lq5mhR9y/MS217HnLdVXI3mgBohWYP qvHzAEfKYmzdpbjwOL/o1vFcgifoXfq/cd2hqRZpn1kUlMG6y/GvOY55b2Shlvo+ymG3 eDJ0meE68q0SSo6pvmk+MRfzj7GCsUDYw4PCPm5O3H9qSmX8G6LMjQN/61Rdb9j2CAEA YZkqWgCsQpQUMnWZHwdEtFjIPsI4VWjIgC+/BaFV/XTTJ/zCDYQXO/UjI4ieYMpwASl6 YTfzAl6/CV2fo2mp+m6Nbb8RFH9G/+N5T3ZNkyplwVDeDUY+HARkvFWRoG+AYPXKJ8Ef Vjqw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of srs0=xkju=hu=linuxfoundation.org=gregkh@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=SRS0=xkJU=HU=linuxfoundation.org=gregkh@kernel.org X-Gm-Message-State: ALQs6tAdkJy7TcFnp4YC5NYEwofjni+EYiejnFKjs7UNHrtgVDq8BYRp DG8wncPhJ5wxkiGoHzjKiLUMh25DVMvRm5dPSovpLZRJZRb0/1quleR3Y0nqfL1YJmhmmXKvwFU zE4mc8eLhYo0gR/ISK2iDFj6xPtwMjlPIDOp+IXcDDfb0AuKOLAxca19G4j+qsZE= X-Received: by 2002:a17:902:1e3:: with SMTP id b90-v6mr17525825plb.273.1525218931044; Tue, 01 May 2018 16:55:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpZ2Y/3QKbTz6pw4oIwNi6yW94ClUTnATpxI9CxsVI7DrnKIsQFdktzaF08jTUceMFtTNrY X-Received: by 2002:a17:902:1e3:: with SMTP id b90-v6mr17525795plb.273.1525218930066; Tue, 01 May 2018 16:55:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525218930; cv=none; d=google.com; s=arc-20160816; b=LVMpa8nYcoAdaSIiTzvCuPw1ZU7GIRYRJBrcwsqRJPSKCshGqQhvhSjDeNa65Z7sy/ +IWv7PMUgCemLZgQViJKTj7d83vNLPW9D2VnArPklV49d0W7vr4XgQCcixQOl7wkAOlU yJYn5iseDJb7uwoVvtGYUMyHEt6MiRknc//ACMYZ8iKW5ZaqRlWA7Q3fwo74W2mQkz3a 3MbJ1Kro1sMyC5TSrXuHre6BYmyLuWqBMF41wN8HmKx5eUnYANPV3DrLIRf9DF14KI/Y soBBFPLV/jbpzJI0UTPI72iK7tJktVW5UNnO+N6mrWA3H0TwkkxYrGHcFVfgmO7ER/rJ D3Ug== 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:arc-authentication-results; bh=yz62iuTFWtc7bDVX96s835YI+s8JXSz65GjYiO8jJDk=; b=HbLOsTGeeBzvzH28uJK3mjW6tu850lJJW75raC7ueHDiZHw/nHNmVUmDEIvTeGGVJX +tqNv0kVAcCWz7hkX4eyXNzG/CfMNWPUhSdvqmT6RznaPbrnsXKXVVEO5+hgWwXVedmX GdZ+nKZA0sfZIAyj0wjIFp8kk84eVRx2WUBU43M/NXur000GJfQJw1nRuDuKANLj+YqW l6/jyPSsdod8lueIfWekS0R9HDEfxujM08gW3NckLMweMBEyyNliD2hDDea/14rHmGNx 1Mq0dTgDwusuE3gzp0zNxj+xPLGGPrS9pwfkwi+CyXV3mneFkehzrGbZ2JKk6iCNWCxI 1yPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of srs0=xkju=hu=linuxfoundation.org=gregkh@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=SRS0=xkJU=HU=linuxfoundation.org=gregkh@kernel.org Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99]) by mx.google.com with ESMTPS id p3si10017406pff.356.2018.05.01.16.55.29 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 May 2018 16:55:29 -0700 (PDT) Received-SPF: pass (google.com: domain of srs0=xkju=hu=linuxfoundation.org=gregkh@kernel.org designates 198.145.29.99 as permitted sender) client-ip=198.145.29.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of srs0=xkju=hu=linuxfoundation.org=gregkh@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=SRS0=xkJU=HU=linuxfoundation.org=gregkh@kernel.org Received: from localhost (unknown [104.132.1.102]) (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 EC8E42376B; Tue, 1 May 2018 23:55:28 +0000 (UTC) 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: Tue, 01 May 2018 16:49:19 -0700 Message-ID: <1525218559212224@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;