Re: [PATCH v2 2/2] selftests/seccomp: Add a test for the WAIT_KILLABLE_RECV fast reply race

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 25, 2025 at 06:31:19PM +0200, Johannes Nixdorf wrote:
> +		struct itimerval timer = {
> +			.it_value = { .tv_usec = 1000 },
> +			.it_interval = { .tv_usec = 1000 },
> +		};

To get this to build, I needed to add a sys/time.h include:

diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
index b24d0cbe88b4..fc4910d35342 100644
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
@@ -24,6 +24,7 @@
 #include <linux/filter.h>
 #include <sys/prctl.h>
 #include <sys/ptrace.h>
+#include <sys/time.h>
 #include <sys/user.h>
 #include <linux/prctl.h>
 #include <linux/ptrace.h>

But, with that, yes, I can confirm the race and the fix. Thank you!
I can fix that up locally.

-Kees

-- 
Kees Cook




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux