Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2705084ybk; Tue, 12 May 2020 06:14:23 -0700 (PDT) X-Google-Smtp-Source: APiQypJp3oL9VEFX0SdyuEyM/qSdb4jw905A7l+TsW0mHexH8y/tU/z7nipTxW3O0MHBx1UC6a4L X-Received: by 2002:a50:fa8d:: with SMTP id w13mr12954551edr.280.1589289262988; Tue, 12 May 2020 06:14:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589289262; cv=none; d=google.com; s=arc-20160816; b=GR53cNAQjLqQ05ZuRvmr98yN3DCjQ/xvUUnrldNtQ02z0dOuPh9oVxlRBySwYmtZZq zK9AOubE6v+7LnNw/hqAIbcLvfNUptOzq3Q61PoIpLjy8M/gf18aybDlD2qk6u84UkeW T/qJB0VZ2rfP9jJseuiXWjbud2Pe7czroiox9uSFk6+0m+cN1dEN/g8SOMCyLR/+QTKt SFUBhn/vB3zUWlmfD1udh5fzuv1pEYnbT3yOB2FsRtImS+pG52jKUNq31hoo5QwusdvU pdZF48eJTYGazDIIuhWpdxR0aBb7Y6UiKRshhWcRcb6/hfbe3Hl2baCw+s0UN2476pEg Urkg== 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=hVTyR2oHgefu+dn1x1eYGCHcMTD812Eo++yWkOWMIqQ=; b=D+ct5kGjgG9mO+ha0KOCHAL8JXDgAsZ407FBYpIRXGAiW1Dvboyvdxmv46XEnbaTV3 GcNvfFK30lSOiYqX2oliT2O/2zrtHaY5ltabYIwT51FAswq0WLw/PWQngz3hm2UjpDPe lH5HiCH1PyyjyQGZtwSNN3KDpzKEUZP0k4/5ngN5y77Ku1C3AUKUNUdjE1O7aFkoHNQ+ r5kTCp9sv81epFeB/JCoBq7QsryH5o5f8bStU2xk5wNY1g5cKj8GsC24UoSvEQ8gSlT9 jph+MHHR4tm5V5pp6b7FYth5T9zIm7Aapijqsjcc6IDCFXwNMACwKrzO6UDxU9j54YGT TBWg== 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 cq16si6502856edb.479.2020.05.12.06.13.58; Tue, 12 May 2020 06:14:22 -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 S1729686AbgELNJ5 (ORCPT + 99 others); Tue, 12 May 2020 09:09:57 -0400 Received: from mx2.suse.de ([195.135.220.15]:45150 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727783AbgELNJ4 (ORCPT ); Tue, 12 May 2020 09:09:56 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1F03EAC9F; Tue, 12 May 2020 13:09:58 +0000 (UTC) Subject: Re: your "x86: mm: convert dump_pagetables to use walk_page_range" change To: Steven Price Cc: the arch/x86 maintainers , lkml References: From: Jan Beulich Message-ID: <5167a60e-8264-fc69-fb21-cd7f13592488@suse.com> Date: Tue, 12 May 2020 15:09:54 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.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 12.05.2020 15:02, Steven Price wrote: > On 12/05/2020 10:39, Jan Beulich wrote: >> Additionally I'd like to note that note_page()'s "unsigned long val" >> parameter isn't wide enough for 32-bit PAE PTEs, and hence the NX >> flag will always be seen as clear in new_prot in such configs. > > Ah, interesting. I'm not sure what type is actually guaranteed to be > correct. pgprotval_t is x86 specific, but it might be necessary to > extend it to other architectures. I think I got the "unsigned long" from > the generic page.h (and because it happens to work on most > architectures) - but hadn't noticed that that file was specifically only > for NOMMU architectures. Well, it's pteval_t (still x86-specific I guess) unless the call sites could/would be switched to use pte_flags(). As per https://lists.xenproject.org/archives/html/xen-devel/2020-05/msg00549.html the use of pte_val() has another bad effect, but as described there it might also be Xen specific code which is broken here. > I'll see if I can come up with fixes, but if you've got anything ready > already then please jump in. No, I don't. I lack the time right now to make a change potentially affecting multiple architectures. Jan