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, 28 Jan 2009 18:00:49 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Arjan van de Ven <arjan@...radead.org>,
	Rusty Russell <rusty@...tcorp.com.au>, jens.axboe@...cle.com
Subject: Re: Buggy IPI and MTRR code on low memory

On Wed, 2009-01-28 at 11:56 -0500, Steven Rostedt wrote:
> On Wed, 28 Jan 2009, Peter Zijlstra wrote:
> 
> > On Wed, 2009-01-28 at 11:38 -0500, Steven Rostedt wrote:
> > 
> > > The problem is that if we use the stack, then we must wait for the 
> > > function to finish. But in the mtrr code, the called functions are waiting 
> > > for the caller to do something after the smp_call_function. Thus we 
> > > deadlock!
> > 
> > You'd have to 'fix' the regular fallback paths to use your scheme as
> > well.
> 
> Not sure what you mean by that. I booted just fine with the patch, and 
> forcing data to NULL. Although, I'm not saying that these should not be 
> fixed.

Yeah, I was being confused by:

> @@ -230,6 +242,20 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
>                         data = kmalloc(sizeof(*data), GFP_ATOMIC);
>                         if (data)
>                                 data->flags = CSD_FLAG_ALLOC;
> +                       else {
> +                               /*
> +                                * There exist callers that call
> +                                * functions that will wait on the caller
> +                                * to do something after calling this.
> +                                * This means we can not wait for the callee
> +                                * function to finish.
> +                                * Use the stack data but have the callee
> +                                * copy it and tell us we can continue
> +                                * before they call the function.
> +                                */
> +                               data = &d;
> +                               data->flags = CSD_FLAG_RELEASE;
> +                       }
>                 }
>                 if (!data) {
>                         data = &d;

that second !data test in there, thinking there was a fallback path
still relying on CSD_FLAG_WAIT.

It appears all is well indeed.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ