lkml.org 
[lkml]   [2020]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH 5/8] kcsan: Test support for compound instrumentation
    On Tue, Jul 21, 2020 at 12:30PM +0200, Marco Elver wrote:
    [...]
    > diff --git a/lib/Kconfig.kcsan b/lib/Kconfig.kcsan
    > index 3d282d51849b..cde5b62b0a01 100644
    > --- a/lib/Kconfig.kcsan
    > +++ b/lib/Kconfig.kcsan
    > @@ -40,6 +40,11 @@ menuconfig KCSAN
    >
    > if KCSAN
    >
    > +# Compiler capabilities that should not fail the test if they are unavailable.
    > +config CC_HAS_TSAN_COMPOUND_READ_BEFORE_WRITE
    > + def_bool (CC_IS_CLANG && $(cc-option,-fsanitize=thread -mllvm -tsan-compound-read-before-write=1)) || \
    > + (CC_IS_GCC && $(cc-option,-fsanitize=thread --param -tsan-compound-read-before-write=1))
    > +
    > config KCSAN_VERBOSE
    > bool "Show verbose reports with more information about system state"
    > depends on PROVE_LOCKING

    Ah, darn, one too many '-' on the CC_IS_GCC line.

    s/--param -tsan/--param tsan/

    Below is what this chunk should have been. Not
    that it matters right now, because GCC doesn't have this option
    (although I hope it gains it eventually).

    Paul, if you prefer v2 of the series with the fix, please let me know.
    (In case there aren't more things to fix.)

    Thanks,
    -- Marco

    ------ >8 ------

    diff --git a/lib/Kconfig.kcsan b/lib/Kconfig.kcsan
    index 3d282d51849b..f271ff5fbb5a 100644
    --- a/lib/Kconfig.kcsan
    +++ b/lib/Kconfig.kcsan
    @@ -40,6 +40,11 @@ menuconfig KCSAN

    if KCSAN

    +# Compiler capabilities that should not fail the test if they are unavailable.
    +config CC_HAS_TSAN_COMPOUND_READ_BEFORE_WRITE
    + def_bool (CC_IS_CLANG && $(cc-option,-fsanitize=thread -mllvm -tsan-compound-read-before-write=1)) || \
    + (CC_IS_GCC && $(cc-option,-fsanitize=thread --param tsan-compound-read-before-write=1))
    +
    config KCSAN_VERBOSE
    bool "Show verbose reports with more information about system state"
    depends on PROVE_LOCKING
    \
     
     \ /
      Last update: 2020-07-21 13:06    [W:4.322 / U:0.080 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site