From: Sasha Levin <sasha.levin@oracle.com>
To: Peter Zijlstra <peterz@infradead.org>,
Alfredo Alvarez Fernandez <alfredoalvarezfernandez@gmail.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] tools/liblockdep: add userspace version of READ_ONCE
Date: Tue, 16 Feb 2016 11:37:30 -0500 [thread overview]
Message-ID: <56C3504A.5040301@oracle.com> (raw)
In-Reply-To: <20160211151610.GL6357@twins.programming.kicks-ass.net>
On 02/11/2016 10:16 AM, Peter Zijlstra wrote:
> On Thu, Feb 11, 2016 at 12:33:30AM +0100, Alfredo Alvarez Fernandez wrote:
>> From: Alfredo Alvarez Fernandez <alfredoalvarezfernandez@gmail.com>
>>
>> This was added to the kernel code in 1658d35ead5d ("list: Use
>> READ_ONCE() when testing for empty lists")
>> There's nothing special we need to do about it in userspace.
>>
>> Signed-off-by: Alfredo Alvarez Fernandez <alfredoalvarezfernandez@gmail.com>
>> ---
>> tools/lib/lockdep/uinclude/linux/compiler.h | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/tools/lib/lockdep/uinclude/linux/compiler.h b/tools/lib/lockdep/uinclude/linux/compiler.h
>> index 6386dc3..fd3e56a 100644
>> --- a/tools/lib/lockdep/uinclude/linux/compiler.h
>> +++ b/tools/lib/lockdep/uinclude/linux/compiler.h
>> @@ -3,6 +3,7 @@
>>
>> #define __used __attribute__((__unused__))
>> #define unlikely
>> +#define READ_ONCE(x) (x)
>> #define WRITE_ONCE(x, val) x=(val)
>
> I would argue we'd still very much want the volatile cast for both READ
> and WRITE_ONCE().
>
> Why do these things have different semantics between user and kernel
> space?
You're right. I'll send a patch.
Thanks,
Sasha
next prev parent reply other threads:[~2016-02-16 16:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 23:33 [PATCH 0/3] lockdep: liblockdep: Prevent chain_key collisions Alfredo Alvarez Fernandez
2016-02-10 23:33 ` [PATCH 1/3] tools/liblockdep: add userspace version of READ_ONCE Alfredo Alvarez Fernandez
2016-02-11 15:16 ` Peter Zijlstra
2016-02-16 16:37 ` Sasha Levin [this message]
2016-02-10 23:33 ` [PATCH 2/3] tools/liblockdep: add tests Alfredo Alvarez Fernandez
2016-02-10 23:33 ` [PATCH 3/3] lockdep: prevent chain_key collisions Alfredo Alvarez Fernandez
2016-02-17 8:38 ` Ingo Molnar
2016-02-19 6:48 ` [PATCH v2 0/3] lockdep: liblockdep: Prevent " Alfredo Alvarez Fernandez
2016-02-19 6:48 ` [PATCH v2 1/3] tools/liblockdep: add userspace version of READ_ONCE Alfredo Alvarez Fernandez
2016-02-29 11:22 ` [tip:locking/core] tools/lib/lockdep: Add userspace version of READ_ONCE() tip-bot for Alfredo Alvarez Fernandez
2016-02-19 6:48 ` [PATCH v2 2/3] tools/liblockdep: add tests Alfredo Alvarez Fernandez
2016-02-29 11:23 ` [tip:locking/core] tools/lib/lockdep: Add tests for AA and ABBA locking tip-bot for Alfredo Alvarez Fernandez
2016-02-19 6:48 ` [PATCH v2 3/3] lockdep: prevent and detect chain_key collisions Alfredo Alvarez Fernandez
2016-02-29 11:24 ` [tip:locking/core] locking/lockdep: Detect " tip-bot for Ingo Molnar
2016-02-29 11:24 ` [tip:locking/core] locking/lockdep: Prevent " tip-bot for Alfredo Alvarez Fernandez
2016-02-16 16:38 ` [PATCH 0/3] lockdep: liblockdep: " Sasha Levin
2016-02-16 17:22 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56C3504A.5040301@oracle.com \
--to=sasha.levin@oracle.com \
--cc=alfredoalvarezfernandez@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome