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: <1365433142.2733.18.camel@fedora>
Date:	Mon, 08 Apr 2013 10:59:02 -0400
From:	Steven Rostedt <srostedt@...hat.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Vineet Gupta <Vineet.Gupta1@...opsys.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Christian Ruppert <christian.ruppert@...lis.com>,
	Pierrick Hascoet <pierrick.hascoet@...lis.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [PATCH] Gaurantee spinlocks implicit barrier for
 !PREEMPT_COUNT

On Mon, 2013-04-08 at 07:50 -0700, Linus Torvalds wrote:

> ---
>     diff --git a/include/linux/preempt.h b/include/linux/preempt.h
>     index 5a710b9c578e..465df1c13386 100644
>     --- a/include/linux/preempt.h
>     +++ b/include/linux/preempt.h
>     @@ -93,14 +93,17 @@ do { \
> 
>      #else /* !CONFIG_PREEMPT_COUNT */
> 
>     -#define preempt_disable() do { } while (0)
>     -#define sched_preempt_enable_no_resched() do { } while (0)
>     -#define preempt_enable_no_resched() do { } while (0)
>     -#define preempt_enable() do { } while (0)
>     -
>     -#define preempt_disable_notrace() do { } while (0)
>     -#define preempt_enable_no_resched_notrace() do { } while (0)
>     -#define preempt_enable_notrace() do { } while (0)
>     +/* This is only a barrier to other asms. Notably get_user/put_user */

Probably should add in the comment:

	" or anything else that can cause a hidden schedule. "

-- Steve

>     +#define asm_barrier() asm volatile("")
>     +
>     +#define preempt_disable() asm_barrier()
>     +#define sched_preempt_enable_no_resched() asm_barrier()
>     +#define preempt_enable_no_resched() asm_barrier()
>     +#define preempt_enable() asm_barrier()
>     +
>     +#define preempt_disable_notrace() asm_barrier()
>     +#define preempt_enable_no_resched_notrace() asm_barrier()
>     +#define preempt_enable_notrace() asm_barrier()
> 
>      #endif /* CONFIG_PREEMPT_COUNT */


--
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