From: Puranjay Mohan <puranjay@kernel.org>
To: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next v3 2/2] selftests/bpf: Augment send_signal test with remote signaling
Date: Mon, 07 Oct 2024 12:11:46 +0000 [thread overview]
Message-ID: <mb61po73wcdtp.fsf@kernel.org> (raw)
In-Reply-To: <20241007103426.128923-3-puranjay@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1500 bytes --]
Puranjay Mohan <puranjay@kernel.org> writes:
> Add testcases to test bpf_send_signal_task(). In these new test cases,
> the main process triggers the BPF program and the forked process
> receives the signals. The target process's signal handler receives a
> cookie from the bpf program.
>
> Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
> ---
> .../selftests/bpf/prog_tests/send_signal.c | 133 +++++++++++++-----
> .../bpf/progs/test_send_signal_kern.c | 35 ++++-
> 2 files changed, 130 insertions(+), 38 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/send_signal.c b/tools/testing/selftests/bpf/prog_tests/send_signal.c
> index 6cc69900b3106..beb771347a503 100644
> --- a/tools/testing/selftests/bpf/prog_tests/send_signal.c
> +++ b/tools/testing/selftests/bpf/prog_tests/send_signal.c
> @@ -8,17 +8,25 @@ static int sigusr1_received;
>
> static void sigusr1_handler(int signum)
> {
> - sigusr1_received = 1;
> + sigusr1_received = 8;
> +}
> +
> +static void sigusr1_siginfo_handler(int s, siginfo_t *i, void *v)
> +{
> + sigusr1_received = i->si_value.sival_int;
This is incorrect for big-endian archs and I will change this to:
sigusr1_received = (int)(long long)i->si_value.sival_ptr;
This should work on all archs.
> }
>
> static void test_send_signal_common(struct perf_event_attr *attr,
> - bool signal_thread)
> + bool signal_thread, bool remote)
[...]
Thanks,
Puranjay
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]
prev parent reply other threads:[~2024-10-07 12:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-07 10:34 [PATCH bpf-next v3 0/2] Implement mechanism to signal other threads Puranjay Mohan
2024-10-07 10:34 ` [PATCH bpf-next v3 1/2] bpf: implement bpf_send_signal_task() kfunc Puranjay Mohan
2024-10-08 1:41 ` kernel test robot
2024-10-08 4:24 ` Andrii Nakryiko
2024-10-08 10:17 ` Puranjay Mohan
2024-10-08 18:38 ` Andrii Nakryiko
2024-10-08 6:18 ` kernel test robot
2024-10-07 10:34 ` [PATCH bpf-next v3 2/2] selftests/bpf: Augment send_signal test with remote signaling Puranjay Mohan
2024-10-07 12:11 ` Puranjay Mohan [this message]
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=mb61po73wcdtp.fsf@kernel.org \
--to=puranjay@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=john.fastabend@gmail.com \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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.