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] [day] [month] [year] [list]
Date:   Sat, 23 Jul 2022 06:42:57 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Justin Stitt <justinstitt@...gle.com>, ndesaulniers@...gle.com
CC:     arnd@...db.de, gregkh@...uxfoundation.org, justinstitt@...gle.com,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
        nathan@...nel.org, trix@...hat.com
Subject: Re: [PATCH v2] drivers: lkdtm: fix clang -Wformat warning



On July 21, 2022 2:57:06 PM PDT, Justin Stitt <justinstitt@...gle.com> wrote:
>When building with Clang we encounter the following warning
>(ARCH=hexagon + CONFIG_FRAME_WARN=0):
>| ../drivers/misc/lkdtm/bugs.c:107:3: error: format specifies type
>| 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
>|                 REC_STACK_SIZE, recur_count);
>|                 ^~~~~~~~~~~~~~
>
>Cast REC_STACK_SIZE to `unsigned long` to match format specifier `%lu`
>as well as maintain symmetry with `#define REC_STACK_SIZE
>(_AC(CONFIG_FRAME_WARN, UL) / 2)`.
>
>Link: https://github.com/ClangBuiltLinux/linux/issues/378
>Reported-by: Nathan Chancellor <nathan@...nel.org>
>Suggested-by: Nathan Chancellor <nathan@...nel.org>
>Suggested-by: Nick Desaulniers <ndesaulniers@...gle.com>
>Signed-off-by: Justin Stitt <justinstitt@...gle.com>

Thanks!

Acked-by: Kees Cook <keescook@...omium.org>
Fixes: 24cccab42c419 ("lkdtm/bugs: Adjust recursion test to avoid elision")


-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ