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]
Date:   Thu, 24 Nov 2022 16:02:43 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Marc Zyngier <maz@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
        Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
        linux-pci@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jason Gunthorpe <jgg@...lanox.com>,
        Dave Jiang <dave.jiang@...el.com>,
        Alex Williamson <alex.williamson@...hat.com>,
        Kevin Tian <kevin.tian@...el.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Logan Gunthorpe <logang@...tatee.com>,
        Ashok Raj <ashok.raj@...el.com>, Jon Mason <jdmason@...zu.us>,
        Allen Hubbe <allenbh@...il.com>
Subject: Re: [patch V2 08/21] genirq/msi: Add pointers for per device irq
 domains

On Thu, Nov 24 2022 at 14:56, Marc Zyngier wrote:
> On Mon, 21 Nov 2022 14:36:28 +0000,
> Thomas Gleixner <tglx@...utronix.de> wrote:
>>  static inline int msi_sysfs_create_group(struct device *dev);
>>  
>> +static inline void msi_setup_default_irqdomain(struct device *dev, struct msi_device_data *md)
>
> Do we really need this to be inline? I'm sure the compiler can figure
> it out.

No. I'll fix that up.

>> +{
>> +	if (!dev->msi.domain)
>> +		return;
>> +	/*
>> +	 * If @dev::msi::domain is a global MSI domain, copy the pointer
>> +	 * into the domain array to avoid conditionals all over the place.
>> +	 */
>> +	if (!irq_domain_is_msi_parent(dev->msi.domain))
>> +		md->__irqdomains[MSI_DEFAULT_DOMAIN] = dev->msi.domain;
>> +}
>> +
>>  /**
>>   * msi_alloc_desc - Allocate an initialized msi_desc
>>   * @dev:	Pointer to the device for which this is allocated
>> @@ -213,6 +225,8 @@ int msi_setup_device_data(struct device
>>  		return ret;
>>  	}
>>  
>> +	msi_setup_default_irqdomain(dev, md);
>> +
>
> nit: if you move the setup below the msi.data assignment, you could
> only pass dev as a parameter. Or pass both and move the assignment in
> the function?

In which order we do that it all looks wrong :)

>>  	xa_init(&md->__store);
>>  	mutex_init(&md->mutex);
>>  	dev->msi.data = md;
>> 
>> 
>
> Irrespective of the above,
>
> Reviewed-by: Marc Zyngier <maz@...nel.org>
>
> 	M.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ