Received: by 10.213.65.68 with SMTP id h4csp877485imn; Tue, 27 Mar 2018 10:25:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+Gzk18+F60BJJsCq/bbD8KipjRFu9LLbiWJ1Up7etBSmnLvGLp71Z9J1oYmyZd238HttJi X-Received: by 10.98.62.71 with SMTP id l68mr176425pfa.98.1522171522411; Tue, 27 Mar 2018 10:25:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522171522; cv=none; d=google.com; s=arc-20160816; b=lxfA8fmiF5SWDsCtKKEC1/zTrkhVOHEK888oaGmVqYHZXUp2VUmXHOtQc7uoH7p/Fs 38a8L71lqqMZLVMTehByb3Anp/GsY8pSOpvszb6t1NkMWwG2oi/R8kxZw7zlPNBxsvrX sZ5bAPj2UqDbYjSsY99CME+l/68J5uJ9pjIdE3xWRD/Bv6Wssz5iIgtX5gUAkLUMM4xT 3o9MSpbfqFz5sazcVk9TCrdLzxlvyVC8bQ3fZJdxoPTWvqxgcXZyX4CFxQcu0yhF551P X2zeqJ/5TPNcrUEmwtyIsrdeEdHpwYciHfaTwptRj/obKJHPOi2hqNtFViGVJhwkJKn6 fjfg== 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=bZuCrGXJYE/SwwMhcna5pQHeR85Ahx7vPV6tHIKILvc=; b=SUYuWCJXraRlfgyC+ST1li/qszqV/vMp0iS+fREfnW6xgu+rTRyxTryr8BtQ1inGqu nKm78UM5TovJhgwXFyeKN8oMYN1UT9/KX4xXYt84OLssBlVaybRb+mpP6cIXAg2j6iHc k2IU9jApSk/1uC5OYJ3zFZlQes+jIvwNJpz9eAOyjQLM0ciFd4Kc/pdpwSDxc4aflUcf S4ia9xcQ/WuOg8xoUC3J3RivJt+CjrZETATs2VGFd7xod0ayQWAOKl116JXhmlb8I3Ou dIi+UCiCSt2jkncGhDvIi2bLgPKgwJx/mLmir+Wnamf1rOVub42zfzJt1miJmocjBjGT VcKA== 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 f18si1153551pgn.244.2018.03.27.10.25.08; Tue, 27 Mar 2018 10:25:22 -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 S1754921AbeC0Qh0 (ORCPT + 99 others); Tue, 27 Mar 2018 12:37:26 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46234 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754591AbeC0QhV (ORCPT ); Tue, 27 Mar 2018 12:37:21 -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 C55A5FB0; Tue, 27 Mar 2018 16:37:20 +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.14 080/101] x86/vsyscall/64: Use proper accessor to update P4D entry Date: Tue, 27 Mar 2018 18:27:52 +0200 Message-Id: <20180327162754.977527036@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180327162749.993880276@linuxfoundation.org> References: <20180327162749.993880276@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.14-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));