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: <CAFhGd8oRJG6Amrr8VxriXP11NgVPbPBdaKKWbuCSowSxrGEcMg@mail.gmail.com>
Date: Wed, 10 Apr 2024 16:28:19 -0700
From: Justin Stitt <justinstitt@...gle.com>
To: John Stultz <jstultz@...gle.com>
Cc: LKML <linux-kernel@...r.kernel.org>, Shuah Khan <shuah@...nel.org>, 
	Anna-Maria Behnsen <anna-maria@...utronix.de>, Frederic Weisbecker <frederic@...nel.org>, 
	Thomas Gleixner <tglx@...utronix.de>, Stephen Boyd <sboyd@...nel.org>, 
	Nathan Chancellor <nathan@...nel.org>, Nick Desaulniers <ndesaulniers@...gle.com>, 
	Bill Wendling <morbo@...gle.com>, Oleg Nesterov <oleg@...hat.com>, 
	Andrew Morton <akpm@...ux-foundation.org>, Edward Liaw <edliaw@...gle.com>, 
	Carlos Llamas <cmllamas@...gle.com>, kernel-team@...roid.com, 
	linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 1/3] selftests: timers: Fix posix_timers ksft_print_msg warning

On Wed, Apr 10, 2024 at 4:26 PM John Stultz <jstultz@...gle.com> wrote:
>
> After commit 6d029c25b71f ("selftests/timers/posix_timers:
> Reimplement check_timer_distribution()") I started seeing the
> following warning building with an older gcc:
>
> posix_timers.c:250:2: warning: format not a string literal and no format arguments [-Wformat-security]
>   250 |  ksft_print_msg(errmsg);
>       |  ^~~~~~~~~~~~~~
>
> Fix this up by changing it to ksft_print_msg("%s", errmsg)
>
> Cc: Shuah Khan <shuah@...nel.org>
> Cc: Anna-Maria Behnsen <anna-maria@...utronix.de>
> Cc: Frederic Weisbecker <frederic@...nel.org>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Stephen Boyd <sboyd@...nel.org>
> Cc: Nathan Chancellor <nathan@...nel.org>
> Cc: Nick Desaulniers <ndesaulniers@...gle.com>
> Cc: Bill Wendling <morbo@...gle.com>
> Cc: Justin Stitt <justinstitt@...gle.com>
> Cc: Oleg Nesterov <oleg@...hat.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Edward Liaw <edliaw@...gle.com>
> Cc: Carlos Llamas <cmllamas@...gle.com>
> Cc: kernel-team@...roid.com
> Cc: linux-kselftest@...r.kernel.org
> Fixes: 6d029c25b71f ("selftests/timers/posix_timers: Reimplement check_timer_distribution()")
> Signed-off-by: John Stultz <jstultz@...gle.com>

Yep, makes sense.

Acked-by: Justin Stitt <justinstitt@...gle.com>

> ---
>  tools/testing/selftests/timers/posix_timers.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/timers/posix_timers.c b/tools/testing/selftests/timers/posix_timers.c
> index d86a0e00711e..348f47176e0a 100644
> --- a/tools/testing/selftests/timers/posix_timers.c
> +++ b/tools/testing/selftests/timers/posix_timers.c
> @@ -247,7 +247,7 @@ static int check_timer_distribution(void)
>                 ksft_test_result_skip("check signal distribution (old kernel)\n");
>         return 0;
>  err:
> -       ksft_print_msg(errmsg);
> +       ksft_print_msg("%s", errmsg);
>         return -1;
>  }
>
> --
> 2.44.0.478.gd926399ef9-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ