Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1595314

Re: [PATCH] x86, kasan: add KASAN checks to atomic operations

From Mark Rutland <mark.rutland@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] x86, kasan: add KASAN checks to atomic operations
Date 2017-03-08 17:00 +0100
Message-ID <tiMan-bQ-35@gated-at.bofh.it> (permalink)
References (5 earlier) <tiLHj-8qM-7@gated-at.bofh.it> <tiLHj-8qM-9@gated-at.bofh.it> <tiLHj-8qM-5@gated-at.bofh.it> <tiM0G-86-9@gated-at.bofh.it> <tiM0G-86-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Mar 08, 2017 at 04:45:58PM +0100, Dmitry Vyukov wrote:
> On Wed, Mar 8, 2017 at 4:43 PM, Mark Rutland <mark.rutland@arm.com> wrote:
> > On Wed, Mar 08, 2017 at 04:27:11PM +0100, Dmitry Vyukov wrote:
> >> On Wed, Mar 8, 2017 at 4:20 PM, Mark Rutland <mark.rutland@arm.com> wrote:
> >> > As in my other reply, I'd prefer that we wrapped the (arch-specific)
> >> > atomic implementations such that we can instrument them explicitly in a
> >> > core header. That means that the implementation and semantics of the
> >> > atomics don't change at all.
> >> >
> >> > Note that we could initially do this just for x86 and arm64), e.g. by
> >> > having those explicitly include an <asm-generic/atomic-instrumented.h>
> >> > at the end of their <asm/atomic.h>.
> >>
> >> How exactly do you want to do this incrementally?
> >> I don't feel ready to shuffle all archs, but doing x86 in one patch
> >> and then arm64 in another looks tractable.
> >
> > I guess we'd have three patches: one adding the header and any core
> > infrastructure, followed by separate patches migrating arm64 and x86
> > over.
> 
> But if we add e.g. atomic_read() which forwards to arch_atomic_read()
> to <linux/atomic.h>, it will break all archs that don't rename its
> atomic_read() to arch_atomic_read().

... as above, that'd be handled by placing this in an
<asm-generic/atomic-instrumented.h> file, that we only include at the
end of the arch implementation.

So we'd only include that on arm64 and x86, without needing to change
the names elsewhere.

Thanks,
Mark.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86, kasan: add KASAN checks to atomic operations Dmitry Vyukov <dvyukov@google.com> - 2017-03-06 14:00 +0100
  Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Dmitry Vyukov <dvyukov@google.com> - 2017-03-06 14:00 +0100
    Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Peter Zijlstra <peterz@infradead.org> - 2017-03-06 14:30 +0100
      Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Peter Zijlstra <peterz@infradead.org> - 2017-03-06 14:50 +0100
        Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Dmitry Vyukov <dvyukov@google.com> - 2017-03-06 15:30 +0100
          Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Peter Zijlstra <peterz@infradead.org> - 2017-03-06 16:40 +0100
          Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Peter Zijlstra <peterz@infradead.org> - 2017-03-06 16:50 +0100
            Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Mark Rutland <mark.rutland@arm.com> - 2017-03-06 17:20 +0100
          Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Mark Rutland <mark.rutland@arm.com> - 2017-03-06 17:40 +0100
            Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Dmitry Vyukov <dvyukov@google.com> - 2017-03-06 17:40 +0100
              Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Mark Rutland <mark.rutland@arm.com> - 2017-03-06 18:30 +0100
            Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Peter Zijlstra <peterz@infradead.org> - 2017-03-06 22:10 +0100
              Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Dmitry Vyukov <dvyukov@google.com> - 2017-03-08 16:30 +0100
                Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Dmitry Vyukov <dvyukov@google.com> - 2017-03-08 16:50 +0100
                Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Mark Rutland <mark.rutland@arm.com> - 2017-03-08 17:00 +0100
                Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Mark Rutland <mark.rutland@arm.com> - 2017-03-08 16:50 +0100
              Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Mark Rutland <mark.rutland@arm.com> - 2017-03-08 16:40 +0100
                Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Will Deacon <will.deacon@arm.com> - 2017-03-08 19:50 +0100
              Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Dmitry Vyukov <dvyukov@google.com> - 2017-03-08 17:30 +0100

csiph-web