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: <202501081357.BE10EC4403@keescook>
Date: Wed, 8 Jan 2025 13:57:08 -0800
From: Kees Cook <kees@...nel.org>
To: "Dmitry V. Levin" <ldv@...ace.io>
Cc: Shuah Khan <shuah@...nel.org>, Gabi Falk <gabifalk@....com>,
	linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] selftests: harness: fix printing of mismatch values in
 __EXPECT()

On Wed, Jan 08, 2025 at 07:07:57PM +0200, Dmitry V. Levin wrote:
> intptr_t and uintptr_t are not big enough types on 32-bit architectures
> when printing 64-bit values, resulting to the following incorrect
> diagnostic output:
> 
>   # get_syscall_info.c:209:get_syscall_info:Expected exp_args[2] (3134324433) == info.entry.args[1] (3134324433)
> 
> Replace intptr_t and uintptr_t with intmax_t and uintmax_t, respectively.
> With this fix, the same test produces more usable diagnostic output:
> 
>   # get_syscall_info.c:209:get_syscall_info:Expected exp_args[2] (3134324433) == info.entry.args[1] (18446744072548908753)
> 
> Fixes: b5bb6d3068ea ("selftests/seccomp: fix 32-bit build warnings")
> Signed-off-by: Dmitry V. Levin <ldv@...ace.io>

Ah nice, thanks!

Reviewed-by: Kees Cook <kees@...nel.org>

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ