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: <Z8gfsd5V9wrPKkiA@pathway.suse.cz>
Date: Wed, 5 Mar 2025 10:56:01 +0100
From: Petr Mladek <pmladek@...e.com>
To: Tamir Duberstein <tamird@...il.com>
Cc: David Gow <davidgow@...gle.com>, Steven Rostedt <rostedt@...dmis.org>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Rasmus Villemoes <linux@...musvillemoes.dk>,
	Sergey Senozhatsky <senozhatsky@...omium.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Shuah Khan <shuah@...nel.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v8 1/4] scanf: implicate test line in failure messages

On Fri 2025-02-14 11:19:58, Tamir Duberstein wrote:
> This improves the failure output by pointing to the failing line at the
> top level of the test.
> 
> Signed-off-by: Tamir Duberstein <tamird@...il.com>
> ---
>  lib/test_scanf.c | 66 ++++++++++++++++++++++++++++----------------------------
>  1 file changed, 33 insertions(+), 33 deletions(-)
> 
> diff --git a/lib/test_scanf.c b/lib/test_scanf.c
> index 44f8508c9d88..d1664e0d0138 100644
> --- a/lib/test_scanf.c
> +++ b/lib/test_scanf.c
> @@ -24,12 +24,12 @@ static char *test_buffer __initdata;
>  static char *fmt_buffer __initdata;
>  static struct rnd_state rnd_state __initdata;
>  
> -typedef int (*check_fn)(const void *check_data, const char *string,
> -			const char *fmt, int n_args, va_list ap);
> +typedef int (*check_fn)(const char *file, const int line, const void *check_data,
> +			const char *string, const char *fmt, int n_args, va_list ap);
>  
> -static void __scanf(4, 6) __init
> -_test(check_fn fn, const void *check_data, const char *string, const char *fmt,
> -	int n_args, ...)
> +static void __scanf(6, 0) __init

This should be:

static void __scanf(6, 8) __init

The zero (0) is used when the parameters are passed via the va_list.
The value must be the position of the first parameter when they are passed
via the variable list of parameters, aka (...).

Otherwise, it triggers the warnings reported by the lkp@...el.com
kernel test robot, see
https://lore.kernel.org/r/202502160245.KUrryBJR-lkp@intel.com

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ