Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 11 Nov 2016 21:05:00 +0100
From: Peter Zijlstra <>
To: Mark Rutland <>
Cc:, Will Deacon <>,
	Greg KH <>,
	David Windsor <>,
	Elena Reshetova <>,
	Arnd Bergmann <>, Thomas Gleixner <>,
	Ingo Molnar <>,
	"H. Peter Anvin" <>
Subject: Re: Re: [RFC v4 PATCH 00/13] HARDENED_ATOMIC

On Fri, Nov 11, 2016 at 06:31:18PM +0000, Mark Rutland wrote:
> On Fri, Nov 11, 2016 at 09:43:00AM -0800, Kees Cook wrote:
> > (And now Greg went missing from the reply? Re-added...)
> > 
> > On Thu, Nov 10, 2016 at 11:50 PM, David Windsor <> wrote:
> > > On Thu, Nov 10, 2016 at 6:38 PM, Greg KH <> wrote:
> > >> On Thu, Nov 10, 2016 at 03:15:44PM -0800, Kees Cook wrote:
> > As far as refcount_t is concerned, I worry using cmpxchg will be too
> > costly, but it's worth benchmarking.
> If that does turn out to be a problem, we could allow architectures to
> provide their own implementations of the API, with a generic fallback
> otherwise, as we do for other features.

Note that only LL/SC archs can do somewhat better. x86/s390/sparc64 etc
al must use cmpxchg, there's just no other way to get an actual atomic
inc/dec with over/under-flow detection.

The proposed x86 implementation is non-atomic and therefore a complete

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.