lkml.org 
[lkml]   [2012]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: new architectures, time_t __kernel_long_t
On 12/20/2012 08:57 PM, Al Viro wrote:
> On Wed, Nov 14, 2012 at 12:18:01PM +0000, Arnd Bergmann wrote:
>
>> The other types that are used as 64 bit on x32 are ino_t, nlink_t,
>> size_t, ssize_t, ptrdiff_t, and off_t.
>
> *Kernel-side* we should not give a damn about the userland nlink_t, period.
> Making it architecture-dependent had been a bad mistake that essentially
> made nlink_t useless for the kernel. That mistake had been fixed; please,
> do not bring it back. If some userland structure needs to include a field
> encoding nlink_t values, please use an explicitly-sized type when refering
> to it kernel-side.
>

We should never use userland types per se. We can use __kernel_*_t
typedefs to make the kernel headers neater if it makes sense, but that
is often not even necessary.

> The same should've been true for mode_t, but for historical reasons we
> are using umode_t for just about everything and IMO we should kill the
> last references to mode_t anywhere kernel-side (again, explicitly-sized
> types for userland st_mode and friends on the last few architectures
> still refering to mode_t there) and just rename umode_t to mode_t; I'm
> sick and tired of playing whack-a-mole with code using (arch-dependent)
> mode_t for kernel data. And no, it's not always harmless - we had rather
> ugly bugs based on that.
>



\
 
 \ /
  Last update: 2012-12-21 06:41    [W:0.171 / U:0.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site