Received: by 10.192.165.148 with SMTP id m20csp4502661imm; Tue, 8 May 2018 09:25:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq7LgxMJZNk8OoaB/xUIBL/Ce58Y1E2zljDJdnxaBtpW5EkO3NkoafsaDIgZQ0RnmGLTQWk X-Received: by 2002:a17:902:758d:: with SMTP id j13-v6mr42486910pll.188.1525796734163; Tue, 08 May 2018 09:25:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525796734; cv=none; d=google.com; s=arc-20160816; b=Fa66r5LUifeFDUK2bH3IGV+p1Ah5YYV8GvGuorjKjIrERjws9P8QjlBndX4gV2NGz4 Udw1Lxb8R+AZ7Xt4ak/5aFCHv8hvPgC0NibzxisvBNZbUOPISDZrS41OpRonaUipp9i8 Srj/eP4agqX0/lB8yFl+iLskT86Y2U7q0MF/3rM+llhZQLQCkLe7J/i+/9cg9EcDrKgV /8mvP7gbvbBT7XlZx9KHUL6CZVxlhFDr0EU5D0oVjgSot22TnulJ+EYFvrhjMQoFB/wy FqmeywQtPM8xmsIx+By2B4fa2XS0/M5R5UBYPqGNvPChva17EGQajuHiIpDrsXxsNNeL vCXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:cc:references:to:subject :arc-authentication-results; bh=X4kH9Uvs+yTsft1oZn0ERJx6cVM7wS3mCT6VqKHESkM=; b=V0yRrgT6e4jUaFhlgVIXSFywSv4TpLiE7GWvr6GhTz5bVGLlpyNoHppY77AKxAgW8I iMEz+ysc/enMj27fzky1Hh1ynunyb15nWYhS8YBVSpidySf5PUVbhDxx24BgUqhXtnJN EtVGwu+95VphsNOq4ja8GhYS3MVuaRTDpqJ3BeP+FovqKHbAm/bd3gxWVJyafVoK8cpO Yasqq7NJB6GBkYf9jW0qBBh2sKZX3LvMHMsxzeix2hfli6n2dokXWW/fprmqDFCf4+2H hq82G9umSKq3fIbfzpR5jIa575tOQ1Ai3WUmtR9/eJ9p6ub20EL48L4tE9IqWC1Z1+T2 w9qA== 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 r5-v6si8828259pls.227.2018.05.08.09.25.19; Tue, 08 May 2018 09:25:34 -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 S932864AbeEHQZE (ORCPT + 99 others); Tue, 8 May 2018 12:25:04 -0400 Received: from mga18.intel.com ([134.134.136.126]:14953 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932707AbeEHQZE (ORCPT ); Tue, 8 May 2018 12:25:04 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 May 2018 09:25:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,379,1520924400"; d="scan'208";a="39652780" Received: from unknown (HELO [10.7.201.133]) ([10.7.201.133]) by orsmga008.jf.intel.com with ESMTP; 08 May 2018 09:25:03 -0700 Subject: Re: [PATCH] x86/boot/64/clang: Use fixup_pointer() to access '__supported_pte_mask' To: Alexander Potapenko References: <20180508121638.174022-1-glider@google.com> <1f69bdb6-df5e-d709-064a-4f6fdd6e11a7@linux.intel.com> Cc: Ingo Molnar , "Kirill A. Shutemov" , Linux Memory Management List , LKML , Matthias Kaehlcke , Dmitriy Vyukov , Michael Davidson From: Dave Hansen Openpgp: preference=signencrypt Message-ID: Date: Tue, 8 May 2018 09:25:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/08/2018 07:50 AM, Alexander Potapenko wrote: >>> Similarly to commit 187e91fe5e91 >>> ("x86/boot/64/clang: Use fixup_pointer() to access 'next_early_pgt'"), >>> '__supported_pte_mask' must be also accessed using fixup_pointer() to >>> avoid position-dependent relocations. >>> >>> Signed-off-by: Alexander Potapenko >>> Fixes: fb43d6cb91ef ("x86/mm: Do not auto-massage page protections") > >> In the interests of standalone changelogs, I'd really appreciate an >> actual explanation of what's going on here. Your patch makes the code >> uglier and doesn't fix anything functional from what I can see. > You're right, sure. I'll send a patch with an updated description. Great, thanks! >> Do we have anything we can do to keep us from recreating these kinds of >> regressions all the time? > I'm not really aware of the possible options in the kernel land. Looks like > a task for some objtool-like utility? > As long as these regressions are caught with Clang, setting up a 0day Clang > builder might help. I've asked the 0day folks if this is doable. It would be great to see it added.