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, 24 Sep 2010 09:20:27 +0200
From:	LEROY Christophe <christophe.leroy@....fr>
To:	Grant Likely <grant.likely@...retlab.ca>
CC:	David Brownell <dbrownell@...rs.sourceforge.net>,
	spi-devel-general@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
	Kumar Gala <galak@...nel.crashing.org>,
	Anton Vorontsov <avorontsov@...mvista.com>
Subject: Re: [PATCH] spi_mpc8xxx: issue with using definition of pram in Device
 Tree

  Hello,

The issue is that cpm_muram_alloc_fixed() allocates memory from the 
general purpose muram area (from 0x0 to 0x1bff).
Here we need to return a pointer to the parameter RAM, which is located 
somewhere starting at 0x1c00. It is not a dynamic allocation that is 
required here but only to point on the correct location in the parameter 
RAM.

For the CPM2, I don't know. I'm working with a MPC866.

Attached is a previous discussion on the subject where I explain a bit 
more in details the issue.

Regards
C. Leroy

Le 24/09/2010 09:10, Grant Likely a écrit :
> On Thu, Sep 16, 2010 at 09:05:03AM +0200, christophe leroy wrote:
>> This patch applies to 2.6.34.7 and 2.6.35.4
>> It fixes an issue during the probe for CPM1 with definition of parameter ram from DTS
>>
>> Signed-off-by: christophe leroy<christophe.leroy@....fr>
> I'm sorry, I don't understand the fix from the given description.
> What is the problem, and why is cpm_muram_alloc_fixed() the wrong
> thing to call on CPM1?  Does CPM2 still need it?
>
> g.
>
>> diff -urN b/drivers/spi/spi_mpc8xxx.c c/drivers/spi/spi_mpc8xxx.c
>> --- b/drivers/spi/spi_mpc8xxx.c	2010-09-08 16:43:50.000000000 +0200
>> +++ c/drivers/spi/spi_mpc8xxx.c	2010-09-08 16:44:03.000000000 +0200
>> @@ -822,7 +822,7 @@
>>   	if (!iprop || size != sizeof(*iprop) * 4)
>>   		return -ENOMEM;
>>
>> -	spi_base_ofs = cpm_muram_alloc_fixed(iprop[2], 2);
>> +	spi_base_ofs = iprop[2];
>>   	if (IS_ERR_VALUE(spi_base_ofs))
>>   		return -ENOMEM;
>>
>> @@ -844,7 +844,6 @@
>>   			return spi_base_ofs;
>>   	}
>>
>> -	cpm_muram_free(spi_base_ofs);
>>   	return pram_ofs;
>>   }

Download attachment "Message joint" of type "message/rfc822" (6374 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ