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


Groups > linux.kernel > #1612090

Re: [PATCH 7/8] asm-generic: add KASAN instrumentation to atomic operations

From Mark Rutland <mark.rutland@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH 7/8] asm-generic: add KASAN instrumentation to atomic operations
Date 2017-03-29 18:00 +0200
Message-ID <tqoaS-AU-19@gated-at.bofh.it> (permalink)
References <tq20H-1Mi-39@gated-at.bofh.it> <tq20I-1Mi-65@gated-at.bofh.it> <tqmsq-7ZU-21@gated-at.bofh.it> <tqoaS-AU-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Mar 29, 2017 at 05:52:43PM +0200, Dmitry Vyukov wrote:
> On Wed, Mar 29, 2017 at 4:00 PM, Mark Rutland <mark.rutland@arm.com> wrote:
> > On Tue, Mar 28, 2017 at 06:15:44PM +0200, Dmitry Vyukov wrote:
> >> KASAN uses compiler instrumentation to intercept all memory accesses.
> >> But it does not see memory accesses done in assembly code.
> >> One notable user of assembly code is atomic operations. Frequently,
> >> for example, an atomic reference decrement is the last access to an
> >> object and a good candidate for a racy use-after-free.
> >>
> >> Add manual KASAN checks to atomic operations.
> >>
> >> Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
> >> Cc: Mark Rutland <mark.rutland@arm.com>
> >> Cc: Peter Zijlstra <peterz@infradead.org>
> >> Cc: Will Deacon <will.deacon@arm.com>,
> >> Cc: Andrew Morton <akpm@linux-foundation.org>,
> >> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>,
> >> Cc: Ingo Molnar <mingo@redhat.com>,
> >> Cc: kasan-dev@googlegroups.com
> >> Cc: linux-mm@kvack.org
> >> Cc: linux-kernel@vger.kernel.org
> >> Cc: x86@kernel.org
> >
> > FWIW, I think that structuring the file this way will make it easier to
> > add the {acquire,release,relaxed} variants (as arm64 will need),
> > so this looks good to me.
> >
> > As a heads-up, I wanted to have a go at that, but I wasn't able to apply
> > patch two onwards on v4.11-rc{3,4} or next-20170329. I was not able to
> > cleanly revert the instrumentation patches currently in next-20170329,
> > since other patches built atop of them.
> 
> I based it on git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
> locking/core

Ah; I should have guessed. ;)

Thanks for the pointer!  I'll give that a go shortly.

Thanks,
Mark.

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


Thread

[PATCH 0/8] x86, kasan: add KASAN checks to atomic operations Dmitry Vyukov <dvyukov@google.com> - 2017-03-28 18:20 +0200
  [PATCH 8/8] asm-generic, x86: add comments for atomic instrumentation Dmitry Vyukov <dvyukov@google.com> - 2017-03-28 18:20 +0200
  [PATCH 3/8] x86: use long long for 64-bit atomic ops Dmitry Vyukov <dvyukov@google.com> - 2017-03-28 18:20 +0200
    Re: [PATCH 3/8] x86: use long long for 64-bit atomic ops Matthew Wilcox <willy@infradead.org> - 2017-03-28 23:40 +0200
  [PATCH 7/8] asm-generic: add KASAN instrumentation to atomic operations Dmitry Vyukov <dvyukov@google.com> - 2017-03-28 18:20 +0200
    Re: [PATCH 7/8] asm-generic: add KASAN instrumentation to atomic  operations Mark Rutland <mark.rutland@arm.com> - 2017-03-29 16:10 +0200
      Re: [PATCH 7/8] asm-generic: add KASAN instrumentation to atomic  operations Mark Rutland <mark.rutland@arm.com> - 2017-03-29 18:00 +0200
      Re: [PATCH 7/8] asm-generic: add KASAN instrumentation to atomic operations Dmitry Vyukov <dvyukov@google.com> - 2017-03-29 18:00 +0200
  Re: [PATCH 0/8] x86, kasan: add KASAN checks to atomic operations Dmitry Vyukov <dvyukov@google.com> - 2017-03-28 18:30 +0200

csiph-web