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: <86tt64h0x9.wl-maz@kernel.org>
Date: Thu, 01 May 2025 15:15:46 +0100
From: Marc Zyngier <maz@...nel.org>
To: Lorenzo Pieralisi <lpieralisi@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will@...nel.org>,
	Arnd Bergmann <arnd@...db.de>,
	Sascha Bischoff <sascha.bischoff@....com>,
	Timothy Hayes <timothy.hayes@....com>,
	"Liam R. Howlett" <Liam.Howlett@...cle.com>,
	Mark Rutland <mark.rutland@....com>,
	linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org
Subject: Re: [PATCH v2 21/22] irqchip/gic-v5: Add GICv5 IWB support

On Wed, 30 Apr 2025 17:25:24 +0100,
Lorenzo Pieralisi <lpieralisi@...nel.org> wrote:
> 
> I wrote a diff against the heavily reworked series in progress I have,
> (so it does not apply on v2 - headers moved) with what I came up with
> for the IWB MBIgen like. It works - it removes lots of boilerplate code
> but there is a hack we never really liked in:
> 
> gicv5_its_msi_prepare()
> 
> that is, using the OF compatible string to detect if we are an IWB or not.

You shouldn't need that. The MSI_FLAG_USE_DEV_FWNODE should be a good
enough indication that this is something of interest, and that ends-up
in the .init_dev_msi_info() callback.

> If we are, we use the msi_alloc_info_t->hwirq to define the LPI eventid,
> basically the IWB wire, if not we just allocate an eventid available from
> the device bitmap.
> 
> Other than that (and being forced to provide an IWB irqchip.irq_write_msi_msg()
> pointer even if the IWB can't write anything otherwise we dereference
> NULL) this works.

Not even MBIGEN allows you to change the event. If you really want to
ensure things are even tighter, invent a MSI_FLAG_HARDCODED_MSG flag,
and pass that down the prepare path.

> Is there a better way to implement this ? I would post this code with
> v3 but instead of waiting I thought I could inline it here, feel free
> to ignore it (or flame me if it is a solved problem I failed to spot,
> we need to find a way for the IWB driver to pass the "fixed event" info
> to the ITS - IWB eventIDs are hardwired it is not like the MBIgen where
> the irq_write_msi_msg() callback programs the wire-to-eventid
> translation in HW).

It's *exactly* the same. And see above for a potential explicit
solution. The empty irq_write_msi_msg() is not a problem. It's
actually pretty clean, given how the whole thing works.

Please fold this into your v3, and we'll take it from there.

	M.

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ