[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6e5b57f59ca6420489d65392a1e8dbc8@AcuMS.aculab.com>
Date: Mon, 30 Jul 2018 08:59:01 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Pavel Machek' <pavel@....cz>, Kees Cook <keescook@...omium.org>
CC: "David S. Miller" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Salvatore Mesoraca <s.mesoraca16@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Andrew Lunn <andrew@...n.ch>
Subject: RE: [PATCH v2] net: dsa: Remove VLA usage
From: Pavel Machek
> Sent: 29 July 2018 12:40
...
> > > + unsigned long *bitmap;
> > > + unsigned long _bitmap;
> >
> > This looks rather confusing. _bitmap -> bitmap_data? bitmap_bits?
>
> Actually, AFAICT that long is not used as a long, but as array of
> bits. So maybe char bitmap_data[8] would be more appropriate?
Unfortunately the 'bitmap' functions are defined to work in a
specific way on unsigned long[].
This means, for example, that they can't use the x86 'bit' instructions.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists