[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGRGNgVqtj8SwP-gEt0ZnbgWzgVHjcY9Q=JyB6bf6d_m+8mvhA@mail.gmail.com>
Date: Thu, 28 Jan 2016 21:11:45 +1100
From: Julian Calaby <julian.calaby@...il.com>
To: Johannes Berg <johannes@...solutions.net>
Cc: Chris Bainbridge <chris.bainbridge@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-wireless <linux-wireless@...r.kernel.org>,
aryabinin@...tuozzo.com, Julia Lawall <Julia.Lawall@...6.fr>,
kernel-janitors@...r.kernel.org, Joe Perches <joe@...ches.com>
Subject: Re: [PATCH] net/mac80211/agg-rx.c: fix use of uninitialised values
Hi Johannes,
On Thu, Jan 28, 2016 at 8:48 PM, Johannes Berg
<johannes@...solutions.net> wrote:
> On Thu, 2016-01-28 at 10:27 +1100, Julian Calaby wrote:
>> I'd prefer to just set ->removed to false right after we set
>> ->auto_seq as that should be faster, however I don't know if
>> __ieee80211_start_rx_ba_session() is a fast path so I don't know if
>> this is saving anything.
>
> It's not supposed to be called frequently, no.
Then most of my commentary is moot.
I guess the argument comes down to do we zero everything or initialise
everything, and if speed isn't an issue, the former is better.
>> On another note, this is an error that should be pretty easy to spot.
>> Could any of the automated tools find cases where a struct containing
>> a bool variable is kmalloc'd and returned without assigning all the
>> bools?
>
> I think you'd quickly drown in false positives, since "return" isn't
> necessarily something that means it needs to have been fully
> initialized.
True.
Either way, I'm guessing that UBSAN will pick up a lot of similar bugs
and the output of that is probably a much smaller haystack to dig
through than just "every" kmalloc() call.
Thanks,
--
Julian Calaby
Email: julian.calaby@...il.com
Profile: http://www.google.com/profiles/julian.calaby/
Powered by blists - more mailing lists