lkml.org 
[lkml]   [2015]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [tip:locking/urgent] compiler, atomics: Provide READ_ONCE_NOCHECK ()
On Wed, Oct 14, 2015 at 9:20 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Wed, Oct 14, 2015 at 06:18:58PM +0200, Dmitry Vyukov wrote:
>>
>> Well, if another thread writes it byte-by-byte, it pretty much does
>> not matter how you read it.
>> Note that I said "at least one access is not atomic". If both are
>> atomic, then this is, of course, legal. And KTSAN considers
>> READ/WRITE_ONCE as atomic operations.
>
> OK, then I'm confused on what exactly the annotation does, but less
> worried.

The annotation says "hey, KASAN (etc), don't worry if you think that
the memory being accessed is out of bounds". Presumably KTSAN is okay
with the operation because it's atomic, but KASAN dislikes it because
it's accessing memory that is out of bounds from the perspective of a
C program.

I'd still rather find a way to just delete get_wchan, but whatever.

--Andy


\
 
 \ /
  Last update: 2015-10-14 18:41    [W:0.084 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site