From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A61EA12E71; Mon, 16 Sep 2024 02:54:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726455273; cv=none; b=cgT+on6wiEsbvmgsqryeF8GXarCWICaiLWLlqdAs297zGvZgHlJJ9FxbzTNDqsy+ghXsVFwD/KkhCK2F37IX2IU+e3FnY+WEZaV5JJl1VDw/xEPaoKhi/cR4MlcAXVqY9fXutiRXt721j45VzIAPVDFQ4B6mQGHzVXBAno34uS0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726455273; c=relaxed/simple; bh=4SY9/3+US2zm+crDDfzr5lKhaNSjQwLU5DcGcU1LpiA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=GFPXl3/ZhYPLtIeVK6FRS+0QjFB4jwUZ4X0+nUyvejZtoCfYVP6CoblrJ1X1kbwpdBZJmKPBshhVHvuHUuVUoevps0cK2EgkO0z+VD8B+G819Rh6YpJtRmYr0BeqmMYEwUeZCftRm0WwuVm4QFyUPawJwQd+9A3stWrV7Bm2d9s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 85C611476; Sun, 15 Sep 2024 19:54:54 -0700 (PDT) Received: from [10.162.16.84] (a077893.blr.arm.com [10.162.16.84]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5DAB73F64C; Sun, 15 Sep 2024 19:54:20 -0700 (PDT) Message-ID: <9d3286bd-7ad4-4472-aa26-2fb7d166fceb@arm.com> Date: Mon, 16 Sep 2024 08:24:17 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/7] x86/mm: Drop page table entry address output from pxd_ERROR() To: Dave Hansen , linux-mm@kvack.org Cc: Andrew Morton , David Hildenbrand , Ryan Roberts , "Mike Rapoport (IBM)" , Arnd Bergmann , x86@kernel.org, linux-m68k@lists.linux-m68k.org, linux-fsdevel@vger.kernel.org, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen References: <20240913084433.1016256-1-anshuman.khandual@arm.com> <20240913084433.1016256-3-anshuman.khandual@arm.com> <8e8a94d4-39fe-4c34-9f5d-5b347ca8fe9a@intel.com> Content-Language: en-US From: Anshuman Khandual In-Reply-To: <8e8a94d4-39fe-4c34-9f5d-5b347ca8fe9a@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 9/13/24 22:51, Dave Hansen wrote: > On 9/13/24 01:44, Anshuman Khandual wrote: >> This drops page table entry address output from all pxd_ERROR() definitions >> which now matches with other architectures. This also prevents build issues >> while transitioning into pxdp_get() based page table entry accesses. > > Could you be a _little_ more specific than "build issues"? Is it that > you want to do: > > void pmd_clear_bad(pmd_t *pmd) > { > - pmd_ERROR(*pmd); > + pmd_ERROR(pmdp_get(pmd)); > pmd_clear(pmd); > } > > But the pmd_ERROR() macro would expand that to: > > &pmdp_get(pmd) > > which is nonsense? Yes, that's the one which fails the build with the following warning. error: lvalue required as unary '&' operand Will update the commit message with these details about the build problem. > > Having the PTEs' kernel addresses _is_ handy, but I guess they're > scrambled on most end users' systems now and anybody that's actively > debugging can just use a kprobe or something to dump the pmd_clear_bad() > argument directly. Right.