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: <610b10bc-1aa2-4fad-a40b-be5fcfa04430@bell.net>
Date: Fri, 3 Oct 2025 13:18:32 -0400
From: John David Anglin <dave.anglin@...l.net>
To: Jason Gunthorpe <jgg@...dia.com>, Leon Romanovsky <leon@...nel.org>
Cc: Marek Szyprowski <m.szyprowski@...sung.com>,
 Leon Romanovsky <leonro@...dia.com>, Andreas Larsson <andreas@...sler.com>,
 Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
 "David S. Miller" <davem@...emloft.net>, Geoff Levand <geoff@...radead.org>,
 Helge Deller <deller@....de>, Ingo Molnar <mingo@...hat.com>,
 iommu@...ts.linux.dev,
 "James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
 Jason Wang <jasowang@...hat.com>, Juergen Gross <jgross@...e.com>,
 linux-alpha@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-mips@...r.kernel.org, linux-parisc@...r.kernel.org,
 linuxppc-dev@...ts.ozlabs.org, Madhavan Srinivasan <maddy@...ux.ibm.com>,
 Matt Turner <mattst88@...il.com>, Michael Ellerman <mpe@...erman.id.au>,
 "Michael S. Tsirkin" <mst@...hat.com>,
 Richard Henderson <richard.henderson@...aro.org>,
 sparclinux@...r.kernel.org, Stefano Stabellini <sstabellini@...nel.org>,
 Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
 Thomas Gleixner <tglx@...utronix.de>, virtualization@...ts.linux.dev,
 x86@...nel.org, xen-devel@...ts.xenproject.org,
 Magnus Lindholm <linmag7@...il.com>
Subject: Re: [PATCH v1 3/9] parisc: Convert DMA map_page to map_phys interface

On 2025-10-03 11:01 a.m., Jason Gunthorpe wrote:
> This doesn't actually use the virt at all:
> 
> 	offset = ((unsigned long) addr) & ~IOVP_MASK;
> 	if((size % L1_CACHE_BYTES) || ((unsigned long)addr % L1_CACHE_BYTES))
> 		ccio_io_pdir_entry(pdir_start, KERNEL_SPACE, (unsigned long)addr, hint);
> 
> And ccio_io_pdir_entry():
> 	pa = lpa(vba);
> 
> Is a special instruction that uses virt but AI tells me that special
> LPA instruction is returning phys. Not sure if that is a different
> value than virt_to_phys()..

ccio_io_pdir_entry currently only supports KERNEL_SPACE.  For KERNEL_SPACE, lpa() and
virt_to_phys() are equivalent if page is mapped.  lpa() returns 0 if a non-access data
TLB fault occurs (i.e., page isn't mapped).  Not sure if that matters.
> IDK, I'm not feeling brave enough to drop the LPA but maybe include
> this note in the commit message.
> 

-- 
John David Anglin  dave.anglin@...l.net

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ