From: Kees Cook <kees@kernel.org>
To: "Dmitry V. Levin" <ldv@strace.io>
Cc: Shuah Khan <shuah@kernel.org>, Gabi Falk <gabifalk@gmx.com>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests: harness: fix printing of mismatch values in __EXPECT()
Date: Wed, 8 Jan 2025 13:57:08 -0800 [thread overview]
Message-ID: <202501081357.BE10EC4403@keescook> (raw)
In-Reply-To: <20250108170757.GA6723@strace.io>
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@strace.io>
Ah nice, thanks!
Reviewed-by: Kees Cook <kees@kernel.org>
--
Kees Cook
next prev parent reply other threads:[~2025-01-08 21:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-08 17:07 [PATCH] selftests: harness: fix printing of mismatch values in __EXPECT() Dmitry V. Levin
2025-01-08 21:57 ` Kees Cook [this message]
2025-01-08 23:23 ` Shuah Khan
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=202501081357.BE10EC4403@keescook \
--to=kees@kernel.org \
--cc=gabifalk@gmx.com \
--cc=ldv@strace.io \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
/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.