lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANpmjNM7Sca3YJQ7RK14e_pzB5Wq3_-VokLum6MpqKXq7ixzSQ@mail.gmail.com>
Date:   Sun, 16 Oct 2022 22:07:45 -0700
From:   Marco Elver <elver@...gle.com>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     dvyukov@...gle.com, kasan-dev@...glegroups.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kcsan: remove rng selftest

On Sun, 16 Oct 2022 at 21:43, Jason A. Donenfeld <Jason@...c4.com> wrote:
>
> The first test of the kcsan selftest appears to test if get_random_u32()
> returns two zeros in a row, and requires that it doesn't. This seems
> like a bogus critera. Remove it.
>
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>

Acked-by: Marco Elver <elver@...gle.com>

Looks pretty redundant at this point (I think some early version had
it because somehow I managed to run the test too early and wanted to
avoid that accidentally happening again).

> ---
>  kernel/kcsan/selftest.c | 8 --------
>  1 file changed, 8 deletions(-)
>
> diff --git a/kernel/kcsan/selftest.c b/kernel/kcsan/selftest.c
> index 00cdf8fa5693..1740ce389e7f 100644
> --- a/kernel/kcsan/selftest.c
> +++ b/kernel/kcsan/selftest.c
> @@ -22,13 +22,6 @@
>
>  #define ITERS_PER_TEST 2000
>
> -/* Test requirements. */
> -static bool __init test_requires(void)
> -{
> -       /* random should be initialized for the below tests */
> -       return get_random_u32() + get_random_u32() != 0;
> -}
> -
>  /*
>   * Test watchpoint encode and decode: check that encoding some access's info,
>   * and then subsequent decode preserves the access's info.
> @@ -259,7 +252,6 @@ static int __init kcsan_selftest(void)
>                         pr_err("selftest: " #do_test " failed");               \
>         } while (0)
>
> -       RUN_TEST(test_requires);
>         RUN_TEST(test_encode_decode);
>         RUN_TEST(test_matching_access);
>         RUN_TEST(test_barrier);
> --
> 2.37.3
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ