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:	Fri, 24 Jun 2016 17:45:32 +0000
From:	KY Srinivasan <kys@...rosoft.com>
To:	Davidlohr Bueso <dave@...olabs.net>,
	James Bottomley <James.Bottomley@...senPartnership.com>
CC:	"peterz@...radead.org" <peterz@...radead.org>,
	"mingo@...nel.org" <mingo@...nel.org>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"cw00.choi@...sung.com" <cw00.choi@...sung.com>,
	"dougthompson@...ssion.com" <dougthompson@...ssion.com>,
	"bp@...en8.de" <bp@...en8.de>,
	"mchehab@....samsung.com" <mchehab@....samsung.com>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"pfg@....com" <pfg@....com>, "jikos@...nel.org" <jikos@...nel.org>,
	"hans.verkuil@...co.com" <hans.verkuil@...co.com>,
	"awalls@...metrocast.net" <awalls@...metrocast.net>,
	"dledford@...hat.com" <dledford@...hat.com>,
	"sean.hefty@...el.com" <sean.hefty@...el.com>,
	"heiko.carstens@...ibm.com" <heiko.carstens@...ibm.com>,
	"sumit.semwal@...aro.org" <sumit.semwal@...aro.org>,
	"schwidefsky@...ibm.com" <schwidefsky@...ibm.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH -tip 00/12] locking/atomics: Add and use inc,dec calls for
 FETCH-OP flavors



> -----Original Message-----
> From: Davidlohr Bueso [mailto:dave@...olabs.net]
> Sent: Friday, June 24, 2016 10:30 AM
> To: James Bottomley <James.Bottomley@...senPartnership.com>
> Cc: peterz@...radead.org; mingo@...nel.org; davem@...emloft.net;
> cw00.choi@...sung.com; dougthompson@...ssion.com; bp@...en8.de;
> mchehab@....samsung.com; gregkh@...uxfoundation.org; pfg@....com;
> jikos@...nel.org; hans.verkuil@...co.com; awalls@...metrocast.net;
> dledford@...hat.com; sean.hefty@...el.com; KY Srinivasan
> <kys@...rosoft.com>; heiko.carstens@...ibm.com;
> sumit.semwal@...aro.org; schwidefsky@...ibm.com; linux-
> kernel@...r.kernel.org
> Subject: Re: [PATCH -tip 00/12] locking/atomics: Add and use inc,dec calls for
> FETCH-OP flavors
> 
> On Fri, 24 Jun 2016, James Bottomley wrote:
> 
> >On Mon, 2016-06-20 at 13:05 -0700, Davidlohr Bueso wrote:
> >> Hi,
> >>
> >> The series is really straightforward and based on Peter's work that
> >> introduces[1] the atomic_fetch_$op machinery. Only patch 1 implements
> >> the actual atomic_fetch_{inc,dec} calls based on
> >> atomic_fetch_{add,sub}.
> >
> >Could I just ask why?  atomic_inc_return(x) - 1 seems a reasonable
> >thing to do to me.
> 
> For one restoring the old state like that can be racy and looses the notion of
> atomicity. The new family of atomic_fetch_$ops also better express the
How so? Can you expand on the racy part. The subtraction is done on a local copy of
the value.

K. Y

> purpose of the call imo. Finally, the added machinery (considering it came from
> fetch_op() NOHZ needs), was mainly suggested by Linus (although yes, we
> don't have users for all the calls):
> https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2flkml.org%
> 2flkml%2f2016%2f3%2f15%2f352&data=01%7c01%7ckys%40microsoft.com%
> 7c5c7cfad67568440f6e2108d39c5546e0%7c72f988bf86f141af91ab2d7cd011
> db47%7c1&sdata=uZrdmvDCuTp%2bMNHAXzMPT68w%2bVGtvH2V99nUEBr6
> 1ro%3d.
> 
> Thanks,
> Davidlohr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ