Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp251031ybr; Fri, 22 May 2020 05:54:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKjT+ORip/5oYSlItOzImQOGrB82yvtMelqSKBVnmhHDOLu2MU0jIhF56JBF8tTTOZS5vG X-Received: by 2002:a17:906:bce6:: with SMTP id op6mr7790775ejb.337.1590152039907; Fri, 22 May 2020 05:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590152039; cv=none; d=google.com; s=arc-20160816; b=C8p56CbwWeKbIJcB7i+RVAOM14LvqzwWdDB+IFOuf1VZOi7DJcXpcYNIGwkWij5eIo pW8pcTaqnwjhn/Ibo9bArJttc8MGeRuCEmQzwuPoMK+AzBIQdeH5u6bI/Bpn0US8O5dr Rzu/80ZmSFRuxfY/uAcMdD5MaEyV0qIaiLoyAWSxwz8jSj5deXG++Teuy1jcQ8gKgVsz CCcYcHiIO/vCiRzqRNW3katu/9+1FoiGjOCwDrZhWa2jJm3cHY+H7Ofs8XjzQB/G70Zr EKd7hFJTaXDUDCPbpnQhv4mRb9G9DIwHMd6XkKd3ycfyCmxt1cVFnE3LT/p8enF9alct 7pHg== 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:from:references:cc:to:subject; bh=xGguhsV0Lz2yfICyVP7jo1WuLR+CkIpwpYIaOj+ospU=; b=XVHFtbZiceM2EtX2b+OqRyz+B25W7FHsUbVepd/N4P8S2GZnc3MtQyGXv8Ix6LHPUR bojYHZ7yoyVVQyeDInKnra4qSpaPXeaZawF8nMwPQJMevBTN0Qx/iu0+duaOmlVOoeqp 91imOP1CREupQU1dDyDvmP2iFMoMPcJz7MJI/O6DKuEmFtT04DJA3P+96XKW9XK093bw tILKyAonL+4xp1VbrcBPLtDuyDN86sMjaeUYILaVAKtHXpAf8k+N24fy4rJqNnxIpVbg nq2rI5DN6a7VQ6RUHtAIcRAnJDm56fAnl5Br3IV4F6AZF2GQB0V8uhSpBp69pxVcpm8W SP6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x24si4865698ejc.301.2020.05.22.05.53.35; Fri, 22 May 2020 05:53:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729715AbgEVMui (ORCPT + 99 others); Fri, 22 May 2020 08:50:38 -0400 Received: from foss.arm.com ([217.140.110.172]:34956 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729344AbgEVMuh (ORCPT ); Fri, 22 May 2020 08:50:37 -0400 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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