lkml.org 
[lkml]   [2012]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Memory corruption due to word sharing
On 02/01/2012 02:09 PM, Linus Torvalds wrote:
> We have a lot of code, there's still a lot of situations left where
> bitfields are just really convenient.

Or even just s/convenient/ingrained habit/ As much as I try to avoid
bitfields, engineers writing vendor drivers love to lay out their
hardware structures using bitfields, leading to such crapola as

#ifdef little endian
a bunch of bitfields, LE arrangement
#else
bitfields, now in BE arrangement
#endif

This crops up again and again in drivers :/

Jeff




\
 
 \ /
  Last update: 2012-02-02 16:53    [W:0.073 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site