lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <91700541-3c17-4c2f-aa6b-b4e1a36749f9@app.fastmail.com>
Date: Thu, 18 Dec 2025 23:28:36 +0200
From: "Leon Romanovsky" <leon@...nel.org>
To: "Helge Deller" <deller@....de>,
 "James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
 "Marek Szyprowski" <m.szyprowski@...sung.com>,
 "Jason Gunthorpe" <jgg@...pe.ca>
Cc: linux-parisc@...r.kernel.org, linux-kernel@...r.kernel.org,
 "Guenter Roeck" <linux@...ck-us.net>
Subject: Re: [PATCH] parisc: Set valid bit in high byte of 64‑bit physical address



On Thu, Dec 18, 2025, at 20:27, Helge Deller wrote:
> Hi Leon,
>
> On 12/18/25 13:08, Leon Romanovsky wrote:
>> On 32‑bit systems, phys_addr_t is defined as u32. However, parisc
>> expects physical addresses to be 64‑bit values so it can store a
>> validity bit in the upper byte.
>> ...
>> Also remove the now‑obsolete macro.
>
> Your patch is OK, but could you please keep the lpa() macro?
> It's unrelated to your patch, and sometimes we need the lpa()
> e.g. when adding debug code, so I'd prefer to keep it.

The parch was already accepted and if Marek agrees, he can easily revert the deleted hunk and rebase my parch.

However from upstream perspective, we don't keep code which is not used and if this macro would be function, we would get compilation warning for that.

Isn't lpa(x/) equal to virt_to_phys(x)?

Thanks 

>
> Thanks,
> Helge
>
> ...
>> diff --git a/arch/parisc/include/asm/special_insns.h b/arch/parisc/include/asm/special_insns.h
>> index 1013eeba31e5..fbccd76180b6 100644
>> --- a/arch/parisc/include/asm/special_insns.h
>> +++ b/arch/parisc/include/asm/special_insns.h
>> @@ -2,21 +2,6 @@
>>   #ifndef __PARISC_SPECIAL_INSNS_H
>>   #define __PARISC_SPECIAL_INSNS_H
>>   
>> -#define lpa(va)	({					\
>> -	unsigned long pa;				\
>> -	__asm__ __volatile__(				\
>> -		"copy %%r0,%0\n"			\
>> -		"8:\tlpa %%r0(%1),%0\n"			\
>> -		"9:\n"					\
>> -		ASM_EXCEPTIONTABLE_ENTRY(8b, 9b,	\
>> -				"or %%r0,%%r0,%%r0")	\
>> -		: "=&r" (pa)				\
>> -		: "r" (va)				\
>> -		: "memory"				\
>> -	);						\
>> -	pa;						\
>> -})

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ