[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJHCu1LmixGLhpsp39yxcU=XEzWARZyYjYPAz5R=sG2YK=QHMg@mail.gmail.com>
Date: Sun, 18 Mar 2018 15:08:01 +0100
From: Salvatore Mesoraca <s.mesoraca16@...il.com>
To: David Laight <David.Laight@...lab.com>
Cc: Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Kernel Hardening <kernel-hardening@...ts.openwall.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] net: dsa: drop some VLAs in switch.c
2018-03-14 13:48 GMT+01:00 Salvatore Mesoraca <s.mesoraca16@...il.com>:
> 2018-03-14 12:24 GMT+01:00 David Laight <David.Laight@...lab.com>:
>> Isn't using DECLARE_BITMAP() completely OTT when the maximum size is less
>> than the number of bits in a word?
>
> It allocates ceiling(size/8) "unsigned long"s, so yes.
Actually I meant ceiling(size/8/sizeof(unsigned long))
I'm sorry for the typo.
Salvatore
Powered by blists - more mailing lists