On 12/12/2023 12:47 PM, Sagi Shahar wrote:
>
>
> -Original Message-
> From: Sagi Shahar
> Sent: Tuesday, December 12, 2023 12:47 PM
> To: linux-kselftest@vger.kernel.org; Ackerley Tng ;
> Afranji, Ryan ; Aktas, Erdem ;
> Sagi Shahar ; Yamahata, Isaku
> Cc: Sean Christopherson ; Pa
On 12/12/2023 12:47 PM, Sagi Shahar wrote:
>
>
> -Original Message-
> From: Sagi Shahar
> Sent: Tuesday, December 12, 2023 12:47 PM
> To: linux-kselftest@vger.kernel.org; Ackerley Tng ;
> Afranji, Ryan ; Aktas, Erdem ;
> Sagi Shahar ; Yamahata, Isaku
> Cc: Sean Christopherson ; P
On Thu, Mar 7, 2024 at 2:29 PM Rae Moar wrote:
>
> Add ability to parse multiple files. Additionally add the
> ability to parse all results in the KUnit debugfs repository.
>
> How to parse multiple files:
>
> ./tools/testing/kunit/kunit.py parse results.log results2.log
>
> How to parse all files
On 24/03/15 11:50AM, Stanislav Fomichev wrote:
> On 03/15, Jose Fernandez wrote:
> > This patch enhances the BPF helpers by adding a kfunc to retrieve the
> > cgroup v2 ID of a specific task, addressing a previous limitation where
> > only bpf_task_get_cgroup1 was available for cgroup v1. The new k
On 03/15, Jose Fernandez wrote:
> This patch enhances the BPF helpers by adding a kfunc to retrieve the
> cgroup v2 ID of a specific task, addressing a previous limitation where
> only bpf_task_get_cgroup1 was available for cgroup v1. The new kfunc is
> particularly useful for scenarios where obtai
This patch adds a selftest for the `bpf_task_get_cgroup_id` kfunc. The
test focuses on the use case of obtaining the cgroup ID of the previous
task in a `sched_switch` tracepoint.
The selftest involves creating a test cgroup, attaching a BPF program
that utilizes the `bpf_task_get_cgroup_id` durin
This patch enhances the BPF helpers by adding a kfunc to retrieve the
cgroup v2 ID of a specific task, addressing a previous limitation where
only bpf_task_get_cgroup1 was available for cgroup v1. The new kfunc is
particularly useful for scenarios where obtaining the cgroup ID of a
task other than
Hi Tony,
On 08/03/2024 18:42, Tony Luck wrote:
> On Fri, Mar 08, 2024 at 06:06:45PM +, James Morse wrote:
>> Hi guys,
>>
>> On 07/03/2024 23:16, Tony Luck wrote:
>>> On Thu, Mar 07, 2024 at 02:39:08PM -0800, Reinette Chatre wrote:
Thank you for the example. I find that significantly easie
On 3/15/24 07:44, Benjamin Tissoires wrote:
> +/**
> + * hid_bpf_hw_output_report - Send an output report to a HID device
> + *
> + * @ctx: the HID-BPF context previously allocated in
> hid_bpf_allocate_context()
> + * @buf: a %PTR_TO_MEM buffer
> + * @buf__sz: the size of the data to transfer
On 3/15/24 07:44, Benjamin Tissoires wrote:
> It can be interesting to inject events from BPF as if the event were
> to come from the device.
> For example, some multitouch devices do not all the time send a proximity
> out event, and we might want to send it for the physical device.
>
> Compar
Export the sleepable kfuncs we have on HID-BPF in tracing bpf programs,
but with the condition of being used in a sleepable context.
This allows to use the bpf_timer when used in a sleepable context
through bpf_timer_set_sleepable_cb() and initiate work from a device event.
Signed-off-by: Benjamin
Usual way of testing, we call the function and ensures we receive
the event
Signed-off-by: Benjamin Tissoires
---
no changes in v4
no changes in v3
no changes in v2
---
tools/testing/selftests/hid/hid_bpf.c | 49 +-
tools/testing/selftests/hid/progs/hid.c
It can be interesting to inject events from BPF as if the event were
to come from the device.
For example, some multitouch devices do not all the time send a proximity
out event, and we might want to send it for the physical device.
Compared to uhid, we can now inject events on any physical device
This time we need to ensure uhid receives it, thus the new mutex and
condition.
Signed-off-by: Benjamin Tissoires
---
no changes in v4
no changes in v3
no changes in v2
---
tools/testing/selftests/hid/hid_bpf.c | 63 ++
tools/testing/selftests/hid/progs/hid.c
It's always a good idea to have KASAN in tests.
Signed-off-by: Benjamin Tissoires
---
no changes in v4
new in v3
---
tools/testing/selftests/hid/config.common | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/hid/config.common
b/tools/testing/selftests/hid/config.co
We currently only export hid_hw_raw_request() as a BPF kfunc.
However, some devices require an explicit write on the Output Report
instead of the use of the control channel.
So also export hid_hw_output_report to BPF
Signed-off-by: Benjamin Tissoires
---
no changes in v4
no changes in v3
no
No code change, just move down the hid_bpf_get_data() kfunc definition
so we have only one block of __bpf_kfunc_start/end_defs()
Signed-off-by: Benjamin Tissoires
---
no changes in v4
no changes in v3
no changes in v2
---
drivers/hid/bpf/hid_bpf_dispatch.c | 80 ++
New version of the sleepable bpf_timer code, without BPF changes, as
they can now go through the HID tree independantly:
https://lore.kernel.org/all/20240315-hid-bpf-sleepable-v4-0-5658f2540...@kernel.org/
For reference, the use cases I have in mind:
---
Basically, I need to be able to defer a
max_guest_memory_test uses ucalls to sync with the host, but
it also resets the guest RIP back to its initial value in between
tests stages.
This makes the guest never reach the code which frees the ucall struct
and since a fixed pool of 512 ucall structs is used, the test starts
to fail when more
bpf_experimental.h and ../bpf_testmod/bpf_testmod_kfunc.h are both
including vmlinux.h, which is not compatible with including time.h
or bpf_tcp_helpers.h.
So prevent vmlinux.h to be included, and override the few missing
types.
Signed-off-by: Benjamin Tissoires
---
new in v4
---
tools/testin
cp include/uapi/linux/bpf.h tools/include/uapi/linux/bpf.h
Signed-off-by: Benjamin Tissoires
---
new in v4
---
tools/include/uapi/linux/bpf.h | 4
1 file changed, 4 insertions(+)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 3c42b9f1bada..b90def29d796
Now that we have bpf_timer_set_sleepable_cb() available and working, we
can tag the attached callback as sleepable, and let the verifier check
in the correct context the calls and kfuncs.
Signed-off-by: Benjamin Tissoires
---
changes in v4:
- use a function parameter to forward the sleepable in
In this patch, bpf_timer_set_sleepable_cb() is functionally equivalent
to bpf_timer_set_callback(), to the exception that it enforces
the timer to be started with BPF_F_TIMER_SLEEPABLE.
But given that bpf_timer_set_callback() is a helper when
bpf_timer_set_sleepable_cb() is a kfunc, we need to tea
We need to extend the bpf_timer API, but the way forward relies on kfuncs.
So make bpf_timer known for kfuncs from the verifier PoV
Signed-off-by: Benjamin Tissoires
---
changes in v4:
- enforce KF_ARG_PTR_TO_TIMER to be of type PTR_TO_MAP_VALUE
new in v3 (split from v2 02/10)
---
kernel/bpf/
They are implemented as a workqueue, which means that there are no
guarantees of timing nor ordering.
Signed-off-by: Benjamin Tissoires
---
changes in v4:
- dropped __bpf_timer_compute_key()
- use a spin_lock instead of a semaphore
- ensure bpf_timer_cancel_and_free is not complaining about
no
New version of the sleepable bpf_timer code, without the HID changes, as
they can now go through the HID tree independantly.
For reference, the use cases I have in mind:
---
Basically, I need to be able to defer a HID-BPF program for the
following reasons (from the aforementioned patch):
1. defe
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann :
On Fri, 15 Mar 2024 09:26:54 + you wrote:
> There are statements with two semicolons. Remove the second one, it
> is redundant.
>
> Signed-off-by: Colin Ian King
> ---
> tools/testing/selftests/bpf/benchs/bench
On 3/12/24 18:03, Guenter Roeck wrote:
Add name of functions triggering warning backtraces to the __bug_table
object section to enable support for suppressing WARNING backtraces.
To limit image size impact, the pointer to the function name is only added
to the __bug_table section if both CONFIG_
There is a statement with two semicolons. Remove the second one, it
is redundant.
Signed-off-by: Colin Ian King
---
tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c
b/too
There are statements with two semicolons. Remove the second one, it
is redundant.
Signed-off-by: Colin Ian King
---
tools/testing/selftests/bpf/benchs/bench_local_storage_create.c | 2 +-
tools/testing/selftests/bpf/progs/iters.c | 2 +-
2 files changed, 2 insertions(+), 2
On Thu, Mar 14, 2024 at 2:29 PM Jiri Olsa wrote:
>
> On Wed, Mar 13, 2024 at 05:25:35PM -0700, Alexei Starovoitov wrote:
> > On Tue, Mar 12, 2024 at 6:53 PM 梦龙董 wrote:
> > >
> > > On Wed, Mar 13, 2024 at 12:42 AM Alexei Starovoitov
> > > wrote:
> > > >
> > > > On Mon, Mar 11, 2024 at 7:42 PM 梦龙董
On Thu, Mar 14, 2024 at 8:27 AM Alexei Starovoitov
wrote:
>
> On Tue, Mar 12, 2024 at 6:53 PM 梦龙董 wrote:
[..]
> > What does "a hundred attachments max" means? Can't I
> > trace thousands of kernel functions with a bpf program of
> > tracing multi-link?
>
> I mean what time does it take to att
On 11/12/2023 10.39, Thomas Huth wrote:
On 19/10/2023 15.13, Andrew Jones wrote:
On Thu, Oct 19, 2023 at 11:59:00AM +0200, Thomas Huth wrote:
For easier use of the tests in automation and for having some
status information for the user while the test is running, let's
provide some TAP output in
33 matches
Mail list logo