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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <A567023C-17FC-402D-9394-29DFFA816891@kernel.crashing.org>
Date:	Thu, 10 Apr 2008 14:40:52 -0500
From:	Kumar Gala <galak@...nel.crashing.org>
To:	Sergei Shtylyov <sshtylyov@...mvista.com>
Cc:	Tejun Heo <htejun@...il.com>, linux-ide@...r.kernel.org,
	gregkh@...e.de, linux-kernel@...r.kernel.org,
	linuxppc-dev@...abs.org, jgarzik@...ox.com,
	alan@...rguk.ukuu.org.uk
Subject: Re: [PATCH 6/13] devres: implement managed iomap interface


On Apr 10, 2008, at 1:24 PM, Sergei Shtylyov wrote:
> Kumar Gala wrote:
>
>>>>>>  Those functions are going to break on 32-bit platforms with   
>>>>>> extended physical address (well, that's starting with Pentiums   
>>>>>> which had 36-bit PAE :-) AND devices mapped beyond 4 GB (e.g.   
>>>>>> PowerPC 44x).  You should have used resource_size_t for the   
>>>>>> 'offset' parameter. As this most probably means that libata is   
>>>>>> broken on such platforms, I'm going to submit a patch...
>
>>>>  It's broken with drivers using MMIO, I meant to say.
>
>>>  Oops, I meant PCI drivers here, at least for the time being. And   
>>> it looks like that was a false alarm. :-]
>
>>>>> Yeah, right please go ahead.  But I wonder whether any BIOS was   
>>>>> actually crazy enough to map mmio region above 4G on 32bit  
>>>>> machine.
>
>>>>  This is a *hardware* mapping on some non-x86 platforms (like  
>>>> PPC  44x or MIPS Alchemy). The arch/ppc/ and arch/mips/ kernels  
>>>> have  special hooks called from ioremap() which help create an  
>>>> illusion  that the PCI memory space on such platforms (not only  
>>>> it) is mapped  below 4 GB; arch/powerpc/ kernel doesn't do this  
>>>> anymore -- hence  this newly encountered issue.
>
>>>  I thought that pcim_iomap() used devm_ioremap() or something --   
>>> which of course turned to be wrong. devm_ioremap() alone is yet  
>>> safe  since there are no users for it amongst PPC 44x platform  
>>> device  drivers...
>
>> but there is no reason not to make it work properly.  For example  
>> I  believe libata uses devm_* and the fsl SATA driver (non-PCI)  
>> will need  to work in cases similar to the 44x.
>
>   Well, as for sata_fsl, it calls of_iomap() which does The Right  
> Thing.

Fair, but I don't see why we should introduce new APIs that are  
already "broken".  We went through a lot of effort to clean up and  
introduce resource_t (and clearly still have some bugs) for the >32- 
bit physical address problem.

- k
--
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