Received: by 10.213.65.68 with SMTP id h4csp88678imn; Mon, 19 Mar 2018 20:44:53 -0700 (PDT) X-Google-Smtp-Source: AG47ELteYS2dA4GAT8t39CKl7mpU55ij7HoSXiJR6Ogb7Yqv7KYfusvleVjaaqWPJ+SU5rXFwlZk X-Received: by 10.98.34.75 with SMTP id i72mr12182326pfi.165.1521517493179; Mon, 19 Mar 2018 20:44:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521517493; cv=none; d=google.com; s=arc-20160816; b=sgmlLNffNa5YCqD/YUPvpbfB4lr19FTfRtf4RaDYVjqxML242ACeIqkPThTpC7ZESi x2dahCghWkr8vt878dOi/UbY5HENusCEI9sGZWfRG1CRErXlAr9ARrT/qUZVncvkBvFZ CB+en405Sy+hJ5cqsCCWIJfP3ieMXMc4cloE4RqlVZrtPgAz1WRd7aN+Zg7o5FQaiIav fzt7T6AqoBCAqoJVcPmJ2tRiB7E1PZg/GugXx8GLach+YzK8CtOtNXfPATNYUgTGcKWP gHhb9HyLOkZUqC2U2d8KNLsq4qt8AYptbkBLZx1xxAO5MSa4ZsmXcJmEqF74ij6gogSZ PBMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dmarc-filter :arc-authentication-results; bh=rZmt4HnSyxzfiXNI87uSQ0z4/+uamgyeN60EM2pwlZs=; b=rzQkTNLn8BqCgAaZPDDDOTK2fzhg5aKPEHdkvG0GudUCsqC7vbkrHj0OZSRCRFPpiM bcVu6N33ZtCUnTqMKP17HlXuh/ZqCvDd+kpx1VjZDP4FkT0VGFuhndjEr7bHsii9jpP4 JsjYIW9/Kn7iKLc5Wmd4ysF5rVIiq2VLE7ytqYnXYvU1CKar6Xdd6H/L2PFPEgLm8PBA CgIDvPlUqOImWpocGs3J+m/4LybMYbys5OpjguQXLQPZ34IIOhBd5q6A6LYCkOYdEwi+ oYOFr8/i1xCFJ0Ggv5+Hma9PJBGVxwaWAK7VffKK143/ZMhfZ2Ml4PAU+Qj+ENHv6RTu fBIQ== 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 69-v6si746359pla.390.2018.03.19.20.44.38; Mon, 19 Mar 2018 20:44:53 -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 S1751587AbeCTDnS (ORCPT + 99 others); Mon, 19 Mar 2018 23:43:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:50896 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750968AbeCTDnQ (ORCPT ); Mon, 19 Mar 2018 23:43:16 -0400 Received: from mail-it0-f42.google.com (mail-it0-f42.google.com [209.85.214.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 943C02178C for ; Tue, 20 Mar 2018 03:43:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 943C02178C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=luto@kernel.org Received: by mail-it0-f42.google.com with SMTP id z143-v6so11292576itc.0 for ; Mon, 19 Mar 2018 20:43:15 -0700 (PDT) X-Gm-Message-State: AElRT7EQBb1kW1AORtNtlrkaLxJUkvEjPyfHX8GwcfLJCWVdmwN+OJRd ynOpVuLq62p5zUqhaEKfGo3HEiXGRgb4vBWND8kkrA== X-Received: by 2002:a24:818a:: with SMTP id q132-v6mr1052474itd.123.1521517394997; Mon, 19 Mar 2018 20:43:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.137.70 with HTTP; Mon, 19 Mar 2018 20:42:54 -0700 (PDT) In-Reply-To: <20180319143154.3742-1-boris.ostrovsky@oracle.com> References: <20180319143154.3742-1-boris.ostrovsky@oracle.com> From: Andy Lutomirski Date: Tue, 20 Mar 2018 03:42:54 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/vsyscall/64: Use proper accessor to update p4d entry To: Boris Ostrovsky Cc: LKML , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andrew Lutomirski , X86 ML , Juergen Gross 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 On Mon, Mar 19, 2018 at 2:31 PM, Boris Ostrovsky wrote: > Writing to it directly does not work for Xen PV guests. Whoops, my bad. Acked-by: Andy Lutomirski > > 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 >