From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8DCCC433E0 for ; Fri, 22 May 2020 12:50:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 55ED020885 for ; Fri, 22 May 2020 12:50:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 55ED020885 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6D31D80008; Fri, 22 May 2020 08:50:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6835A80007; Fri, 22 May 2020 08:50:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 599D580008; Fri, 22 May 2020 08:50:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0087.hostedemail.com [216.40.44.87]) by kanga.kvack.org (Postfix) with ESMTP id 3FFD480007 for ; Fri, 22 May 2020 08:50:38 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id EDC8F181AEF23 for ; Fri, 22 May 2020 12:50:37 +0000 (UTC) X-FDA: 76844338914.04.sky79_79dfc77cdd618 X-HE-Tag: sky79_79dfc77cdd618 X-Filterd-Recvd-Size: 2839 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Fri, 22 May 2020 12:50:37 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8CABD55D; Fri, 22 May 2020 05:50:36 -0700 (PDT) Received: from [192.168.1.84] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6196F3F68F; Fri, 22 May 2020 05:50:34 -0700 (PDT) Subject: Re: [PATCH 0/2] Fix W+X debug feature on x86 To: Andrew Morton Cc: Andy Lutomirski , Borislav Petkov , Dave Hansen , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , x86@kernel.org, Jan Beulich , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20200521152308.33096-1-steven.price@arm.com> <20200521120843.427b7ff33f8ed7f824eb07f9@linux-foundation.org> From: Steven Price Message-ID: <4e5eefc0-140c-e1d8-93e9-7f52deb434f9@arm.com> Date: Fri, 22 May 2020 13:50:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200521120843.427b7ff33f8ed7f824eb07f9@linux-foundation.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 21/05/2020 20:08, Andrew Morton wrote: > On Thu, 21 May 2020 16:23:06 +0100 Steven Price wrote: > >> Jan alert me[1] that the W+X detection debug feature was broken in x86 >> by my change[2] to switch x86 to use the generic ptdump infrastructure. >> >> Fundamentally the approach of trying to move the calculation of >> effective permissions into note_page() was broken because note_page() is >> only called for 'leaf' entries and the effective permissions are passed >> down via the internal nodes of the page tree. The solution I've taken >> here is to create a new (optional) callback which is called for all >> nodes of the page tree and therefore can calculate the effective >> permissions. >> >> Secondly on some configurations (32 bit with PAE) "unsigned long" is not >> large enough to store the table entries. The fix here is simple - let's >> just use a u64. > > I assumed that a cc:stable was appropriate on both of these(?). Yes thanks. >> I'd welcome testing (and other comments), especially if you have a >> configuration which previously triggered W+X warnings as I don't have >> such a setup. > > I'll wait a while for such testing. If nothing happens then I guess we > merge it up and see what then happens. > Thanks, Steve