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]
Date:   Mon, 16 May 2022 14:35:45 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Kees Cook <keescook@...omium.org>,
        Nathan Chancellor <nathan@...nel.org>
Cc:     kernel test robot <lkp@...el.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Vitor Massaru Iha <vitor@...saru.org>,
        "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        Daniel Latypov <dlatypov@...gle.com>,
        linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] lib: overflow: Always build 64-bit test cases

On Wed, May 11, 2022 at 10:45 AM Kees Cook <keescook@...omium.org> wrote:
>
> There shouldn't be a reason to not build the 64-bit test cases on 32-bit
> systems; the types exist there too. Remove the #ifdefs.

I think this is breaking 32b ARM for clang-13 and older?
https://github.com/ClangBuiltLinux/linux/issues/1636

>
> Reported-by: kernel test robot <lkp@...el.com>
> Link: https://lore.kernel.org/lkml/202205110324.7GrtxG8u-lkp@intel.com
> Fixes: 455a35a6cdb6 ("lib: add runtime test of check_*_overflow functions")
> Cc: Rasmus Villemoes <linux@...musvillemoes.dk>
> Cc: Vitor Massaru Iha <vitor@...saru.org>
> Cc: "Gustavo A. R. Silva" <gustavoars@...nel.org>
> Cc: Daniel Latypov <dlatypov@...gle.com>
> Signed-off-by: Kees Cook <keescook@...omium.org>
> ---
>  lib/overflow_kunit.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/lib/overflow_kunit.c b/lib/overflow_kunit.c
> index 475f0c064bf6..ac37bb543476 100644
> --- a/lib/overflow_kunit.c
> +++ b/lib/overflow_kunit.c
> @@ -255,10 +255,8 @@ DEFINE_TEST_FUNC(u16, "%d");
>  DEFINE_TEST_FUNC(s16, "%d");
>  DEFINE_TEST_FUNC(u32, "%u");
>  DEFINE_TEST_FUNC(s32, "%d");
> -#if BITS_PER_LONG == 64
>  DEFINE_TEST_FUNC(u64, "%llu");
>  DEFINE_TEST_FUNC(s64, "%lld");
> -#endif
>
>  static void overflow_shift_test(struct kunit *test)
>  {
> @@ -650,10 +648,8 @@ static struct kunit_case overflow_test_cases[] = {
>         KUNIT_CASE(s16_overflow_test),
>         KUNIT_CASE(u32_overflow_test),
>         KUNIT_CASE(s32_overflow_test),
> -#if BITS_PER_LONG == 64
>         KUNIT_CASE(u64_overflow_test),
>         KUNIT_CASE(s64_overflow_test),
> -#endif
>         KUNIT_CASE(overflow_shift_test),
>         KUNIT_CASE(overflow_allocation_test),
>         KUNIT_CASE(overflow_size_helpers_test),
> --
> 2.32.0
>


-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ