Received: by 10.213.65.68 with SMTP id h4csp849694imn; Tue, 27 Mar 2018 09:55:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx49asNGhaggqe75DveU98RN5wc0JidVhdJVNc6SqX9nS0AtwiXdrP2aK0e9jn+trMS8Ok4m1 X-Received: by 10.101.69.73 with SMTP id x9mr87298pgr.50.1522169730976; Tue, 27 Mar 2018 09:55:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522169730; cv=none; d=google.com; s=arc-20160816; b=ZpaQf7qAtRFyiqQvRg0G713Bjhl+rGYie+rB5BI1iTBZMl2EelI3bUoXxpotsEUu37 xxZ94HDDeUEV9qu0GMHAsGRBpyhkjMf4embLSBWIg5ZI8vx6iUIl7kgpz46mDh/ekcDI yn3trY5HP/vfwXV0if1sXFNPy6XyNx1Gro3UaVnMAUcoxKxUzsQJgqCAbnW/WnBPzo4g y5b4BGcBIwRDDNlZ4syOrkGv8cdSiA/LKKitlOQXYjPT63ziJjYPU1MsZI0C3sfcfhg3 jKJcqsRT+zVgGrsShPzhDVpWKBwLctjsZpeP3lyJiMENXj75k+rWHCcOsu3tKzbHoa1z IXPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=W+fbh/7ptG5k5yhulGgrerAbASMPxrSHMOi/+6snrPA=; b=0P3HyR5YlBx/nkY4bxjuPUAvoOEYVYJNM7/j53piSlKBOlEeYi8RSwIKvDtfW/qmlq m6a3CnFJ4+MeFWhn74MjVg1mPMLCWXVTgI3nLcyHzYmqx8zOEJEQfZkv8W3Nw1UQGo4y GCpr6MzW8ASk6JqQ4wABZz623LU2T0V1l44LBQuSb0psfSxcP0qAQyJNekcIZrh5A5FU NCMGEhTWZIzgHkB6YFJ3PiD041CWRyhliFphziBoVLr/r9+Qs9Ph5Cqm33zpz69UPxoe BQMU3kOC2WiiFF0RKweryrcxUgO3igG9o4YV8Yeffo+6zZky62Ja7RbNh91dHOvXiMe2 MsJg== 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 d9si1086775pgq.598.2018.03.27.09.55.16; Tue, 27 Mar 2018 09:55:30 -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 S1753453AbeC0Qxv (ORCPT + 99 others); Tue, 27 Mar 2018 12:53:51 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:48988 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932675AbeC0QmP (ORCPT ); Tue, 27 Mar 2018 12:42:15 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id AB622F98; Tue, 27 Mar 2018 16:42:14 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Boris Ostrovsky , Thomas Gleixner , Juergen Gross , Andy Lutomirski , Ingo Molnar Subject: [PATCH 4.15 085/105] x86/vsyscall/64: Use proper accessor to update P4D entry Date: Tue, 27 Mar 2018 18:28:05 +0200 Message-Id: <20180327162803.479879950@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180327162757.813009222@linuxfoundation.org> References: <20180327162757.813009222@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Boris Ostrovsky commit 31ad7f8e7dc94d3b85ccf9b6141ce6dfd35a1781 upstream. 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 Signed-off-by: Greg Kroah-Hartman --- arch/x86/entry/vsyscall/vsyscall_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/entry/vsyscall/vsyscall_64.c +++ b/arch/x86/entry/vsyscall/vsyscall_64.c @@ -355,7 +355,7 @@ void __init set_vsyscall_pgtable_user_bi 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));