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] [day] [month] [year] [list]
Message-ID: <aMvv_u8HXAV7tbYz@google.com>
Date: Thu, 18 Sep 2025 11:41:50 +0000
From: Mostafa Saleh <smostafa@...gle.com>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: iommu@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org, robin.murphy@....com, will@...nel.org,
	joro@...tes.org, praan@...gle.com
Subject: Re: [PATCH v2 1/3] iommu/io-pgtable-arm: Move selftests to a
 separate file

On Wed, Sep 17, 2025 at 06:48:24PM -0300, Jason Gunthorpe wrote:
> On Wed, Sep 17, 2025 at 08:20:12PM +0000, Mostafa Saleh wrote:
> > On Wed, Sep 17, 2025 at 04:38:18PM -0300, Jason Gunthorpe wrote:
> > > On Wed, Sep 17, 2025 at 07:11:38PM +0000, Mostafa Saleh wrote:
> > > > +static void __init arm_lpae_dump_ops(struct io_pgtable_ops *ops)
> > > > +{
> > > > +	struct arm_lpae_io_pgtable *data = io_pgtable_ops_to_data(ops);
> > > > +	struct io_pgtable_cfg *cfg = &data->iop.cfg;
> > > 
> > > Can be:
> > > 
> > >        struct io_pgtable_cfg *cfg =
> > >                &io_pgtable_ops_to_pgtable(pgtbl_ops)->cfg;
> > 
> > There are a bunch of other formatting issues here also, but I wanted to
> > move the code as is, so with “--color-moved” you can see the exact
> > difference, otherwise, it’s harder to review.
> > 
> > I can add a patch before to fix those + the printing as you suggested
> > next.
> 
> Yeah, I brought it up because with the above you don't need
> arm_lpae_io_pgtable
> 
> > I don’t have a strong opinion about this, but I am more inclined to
> > keep the prints considering it’s a low-level test for the page table,
> > and such parameters would be useful to understand the failures.
> 
> My general view has been that there is alot of debug prints I've added
> to kunits to debug them but once they are debugged I tend to drop them
> off as they may not be useful to debug the next issue.
> 
> > I know this is not relevant to this series, but the KVM driver will
> > need to expose arm_lpae_io_pgtable anyway.
> 
> Really? That sounds like wrong layering, why does it need to break the
> iopgtable abstraction? :(

Oh, not any more actually, in my lastest version it's just exported
for the selftest, sorry for the confusion.

I will respin v3 with with this patch leaving the arm_lpae_dump_ops
behind, it's a bit ugly with the guards + the exports, if Robin and
Will are OK with removing it we can just drop it.

Thanks,
Mostafa

> 
> Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ