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]
Date:	Wed, 29 May 2013 16:13:29 -0500
From:	Brian King <brking@...ux.vnet.ibm.com>
To:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
CC:	Alexander Gordeev <agordeev@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] powerpc/pseries: Force 32 bit MSIs when tearing down

On 05/27/2013 04:52 PM, Benjamin Herrenschmidt wrote:
> On Mon, 2013-05-27 at 18:20 +0200, Alexander Gordeev wrote:
>> This fix just adds a missed call to a new PAPR function
>> which should have been done with commit e61133d ("powerpc/
>> pseries: Force 32 bit MSIs for devices that require it")
> 
> Arguably, PAPR should allow to disable MSIs using either interface,
> we shouldn't have to know whether the MSI was a forced-32-bit one to be
> able to disable it.
> 
> Brian, can you check with Colleen ?

That is correct, and is the exact path we went down when I tested the code
that is currently upstream. I don't think this patch should be needed.

Thanks,

Brian


> 
> Cheers,
> Ben.
> 
>> Signed-off-by: Alexander Gordeev <agordeev@...hat.com>
>> ---
>>  arch/powerpc/platforms/pseries/msi.c |    8 +++++++-
>>  1 files changed, 7 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
>> index 40c7db3..2b80a68 100644
>> --- a/arch/powerpc/platforms/pseries/msi.c
>> +++ b/arch/powerpc/platforms/pseries/msi.c
>> @@ -90,6 +90,7 @@ static int rtas_change_msi(struct pci_dn *pdn, u32 func, u32 num_irqs)
>>  static void rtas_disable_msi(struct pci_dev *pdev)
>>  {
>>  	struct pci_dn *pdn;
>> +	int rc;
>>  
>>  	pdn = get_pdn(pdev);
>>  	if (!pdn)
>> @@ -98,7 +99,12 @@ static void rtas_disable_msi(struct pci_dev *pdev)
>>  	/*
>>  	 * disabling MSI with the explicit interface also disables MSI-X
>>  	 */
>> -	if (rtas_change_msi(pdn, RTAS_CHANGE_MSI_FN, 0) != 0) {
>> +	if (pdn->force_32bit_msi)
>> +		rc = rtas_change_msi(pdn, RTAS_CHANGE_32MSI_FN, 0);
>> +	else
>> +		rc = rtas_change_msi(pdn, RTAS_CHANGE_MSI_FN, 0);
>> +
>> +	if ((rc != 0) && !pdn->force_32bit_msi) {
>>  		/* 
>>  		 * may have failed because explicit interface is not
>>  		 * present
>> -- 
>> 1.7.7.6
>>
>>
> 
> 


-- 
Brian King
Power Linux I/O
IBM Linux Technology Center


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ