[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87wo5f23tr.fsf@nanos.tec.linutronix.de>
Date: Wed, 13 May 2020 18:32:32 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: David Laight <David.Laight@...LAB.COM>,
'Will Deacon' <will@...nel.org>,
Peter Zijlstra <peterz@...radead.org>
Cc: Marco Elver <elver@...gle.com>,
LKML <linux-kernel@...r.kernel.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
Ingo Molnar <mingo@...nel.org>,
Dmitry Vyukov <dvyukov@...gle.com>
Subject: RE: [PATCH v5 00/18] Rework READ_ONCE() to improve codegen
David Laight <David.Laight@...LAB.COM> writes:
> From: Will Deacon
>> Sent: 13 May 2020 13:40
>> On Wed, May 13, 2020 at 02:32:43PM +0200, Peter Zijlstra wrote:
>> > On Wed, May 13, 2020 at 01:48:41PM +0200, Marco Elver wrote:
>> >
>> > > Disabling most instrumentation for arch/x86 is reasonable. Also fine
>> > > with the __READ_ONCE/__WRITE_ONCE changes (your improved
>> > > compiler-friendlier version).
>> > >
>> > > We likely can't have both: still instrument __READ_ONCE/__WRITE_ONCE
>> > > (as Will suggested) *and* avoid double-instrumentation in arch_atomic.
>> > > If most use-cases of __READ_ONCE/__WRITE_ONCE are likely to use
>> > > data_race() or KCSAN_SANITIZE := n anyway, I'd say it's reasonable for
>> > > now.
>>
>> I agree that Peter's patch is the right thing to do for now. I was hoping we
>> could instrument __{READ,WRITE}_ONCE(), but that we before I realised that
>> __no_sanitize_or_inline doesn't seem to do anything.
>
> Could something be done that put the addresses of the instructions
> into a separate segment and have KASAN check that table before
> reporting an actual error?
That still does not solve the problem that the compiler adds calls into
k*san which we need to prevent in the first place.
Thanks,
tglx
Powered by blists - more mailing lists