Received: by 10.213.65.68 with SMTP id h4csp209664imn; Tue, 20 Mar 2018 01:11:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELvB7eoryQiVkI0vurVeTGfFBOEWp+z3OetTEwVkpRgQoitZYryIBuXe4SgJE+wfmXjP7OOk X-Received: by 2002:a17:902:8d92:: with SMTP id v18-v6mr15528839plo.21.1521533498812; Tue, 20 Mar 2018 01:11:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521533498; cv=none; d=google.com; s=arc-20160816; b=nqik8Gddfvfe8T1eEyPjNm9tEGLX7PH5eWTeWH4jo+QUUlMrX17+OzX9mbQN05JrGo 2cjh3IGVdMND7RQULN+c1eRRqkbqVaJXHTj0sihMu9Jd55ap0xXb7M2gu3BybBjjTBSB V9lkziIlVlP0ifXX9cPj3spOzz4l0eY0q/hBF0sQtlAtmdVBbx4RcW23yjitjiPFyxgM pTjBJDMXu6fVkPT3brm2BCZ1VVmjz+ytCIZgPbSOLBq0f/lgReeJoeSeCFm1qnZvFokt CAyGcJbiETczl99jdB1jGfblKW4m5dvDgs2nJfoQYDUOyf6bNxB+eQjexDhrVn9UjIZI nvjQ== 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=aqzGC+LnBS4ob6IXepu3s+i121iVVvH2NaSM8bhmPvo=; b=dy3z0BCP+GE4tf4CO3Mm/TURmcnvbUl4JuuN0Jny8r0529gXOp2s3S7VnjKP8hY5ko jh/owi7A0z5aUbRFeLHWswsYcIAiYJRBSh+iDADqyNQh0PU4Lge2pGJvbO9nEwGb+3If hmmao1gAkINr3YBoO7WeOl/a7I1u3Mmls5J2avGYa0VAG+OjAL/sl0mHU94IGCFBzsov rYN/ekOcuSNOH2hNjBln0vBEv+AxfOVGR30FedgTPfoq9FDga7f6N5VBD6qPxS/LguFY sN87GFeAmWReUaT+XTt2EdTyNSbsjUYzYD8OjtWECqonopxtLt88uXHlfjggtanU/qTk 4RKw== 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 97-v6si1135261pld.142.2018.03.20.01.11.24; Tue, 20 Mar 2018 01:11:38 -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 S1752152AbeCTIKI (ORCPT + 99 others); Tue, 20 Mar 2018 04:10:08 -0400 Received: from terminus.zytor.com ([198.137.202.136]:37917 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751712AbeCTIKF (ORCPT ); Tue, 20 Mar 2018 04:10:05 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w2K89p5H024579; Tue, 20 Mar 2018 01:09:51 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w2K89pgF024576; Tue, 20 Mar 2018 01:09:51 -0700 Date: Tue, 20 Mar 2018 01:09:51 -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: linux-kernel@vger.kernel.org, jgross@suse.com, mingo@kernel.org, tglx@linutronix.de, boris.ostrovsky@oracle.com, luto@kernel.org, hpa@zytor.com Reply-To: tglx@linutronix.de, boris.ostrovsky@oracle.com, hpa@zytor.com, luto@kernel.org, mingo@kernel.org, jgross@suse.com, linux-kernel@vger.kernel.org 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: f9ee6990bd505ecefa014f5e699b3c4d25860d80 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: f9ee6990bd505ecefa014f5e699b3c4d25860d80 Gitweb: https://git.kernel.org/tip/f9ee6990bd505ecefa014f5e699b3c4d25860d80 Author: Boris Ostrovsky AuthorDate: Mon, 19 Mar 2018 10:31:54 -0400 Committer: Thomas Gleixner CommitDate: Tue, 20 Mar 2018 09:04:51 +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 --- 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));