Received: by 10.213.65.68 with SMTP id h4csp304541imn; Tue, 20 Mar 2018 04:07:56 -0700 (PDT) X-Google-Smtp-Source: AG47ELvbQAGlImCG9CYbGBM3wVMyMID1wKhGIxgOsPcglqBlBLSaFpbeD4yXWwKNxE9WyETC6mIA X-Received: by 10.99.149.15 with SMTP id p15mr11877512pgd.154.1521544076362; Tue, 20 Mar 2018 04:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521544076; cv=none; d=google.com; s=arc-20160816; b=O0tM8Hy+FG65+lzLYm3It4VAVb3gHUdrc9JkC6S0lb1Q6OZFrDB662pQnrjDhEH/gK JpsgGyDYd0/9BqY7MedjSDnFgHad4nZ3Vy1sqTSqgwpIWxs+xStSFbEEOljl8P50ymLD OLqF58MWdKVUPLOXw9OCJ2QKvuEqAYD9DbG+L1QzM6hG2mQ2O97MjKbq++TRdxr2ojGX Gf+Q4KaERgbZ3hCYV4ncEb0dt8R2vzJlp6Hl+xfoW9/Rt0NJhYYueUalk8hIMZSBzFsg yPfRep718bE5muWxFZrMJggWyBddtx2sfurkzVTtR9IgQb3xCNTWzg/sYZa6nrwrCSOZ sMRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=91x5VALAWc4UpFJcvPAvUcetjiNmkc+RQpPEVwZ5rqc=; b=QidTrTejq2/IyVOYe46dNsHt1EHcaP3UmjKKy5Hh2FeTem/vDeF+oJIF4rC0YlVgUS c1KooRxO6XUMokFNdBQdH7jjZ7Ww+0o9nuFj4amAv+/gN+PVrXMo9XpMRFCGX5lzclXm Fzq0z8IbiHHv5RCF7Hvb64w57UcTRVddxWZcS/Irbp1A6NASn2C8mG0eha+yJUvM6pCg p6qN8kvk/OB5Q/yI4q4m2WWst78cGMxidJoVQ4rOEZRTSxfqROiydlgEtkrL2faq2qnD Cmnv2UxtNRDSe0U+P+55chot1/VvxhQ2b15//dThUTk1KIEu3WBJI8nnBNA8fApA1o4Z JdIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11-v6si1393470pls.58.2018.03.20.04.07.41; Tue, 20 Mar 2018 04:07:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752994AbeCTLGK (ORCPT + 99 others); Tue, 20 Mar 2018 07:06:10 -0400 Received: from terminus.zytor.com ([198.137.202.136]:60461 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752908AbeCTLFd (ORCPT ); Tue, 20 Mar 2018 07:05:33 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w2KB5P6I011687; Tue, 20 Mar 2018 04:05:25 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w2KB5PX4011681; Tue, 20 Mar 2018 04:05:25 -0700 Date: Tue, 20 Mar 2018 04:05:25 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Boris Ostrovsky Message-ID: Cc: tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, luto@kernel.org, hpa@zytor.com, jgross@suse.com, boris.ostrovsky@oracle.com Reply-To: mingo@kernel.org, tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org, luto@kernel.org, jgross@suse.com, boris.ostrovsky@oracle.com In-Reply-To: <20180319143154.3742-1-boris.ostrovsky@oracle.com> References: <20180319143154.3742-1-boris.ostrovsky@oracle.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/pti] x86/vsyscall/64: Use proper accessor to update P4D entry Git-Commit-ID: 31ad7f8e7dc94d3b85ccf9b6141ce6dfd35a1781 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 31ad7f8e7dc94d3b85ccf9b6141ce6dfd35a1781 Gitweb: https://git.kernel.org/tip/31ad7f8e7dc94d3b85ccf9b6141ce6dfd35a1781 Author: Boris Ostrovsky AuthorDate: Mon, 19 Mar 2018 10:31:54 -0400 Committer: Ingo Molnar CommitDate: Tue, 20 Mar 2018 12:00:53 +0100 x86/vsyscall/64: Use proper accessor to update P4D entry Writing to it directly does not work for Xen PV guests. Fixes: 49275fef986a ("x86/vsyscall/64: Explicitly set _PAGE_USER in the pagetable hierarchy") Signed-off-by: Boris Ostrovsky Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Acked-by: Andy Lutomirski Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180319143154.3742-1-boris.ostrovsky@oracle.com Signed-off-by: Ingo Molnar --- arch/x86/entry/vsyscall/vsyscall_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/entry/vsyscall/vsyscall_64.c b/arch/x86/entry/vsyscall/vsyscall_64.c index 8560ef68a9d6..317be365bce3 100644 --- a/arch/x86/entry/vsyscall/vsyscall_64.c +++ b/arch/x86/entry/vsyscall/vsyscall_64.c @@ -347,7 +347,7 @@ void __init set_vsyscall_pgtable_user_bits(pgd_t *root) set_pgd(pgd, __pgd(pgd_val(*pgd) | _PAGE_USER)); p4d = p4d_offset(pgd, VSYSCALL_ADDR); #if CONFIG_PGTABLE_LEVELS >= 5 - p4d->p4d |= _PAGE_USER; + set_p4d(p4d, __p4d(p4d_val(*p4d) | _PAGE_USER)); #endif pud = pud_offset(p4d, VSYSCALL_ADDR); set_pud(pud, __pud(pud_val(*pud) | _PAGE_USER));