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:   Fri, 18 Nov 2022 13:26:25 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     "Tian, Kevin" <kevin.tian@...el.com>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     "x86@...nel.org" <x86@...nel.org>, Joerg Roedel <joro@...tes.org>,
        Will Deacon <will@...nel.org>,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Marc Zyngier <maz@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jason Gunthorpe <jgg@...lanox.com>,
        "Jiang, Dave" <dave.jiang@...el.com>,
        Alex Williamson <alex.williamson@...hat.com>,
        "Williams, Dan J" <dan.j.williams@...el.com>,
        Logan Gunthorpe <logang@...tatee.com>,
        "Raj, Ashok" <ashok.raj@...el.com>, Jon Mason <jdmason@...zu.us>,
        Allen Hubbe <allenbh@...il.com>,
        "Ahmed S. Darwish" <darwi@...utronix.de>,
        "Chatre, Reinette" <reinette.chatre@...el.com>
Subject: RE: [patch 15/20] genirq/msi: Provide new domain id allocation
 functions

On Fri, Nov 18 2022 at 08:43, Kevin Tian wrote:
>> From: Thomas Gleixner <tglx@...utronix.de>
>> Sent: Friday, November 11, 2022 9:57 PM
>> 
>> @@ -597,7 +598,7 @@ static struct irq_domain *msi_get_device
>>  	if (!domain)
>>  		return NULL;
>> 
>> -	if (WARN_ON_ONCE(irq_domain_is_msi_parent(domain)))
>> +	if (irq_domain_is_msi_parent(domain))
>>  		return NULL;
>
> Is it intended to remove the warning here? If yes, what specific change
> in this patch leads to that removal?

Valid question

>> +	xa_for_each_range(xa, idx, desc, ctrl->first + base, ctrl->last + base) {
>> +		if (!msi_desc_match(desc, MSI_DESC_NOTASSOCIATED))
>> +			continue;
>> +
>> +		/* This should return -ECONFUSED... */
>> +		if (WARN_ON_ONCE(allocated >= ctrl->nirqs))
>> +			return -EINVAL;
>> +
>
> why is "==" an error?

because if you get here _after_ having allocated all interrupts already
then you have more descriptors than what you want to allocate, which
should never happen right?

Thanks,

        tglx


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ