lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d1fded51-afee-70d8-9e15-9bfeba8b57c@inria.fr>
Date:   Sun, 6 Nov 2022 11:15:59 +0800 (+08)
From:   Julia Lawall <julia.lawall@...ia.fr>
To:     Steven Rostedt <rostedt@...dmis.org>
cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Stephen Boyd <sboyd@...nel.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Anna-Maria Gleixner <anna-maria@...utronix.de>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v4a 00/38] timers: Use timer_shutdown*() before freeing
 timers



On Sat, 5 Nov 2022, Steven Rostedt wrote:

> On Sun, 6 Nov 2022 11:05:14 +0800 (+08)
> Julia Lawall <julia.lawall@...ia.fr> wrote:
>
> > > Thinking that's what you meant (examples would be easier to understand,
> > > than descriptions). And it didn't cover the return case. Does it only
> > > cover gotos?
> > >
> > >   See drivers/net/wireless/intel/iwlwifi/mvm/sta.c for the false positive case:
> > >
> > > 	del_timer_sync(&baid_data->session_timer);
> > > [..]
> >
> > But there is a kfree_rcu(baid_data, rcu_head); right below.  So it looks
> > fine?
>
> D'oh! I think you are correct. I didn't trust the script and it appears
> that it was correct all along. The free was hidden in between the code
> and I only noticed the kfree() in the error path. I thought that was a
> bug in the script. :-/
>
> I guess there were no false positives then. To be sure, I'll write a
> script to find all that have a return or goto in between and see what
> it comes up with.
>
> I guess my original patch doesn't need any changes from the script.
> I'll look more.

You could also consider expression ptr; rather than identifier ptr; if ptr
can be eg x->y.  But if you have akready found all the calls with the
current script, then no need to be more general.

julia

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ