Received: by 10.213.65.68 with SMTP id h4csp1565375imn; Mon, 19 Mar 2018 07:35:26 -0700 (PDT) X-Google-Smtp-Source: AG47ELvczwpCjz9mK/QaKUQJh2KJ9boYwJ/zUaJK1bzTjo0pamY39MF+SvDi/bWkASQQFvmUtSgY X-Received: by 10.98.63.75 with SMTP id m72mr6080165pfa.167.1521470126607; Mon, 19 Mar 2018 07:35:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521470126; cv=none; d=google.com; s=arc-20160816; b=JJqLL2PxPT/2bAuhClQlL8AguzbsOAYyBvXTzbObWccZEEOfYw+SNYcza+PeRWFTYq ED2mgCBreFJO3mKEpOPRGZF1sVBdx3o2V30cXjQoEXKfhPmyHsn/L2gJnAqKi+zv4zxj FbmqqR1COjTH11prsuO1Bw/Iy/QEaaITWtVf2Se/t3hYllRNQYXTl8PvXe62XMcqhjW8 HVmui70KJwce4+LTM0iq0H22rilsqOVgMGNXQCnL/ikhQ7LCXOt9auhdADIOOoRXgoX+ 8SFAXO0evrGm8yIyv7h2Px3n447OzUgL6f/WLLVDuyEG0ID7DMq+4lPFf7OSLTqEbcX7 //Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=808I7tftw0HtRJ9NMgmcxAuh+goj02OJRmw/EF3iEXo=; b=qdmdxHWK+Bz27y0dSabQlfwoF3sDKe5z0/OGqaDB7AJ3sOIwjl8LtXQihZ7lkC0ayu 5vz9tQGr6ZPwvseiHECK2Cds/3cjt+d3zwx1h14Fp8yvVS+kTndoNnTea99msIgRJlEv Of9kI+jDFv7z0YqPX8/vm1+3iP7agu0OTB3AJ5ZI1/aKCRBSd1eQf+Jtc2BFZJUWaxIk EqX6WGEYim3BdRpfG+lu6vALI3UXvV9fhApXn+TNPyeapGE2AU5+KsovI27RK2e2nvuW LtQviPVSJ5Ea7nPzr38PAuh2wkp3gLs++nTNycNJP4Crg9jNovAqALajAelaTha1dlPi UtFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=Hw5oZQxj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6-v6si78287plz.417.2018.03.19.07.35.11; Mon, 19 Mar 2018 07:35:26 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=Hw5oZQxj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755648AbeCSOeQ (ORCPT + 99 others); Mon, 19 Mar 2018 10:34:16 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:35154 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755629AbeCSOeL (ORCPT ); Mon, 19 Mar 2018 10:34:11 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2JENaZD142565; Mon, 19 Mar 2018 14:33:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2017-10-26; bh=808I7tftw0HtRJ9NMgmcxAuh+goj02OJRmw/EF3iEXo=; b=Hw5oZQxjWtVwu4/02BttSBWWHCz+YMhQI34bkFWgrRWssUmHsYyJMkz3G1GH7dRD67QO 3nexFiR1Uo+1xeFfkTT2SwDU/ZSyPX54cRbkyzUFVAwz0YPN3bg3rUHm3WrJvvBUtE0f Aa79h24pymHoy/3JUOEzFDbM0W7okXR5jVkE2Z0P+pphnSj8orvtC03EgH9DxOG8k6vO WxCspj2fwdI9BGeij/GC3WEZWvp0vBs38RBYOqZuA12gg9cr90NETbhX6bGxctevNnjB B4C68DVuG1Fj33Qzi32vlCvhmXGfReHeN4fg01BliaYJqQ5dsR2RtkAF5o0cKXirVsBX 9w== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2gtex701xg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Mar 2018 14:33:54 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w2JEXlbD020537 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Mar 2018 14:33:47 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2JEXl60015875; Mon, 19 Mar 2018 14:33:47 GMT Received: from dhcp-10-152-34-29.usdhcp.oraclecorp.com.com (/10.152.34.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 19 Mar 2018 07:33:46 -0700 From: Boris Ostrovsky To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, luto@kernel.org, x86@kernel.org, jgross@suse.com, Boris Ostrovsky Subject: [PATCH] x86/vsyscall/64: Use proper accessor to update p4d entry Date: Mon, 19 Mar 2018 10:31:54 -0400 Message-Id: <20180319143154.3742-1-boris.ostrovsky@oracle.com> X-Mailer: git-send-email 2.14.3 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8836 signatures=668693 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=5 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=558 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803190149 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Writing to it directly does not work for Xen PV guests. Signed-off-by: Boris Ostrovsky --- 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)); -- 2.14.3