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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221105203634.7e0b2e8e@rorschach.local.home>
Date:   Sat, 5 Nov 2022 20:36:34 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Julia Lawall <julia.lawall@...ia.fr>
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 Sun, 6 Nov 2022 07:08:48 +0800 (+08)
Julia Lawall <julia.lawall@...ia.fr> wrote:

> Various suggestions:
> 
> 1.  On your ... put when strict and then on a separate line put when !=
> ptr.  The when strict will get rid of the goto problem (usually a
> desirable feature, but not here) and the when != ptr will be sure that ptr
> is not used before the free.

You mean ptr->timer.function? because it's allowed to be touched. Only
this case is weird (and I believe I covered it).

Not sure what you mean by "put when strict" I added:

 ... when strict

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);
[..]
        return 0;

out_free:
        kfree(baid_data);
        return ret;
}

That "return 0" should make the match fail.

> 
> 2.  If you want to handle the initialization of the function field, then
> you can duplicate the rule and add the removal of that assignment in the
> first one.  This only seems worth it if it is a very common case.
> Otherwise, I would agree with Linus and just take care of it by hand
> later.

No, Linus wants the script to not touch the initialization case. That
is, currently, the script does the conversion (which also initializes
it), and the timer.function = NULL is just redundant.

What Linus wanted, was my script to do nothing in this case. But I
figured this part out.

> 
> 3. Running the rule three times seems to me like a reasonable choice.  Or
> you could duplicate the rule three times.  But that would be more script
> to read through.  If this is not a common case, though, you could probably
> also fix the one up later by hand.

Yeah, that's fine.

I'm just looking for how to avoid the goto / return case.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ