All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Justin Stitt <justinstitt@google.com>, ndesaulniers@google.com
Cc: arnd@arndb.de, gregkh@linuxfoundation.org,
	justinstitt@google.com, linux-kernel@vger.kernel.org,
	llvm@lists.linux.dev, nathan@kernel.org, trix@redhat.com
Subject: Re: [PATCH v2] drivers: lkdtm: fix clang -Wformat warning
Date: Sat, 23 Jul 2022 06:42:57 -0700	[thread overview]
Message-ID: <9306DFB1-1873-481F-898D-CE141D0C32A5@chromium.org> (raw)
In-Reply-To: <20220721215706.4153027-1-justinstitt@google.com>



On July 21, 2022 2:57:06 PM PDT, Justin Stitt <justinstitt@google.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@kernel.org>
>Suggested-by: Nathan Chancellor <nathan@kernel.org>
>Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
>Signed-off-by: Justin Stitt <justinstitt@google.com>

Thanks!

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


-- 
Kees Cook

      parent reply	other threads:[~2022-07-23 13:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21 21:20 [PATCH] drivers: lkdtm: fix clang -Wformat warning Justin Stitt
2022-07-21 21:34 ` Nathan Chancellor
2022-07-21 21:42 ` Nick Desaulniers
2022-07-21 21:57   ` [PATCH v2] " Justin Stitt
2022-07-21 22:05     ` Nathan Chancellor
2022-07-23 13:42     ` Kees Cook [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9306DFB1-1873-481F-898D-CE141D0C32A5@chromium.org \
    --to=keescook@chromium.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=justinstitt@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.