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: <20180315130153.3ba2loj5oplogdew@linutronix.de>
Date:   Thu, 15 Mar 2018 14:01:53 +0100
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     Joerg Roedel <joro@...tes.org>
Cc:     iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
        tglx@...utronix.de
Subject: Re: [PATCH 05/10] iommu/amd: remove the special case from
 get_irq_table()

On 2018-03-15 13:53:42 [+0100], Joerg Roedel wrote:
> On Fri, Feb 23, 2018 at 11:27:31PM +0100, Sebastian Andrzej Siewior wrote:
> > @@ -4103,10 +4093,26 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
> >  		return ret;
> >  
> >  	if (info->type == X86_IRQ_ALLOC_TYPE_IOAPIC) {
> > -		if (get_irq_table(devid, true))
> > +		struct irq_remap_table *table;
> > +		struct amd_iommu *iommu;
> > +
> > +		table = get_irq_table(devid);
> > +		if (table) {
> > +			if (!table->min_index) {
> > +				/*
> > +				 * Keep the first 32 indexes free for IOAPIC
> > +				 * interrupts.
> > +				 */
> > +				table->min_index = 32;
> > +				iommu = amd_iommu_rlookup_table[devid];
> > +				for (i = 0; i < 32; ++i)
> > +					iommu->irte_ops->set_allocated(table, i);
> > +			}
> 
> I think this needs to be protected by the table->lock.

Which part any why? The !->min_index part plus extending(setting to 32)?

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ