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


Groups > linux.kernel > #1575479

Re: [PATCH 4/4] refcount: Report failures through CHECK_DATA_CORRUPTION

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH 4/4] refcount: Report failures through CHECK_DATA_CORRUPTION
Date 2017-02-07 09:40 +0100
Message-ID <t89tE-rN-27@gated-at.bofh.it> (permalink)
References (1 earlier) <t6VsK-7S-17@gated-at.bofh.it> <t7xeG-KE-15@gated-at.bofh.it> <t7Ezv-5tx-9@gated-at.bofh.it> <t7Njt-2A1-35@gated-at.bofh.it> <t7UNY-7sP-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Feb 06, 2017 at 08:54:38AM -0800, Kees Cook wrote:
> >
> > Like I wrote, ideally we'd end up using something like the x86 exception
> > table with a custom handler. Just no idea how to pull that off without
> > doing a full blown arch specific implementation, so I didn't go there
> > quite yet.
> 
> I haven't spent much time looking at the extable stuff. (Though
> coincidentally, I was poking at it for x86's test_nx stuff...) I
> thought there was a way to build arch-agnostic extables already?
> kernel/extable.c is unconditionally built-in, for example.

That doesn't seem to be of much use. It only contains section sort and
search functions.

Another problem for generic code would be to figure out what register
the relevant variable would live in at the time of exception. Here its
'obviously' EAX because that's what cmpxchg requires, but in generic
you'd need a means of querying GCC's register allocator at the exception
point and somehow using that information for the generation of the
exception handler.

AFAIK that's not something GCC can do.

> > and the handler is shared between all instances and can be as big and
> > fancy as we'd like.
> 
> I'll dig a bit to see what I can build. Can you add the lkdtm tests to
> the series, though? That should be fine as-is.

Yes, I did. I also did the 's/--help--/help/' and 's/#if/#ifdef/' thing.

Thanks!

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


Thread

[PATCH 0/4] refcount_t followups... Kees Cook <keescook@chromium.org> - 2017-02-04 00:30 +0100
  [PATCH 2/4] lkdtm: convert to refcount_t testing Kees Cook <keescook@chromium.org> - 2017-02-04 00:30 +0100
    [tip:locking/core] lkdtm: Convert to refcount_t testing tip-bot for Kees Cook <tipbot@zytor.com> - 2017-02-10 09:50 +0100
  [PATCH 3/4] bug: Switch data corruption check to __must_check Kees Cook <keescook@chromium.org> - 2017-02-04 00:30 +0100
  [PATCH 1/4] refcount_t: fix Kconfig help Kees Cook <keescook@chromium.org> - 2017-02-04 00:30 +0100
  [PATCH 4/4] refcount: Report failures through CHECK_DATA_CORRUPTION Kees Cook <keescook@chromium.org> - 2017-02-04 00:30 +0100
    Re: [PATCH 4/4] refcount: Report failures through  CHECK_DATA_CORRUPTION Peter Zijlstra <peterz@infradead.org> - 2017-02-05 16:50 +0100
      Re: [PATCH 4/4] refcount: Report failures through CHECK_DATA_CORRUPTION Kees Cook <keescook@chromium.org> - 2017-02-06 00:40 +0100
        Re: [PATCH 4/4] refcount: Report failures through  CHECK_DATA_CORRUPTION Peter Zijlstra <peterz@infradead.org> - 2017-02-06 10:00 +0100
          Re: [PATCH 4/4] refcount: Report failures through CHECK_DATA_CORRUPTION Kees Cook <keescook@chromium.org> - 2017-02-06 18:00 +0100
            Re: [PATCH 4/4] refcount: Report failures through  CHECK_DATA_CORRUPTION Peter Zijlstra <peterz@infradead.org> - 2017-02-07 09:40 +0100
              Re: [kernel-hardening] Re: [PATCH 4/4] refcount: Report failures  through CHECK_DATA_CORRUPTION Mark Rutland <mark.rutland@arm.com> - 2017-02-07 12:20 +0100
                Re: [kernel-hardening] Re: [PATCH 4/4] refcount: Report failures  through CHECK_DATA_CORRUPTION Peter Zijlstra <peterz@infradead.org> - 2017-02-07 13:40 +0100
                Re: [kernel-hardening] Re: [PATCH 4/4] refcount: Report failures  through CHECK_DATA_CORRUPTION Mark Rutland <mark.rutland@arm.com> - 2017-02-07 15:00 +0100
                Re: [kernel-hardening] Re: [PATCH 4/4] refcount: Report failures  through CHECK_DATA_CORRUPTION Peter Zijlstra <peterz@infradead.org> - 2017-02-07 16:10 +0100
                Re: [kernel-hardening] Re: [PATCH 4/4] refcount: Report failures  through CHECK_DATA_CORRUPTION Mark Rutland <mark.rutland@arm.com> - 2017-02-07 17:10 +0100
                Re: [kernel-hardening] Re: [PATCH 4/4] refcount: Report failures  through CHECK_DATA_CORRUPTION Peter Zijlstra <peterz@infradead.org> - 2017-02-07 18:40 +0100
                Re: [kernel-hardening] Re: [PATCH 4/4] refcount: Report failures  through CHECK_DATA_CORRUPTION Mark Rutland <mark.rutland@arm.com> - 2017-02-07 19:00 +0100
                Re: [kernel-hardening] Re: [PATCH 4/4] refcount: Report failures  through CHECK_DATA_CORRUPTION Peter Zijlstra <peterz@infradead.org> - 2017-02-08 10:20 +0100
                Re: [kernel-hardening] Re: [PATCH 4/4] refcount: Report failures  through CHECK_DATA_CORRUPTION Peter Zijlstra <peterz@infradead.org> - 2017-02-08 10:50 +0100
                Re: [kernel-hardening] Re: [PATCH 4/4] refcount: Report failures  through CHECK_DATA_CORRUPTION Mark Rutland <mark.rutland@arm.com> - 2017-02-08 16:00 +0100
                Re: [kernel-hardening] Re: [PATCH 4/4] refcount: Report failures  through CHECK_DATA_CORRUPTION Kees Cook <keescook@chromium.org> - 2017-02-08 22:30 +0100
                Re: [kernel-hardening] Re: [PATCH 4/4] refcount: Report failures  through CHECK_DATA_CORRUPTION Peter Zijlstra <peterz@infradead.org> - 2017-02-09 11:30 +0100
                Re: [kernel-hardening] Re: [PATCH 4/4] refcount: Report failures  through CHECK_DATA_CORRUPTION Kees Cook <keescook@chromium.org> - 2017-02-11 00:40 +0100

csiph-web