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>] [day] [month] [year] [list]
Message-ID: <20251119030052.315502-1-wakel@google.com>
Date: Wed, 19 Nov 2025 11:00:52 +0800
From: Wake Liu <wakel@...gle.com>
To: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Shuah Khan <shuah@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>, Darren Hart <dvhart@...radead.org>, 
	Davidlohr Bueso <dave@...olabs.net>, 
	"André Almeida" <andrealmeid@...lia.com>, Wake Liu <wakel@...gle.com>, linux-kernel@...r.kernel.org, 
	linux-kselftest@...r.kernel.org
Subject: [PATCH] kselftest: futex: Fix memset with zero size warning

The `FIXTURE(args)` macro defines an empty `struct _test_data_args`,
leading to `sizeof(struct _test_data_args)` evaluating to 0. This
caused a build error due to a compiler warning on a `memset` call
with a zero size argument.

Adding a dummy member to the struct ensures its size is non-zero,
resolving the build issue.

Signed-off-by: Wake Liu <wakel@...gle.com>
---
 tools/testing/selftests/futex/functional/futex_requeue_pi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/futex/functional/futex_requeue_pi.c b/tools/testing/selftests/futex/functional/futex_requeue_pi.c
index f299d75848cd..000fec468835 100644
--- a/tools/testing/selftests/futex/functional/futex_requeue_pi.c
+++ b/tools/testing/selftests/futex/functional/futex_requeue_pi.c
@@ -52,6 +52,7 @@ struct thread_arg {
 
 FIXTURE(args)
 {
+	char dummy;
 };
 
 FIXTURE_SETUP(args)
-- 
2.52.0.rc1.455.g30608eb744-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ