linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Johannes Nixdorf" <mixi@shadowice.org>
To: "Kees Cook" <kees@kernel.org>, "Johannes Nixdorf" <johannes@nixdorf.dev>
Cc: "Andy Lutomirski" <luto@amacapital.net>,
	"Will Drewry" <wad@chromium.org>,
	"Sargun Dhillon" <sargun@sargun.me>,
	"Shuah Khan" <shuah@kernel.org>, <linux-kernel@vger.kernel.org>,
	"Ali Polatel" <alip@chesswob.org>,
	<linux-kselftest@vger.kernel.org>, <bpf@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] selftests/seccomp: Add a test for the WAIT_KILLABLE_RECV fast reply race
Date: Tue, 29 Jul 2025 18:45:46 +0200	[thread overview]
Message-ID: <DBOOW06CYM2U.11R0PDE4QNQK9@shadowice.org> (raw)
In-Reply-To: <202507281805.14457D3EAF@keescook>

On Tue Jul 29, 2025 at 3:07 AM CEST, Kees Cook wrote:
> 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.

Sounds good. The change looks correct to me as well.

>
> -Kees

Best regards,
Johannes

  reply	other threads:[~2025-07-29 16:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-25 16:31 [PATCH v2 0/2] seccomp: Fix a race with WAIT_KILLABLE_RECV if the tracer replies too fast Johannes Nixdorf
2025-07-25 16:31 ` [PATCH v2 1/2] " Johannes Nixdorf
2025-07-25 16:31 ` [PATCH v2 2/2] selftests/seccomp: Add a test for the WAIT_KILLABLE_RECV fast reply race Johannes Nixdorf
2025-07-29  1:07   ` Kees Cook
2025-07-29 16:45     ` Johannes Nixdorf [this message]
2025-07-29 20:34 ` [PATCH v2 0/2] seccomp: Fix a race with WAIT_KILLABLE_RECV if the tracer replies too fast Kees Cook

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=DBOOW06CYM2U.11R0PDE4QNQK9@shadowice.org \
    --to=mixi@shadowice.org \
    --cc=alip@chesswob.org \
    --cc=bpf@vger.kernel.org \
    --cc=johannes@nixdorf.dev \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=sargun@sargun.me \
    --cc=shuah@kernel.org \
    --cc=wad@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).