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


Groups > linux.kernel > #1425272

Re: [PATCHv3] kcov: reject open when kernel not instrumented

From Dmitry Vyukov <dvyukov@google.com>
Newsgroups linux.kernel
Subject Re: [PATCHv3] kcov: reject open when kernel not instrumented
Date 2016-06-17 18:00 +0200
Message-ID <rL4lA-8sx-35@gated-at.bofh.it> (permalink)
References <rKYpQ-4Lt-13@gated-at.bofh.it> <rL4bU-8nW-7@gated-at.bofh.it> <rL4bV-8nW-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jun 17, 2016 at 5:48 PM, Mark Rutland <mark.rutland@arm.com> wrote:
> On Fri, Jun 17, 2016 at 08:42:28AM -0700, Kees Cook wrote:
>> On Fri, Jun 17, 2016 at 2:39 AM, Mark Rutland <mark.rutland@arm.com> wrote:
>> > If the toolchain does not support -fsanitize-coverage=trace-pc, we blat
>> > this option from CFLAGS_KCOV, and build the kernel without
>> > instrumentation, even if CONFIG_KCOV was selected. However, we still
>> > build the rest of the kcov infrastructure, and expose a kcov file under
>> > debugfs. This can be confusing, as the kernel will appear to support
>> > kcov, yet will never manage to sample any trace PC values. While we do
>> > note this fact at build time, this may be missed, and a user may not
>> > have access to build logs.
>>
>> Do you want to refuse to build if the compiler doesn't support the
>> flag?
>
> I would also be happy with that, so it's up to Alexander and Dmitry.
>
>> I finally figured out how to do this, I think, for
>> -fstack-protector:
>>
>> http://git.kernel.org/cgit/linux/kernel/git/kees/linux.git/commit/?h=kbuild/stackprotector&id=600c1bd5f8647a8470dc2fc5a8697e3eafb5fd52
>>
>> If you wanted, the CONFIG_KCOV test could live under the same
>> prepare-compiler-check target.
>
> Alexander, Dmitry, thoughts?


I did it initially for KCOV. I just reported a warning, and then
compiler errors on unknown flag. And it was submitted this way.
But then Andrew did:
http://www.spinics.net/lists/mm-commits/msg116008.html
I've seen other "unbreak allmodconfig" patches. This issue does not
affect my workflow, but it seems to be something that other people
care about. I.e. you can't even test that code builds without a
special compiler.

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


Thread

[PATCHv3] kcov: reject open when kernel not instrumented Mark Rutland <mark.rutland@arm.com> - 2016-06-17 11:40 +0200
  Re: [PATCHv3] kcov: reject open when kernel not instrumented Kees Cook <keescook@chromium.org> - 2016-06-17 17:50 +0200
    Re: [PATCHv3] kcov: reject open when kernel not instrumented Alexander Potapenko <glider@google.com> - 2016-06-17 17:50 +0200
      Re: [PATCHv3] kcov: reject open when kernel not instrumented Mark Rutland <mark.rutland@arm.com> - 2016-06-17 18:00 +0200
    Re: [PATCHv3] kcov: reject open when kernel not instrumented Mark Rutland <mark.rutland@arm.com> - 2016-06-17 17:50 +0200
      Re: [PATCHv3] kcov: reject open when kernel not instrumented Dmitry Vyukov <dvyukov@google.com> - 2016-06-17 18:00 +0200

csiph-web