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]
Date:   Wed, 04 Nov 2020 14:26:16 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Mike Galbraith <efault@....de>,
        Gratian Crisan <gratian.crisan@...com>,
        Peter Zijlstra <peterz@...radead.org>
Cc:     linux-kernel@...r.kernel.org, linux-rt-users@...r.kernel.org,
        Brandon Streiff <brandon.streiff@...com>,
        Ingo Molnar <mingo@...hat.com>,
        Darren Hart <dvhart@...radead.org>,
        James Minor <james.minor@...com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: Re: BUG_ON(!newowner) in fixup_pi_state_owner()

On Wed, Nov 04 2020 at 12:17, Thomas Gleixner wrote:
> On Wed, Nov 04 2020 at 11:24, Thomas Gleixner wrote:
>> On Wed, Nov 04 2020 at 08:42, Mike Galbraith wrote:
>>> On Wed, 2020-11-04 at 01:56 +0100, Mike Galbraith wrote:
>>> --- a/kernel/futex.c
>>> +++ b/kernel/futex.c
>>> @@ -2383,7 +2383,18 @@ static int fixup_pi_state_owner(u32 __us
>>>  		 * Since we just failed the trylock; there must be an owner.
>>>  		 */
>>>  		newowner = rt_mutex_owner(&pi_state->pi_mutex);
>>> -		BUG_ON(!newowner);
>>> +
>>> +		/*
>>> +		 * Why? Because I know what I'm doing with these beasts?  Nope,
>>> +		 * but what the hell, a busy restart loop let f_boosted become
>>> +		 * owner, so go for it. Box still boots, works, no longer makes
>>> +		 * boom with fbomb_v2, and as an added bonus, didn't even blow
>>> +		 * futextests all up.  Maybe it'll help... or not, we'll see.
>>> +		 */
>>> +		if (unlikely(!newowner)) {
>>> +			err = -EAGAIN;
>>> +			goto handle_err;
>>
>> Yes, that cures it, but does not really explain why newowner is
>> NULL. Lemme stare more.
>
> Aside of that it's going to create inconsistent state in the worst
> case. There is something really fishy in the trace Gratian provided....

Ok. With some more info added to the trace I could convince myself, that
Gratians trace is not so fishy at all and that Mike's fix is actually
the right thing to do.

I'll post that with a proper comment and changelog. Mike, can I add your
Signed-off-by to the thing?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ