On 6/18/24 2:06 AM, Petr Vorel wrote:
> '==' is bashism, '=' needs to be used for comparison.
> With this fix script can work on systems where the default shell is
> dash, busybox ash or any other strictly POSIX compatible shell.
>
> While at it, also improve:
> * remove "x" in the comparison (
From: Geliang Tang
Use local helper make_client() instead of using make_socket() and
connect(). Then make_socket() can be dropped now.
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sk_lookup.c | 40 +--
1 file changed, 2 insertions(+), 38 deletions(-)
diff
From: Geliang Tang
Use public network helpers make_sockaddr() and connect_to_addr() instead
of using the local defined function make_socket() and connect().
This make_socket() can be dropped latter.
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sk_lookup.c | 20 +++
From: Geliang Tang
This patch adds a new parameter "len" for make_socket() to get the length
of the address by make_sockaddr(), then local helper inetaddr_len() can be
dropped.
Signed-off-by: Geliang Tang
---
.../testing/selftests/bpf/prog_tests/sk_lookup.c | 15 +--
1 file change
From: Geliang Tang
This patch uses public helper connect_to_fd() exported in network_helpers.h
instead of using make_socket() and connect() in prog_tests/sk_lookup.c.
This can simplify the code.
Signed-off-by: Geliang Tang
---
.../testing/selftests/bpf/prog_tests/sk_lookup.c | 16 ++---
From: Geliang Tang
This patch uses public helper start_server_addr() in make_server() in
prog_tests/sk_lookup.c to avoid duplicate code.
Add a helper setsockopts() to set SOL_CUSTOM sockopt looply, set
it to setsockopt pointer of struct network_helper_opts, and pass it to
start_server_addr().
A
From: Geliang Tang
Use public network helper connect_to_fd() instead of open-coding it in
prog_tests/sockmap_ktls.c. This can avoid duplicate code.
Acked-by: Eduard Zingerman
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sockmap_ktls.c| 14 ++
1 file changed
From: Geliang Tang
Include network_helpers.h in prog_tests/sockmap_ktls.c, use public network
helper start_server() instead of the local defined function tcp_server().
This can avoid duplicate code.
Technically, this is not a one-for-one replacement, as start_server() also
does bind() and it's l
From: Geliang Tang
v2:
- address Eduard's comments in v1. (thanks)
- fix errors reported by CI.
This patch set uses network helpers in sockmap_ktls and sk_lookup, and drop
three local helpers tcp_server(), inetaddr_len() and make_socket() in them.
Geliang Tang (7):
selftests/bpf: Use start_
On Fri, 21 Jun 2024 14:12:22 -0400 Audra Mitchell wrote:
> Currently if we request a feature that is not set in the Kernel
> config we fail silently and return all the available features. However,
> the man page indicates we should return an EINVAL.
>
> We need to fix this issue since we can end
On Thu, 20 Jun 2024 08:55:54 -0400 Aaron Conole wrote:
> This series enhances the ovs-dpctl utility to provide support for set()
> and tunnel() flow specifiers, better ipv6 handling support, and the
> ability to add tunnel vports, and LWT interfaces. Finally, it modifies
> the pmtu.sh script to ca
Thanks for your comment, Andi.
On Thu, Jun 20, 2024 at 3:53 PM Andi Kleen wrote:
>
> Jiaqi Yan writes:
>
> > Correctable memory errors are very common on servers with large
> > amount of memory, and are corrected by ECC, but with two
> > pain points to users:
> > 1. Correction usually happens on
On Tue, Jun 18, 2024 at 1:03 PM Ivan Orlov wrote:
>
> Since assert_test covers the part of the KUnit core (the assertion
> formatting functions), I believe it would be better to have it merged
> into kunit-test (as it is done for other tests for the KUnit core).
>
> Signed-off-by: Ivan Orlov
Hel
On Fri, Jun 21, 2024 at 02:12:24PM -0400, Audra Mitchell wrote:
> If CONFIG_PTE_MARKER_UFFD_WP is disabled, then testing with test_uffdio_up
Here you're talking about pte markers, then..
> enables calling uffdio_regsiter with the flag UFFDIO_REGISTER_MODE_WP. The
> kernel ensures in vma_can_userf
On Fri, Jun 21, 2024 at 02:12:23PM -0400, Audra Mitchell wrote:
> Now that we have updated userfaultfd_api to correctly return
> EIVAL when a feature is requested but not available, let's fix
> the uffd-stress test to only set the UFFD_FEATURE_WP_UNPOPULATED
> feature when the config is set. In add
On Fri, Jun 21, 2024 at 02:12:22PM -0400, Audra Mitchell wrote:
> Currently if we request a feature that is not set in the Kernel
> config we fail silently and return all the available features. However,
> the man page indicates we should return an EINVAL.
>
> We need to fix this issue since we ca
On Tue, Jun 18, 2024 at 1:03 PM Ivan Orlov wrote:
>
> Add 'kunit_assert_' prefix for 'is_literal' and 'is_str_literal'
> functions. This way we will be sure that we are not exporting ambiguous
> symbols into the KUnit namespace.
>
> Export these (and other) functions from assert into the KUnit nam
On 6/18/24 07:40, Laura Nao wrote:
Hi Shuah,
On 6/7/24 23:07, Shuah Khan wrote:
On 6/7/24 03:53, Laura Nao wrote:
Hi Shuah,
On 6/7/24 01:03, Shuah Khan wrote:
On 6/6/24 03:57, Laura Nao wrote:
Hi Shuah,
On 5/6/24 13:13, Laura Nao wrote:
The watchdog selftest script supports various parame
On Tue, Jun 18, 2024 at 1:03 PM Ivan Orlov wrote:
>
> Currently, the only way to build string-stream-test is by setting
> CONFIG_KUNIT_TEST=y. However, CONFIG_KUNIT_TEST is a config option for
> a different test (`kunit-test.c`).
>
> Introduce a new Kconfig entry in order to be able to build the
>
On Tue, Jun 18, 2024 at 1:03 PM Ivan Orlov wrote:
>
> Since now we are exporting string-stream functions into the KUnit
> namespace, we can safely use them in kunit-test when it is compiled as
> a module as well. So, remove the stubs used when kunit-test is compiled
> as a module. Import the KUnit
On Tue, Jun 18, 2024 at 1:03 PM Ivan Orlov wrote:
>
> Export non-static functions from the string-stream.c file into the KUnit
> namespace in order to be able to access them from the KUnit core tests
> (when they are loaded as modules).
>
> Reviewed-by: David Gow
> Signed-off-by: Ivan Orlov
Hel
On Thu, Jun 20, 2024 at 9:51 PM Edgecombe, Rick P
wrote:
>
> +Yan
>
> On Wed, 2024-06-05 at 14:44 -0700, Rick Edgecombe wrote:
> > > I will take a look at rebasing the selftests on top of the Intel
> > > development branch and I can post it on our github branch. We can talk
> > > about co-developm
On 6/18/24 4:44 PM, Shuah Khan wrote:
On 6/10/24 09:14, Ilpo Järvinen wrote:
Hi all,
This series does a number of cleanups into resctrl_val() and
generalizes it by removing test name specific handling from the
function.
v7:
- Truly use "bound to", not bounded to.
- Fix separator to use 3 da
On Fri, 2024-06-21 at 18:35 +0800, Geliang Tang wrote:
[...]
> @@ -224,24 +188,22 @@ static int make_server(int sotype, const char *ip, int
> port,
>
> static int make_client(int sotype, const char *ip, int port)
> {
> + int family = is_ipv6(ip) ? AF_INET6 : AF_INET;
> struct socka
On Fri, 2024-06-21 at 18:35 +0800, Geliang Tang wrote:
[...]
> @@ -883,12 +881,10 @@ static void drop_on_lookup(const struct test *t)
> if (server_fd < 0)
> goto detach;
>
> - client_fd = make_socket(t->sotype, t->connect_to.ip,
> - t->connect
On Fri, 2024-06-21 at 18:35 +0800, Geliang Tang wrote:
> From: Geliang Tang
>
> This patch uses public helper start_server_addr() in make_server() in
> prog_tests/sk_lookup.c to avoid duplicate code.
>
> Add a helper setsockopts() to set SOL_CUSTOM sockopt looply, set
> it to setsockopt pointer
On Fri, 2024-06-21 at 18:35 +0800, Geliang Tang wrote:
> From: Geliang Tang
>
> Use public network helper connect_to_fd() instead of open-coding it in
> prog_tests/sockmap_ktls.c. This can avoid duplicate code.
>
> Signed-off-by: Geliang Tang
> ---
Acked-by: Eduard Zingerman
[...]
On Fri, 2024-06-21 at 18:35 +0800, Geliang Tang wrote:
> From: Geliang Tang
>
> Include network_helpers.h in prog_tests/sockmap_ktls.c, use public network
> helper start_server() instead of the local defined function tcp_server().
> This can avoid duplicate code.
>
> Signed-off-by: Geliang Tang
Recent CI failures brought my attention to the fact that pmu_counters_test
sometimes fails because it doesn't get any LLC cache misses.
It apparently happens because CLFLUSH can race with CPU prediction.
To attempt to fix this, implement a more aggressive cache flushing - now it is
flushed
on ea
Currently this test does a single CLFLUSH on its memory location
but due to speculative execution this might not cause LLC misses.
Instead, do a cache flush on each loop iteration to confuse the prediction
and make sure that cache misses always occur.
Signed-off-by: Maxim Levitsky
---
.../selft
On Mon, Jun 17, 2024 at 9:36 AM Pavel Begunkov wrote:
>
> On 6/13/24 02:35, Mina Almasry wrote:
> >
> > The pages awaiting freeing are stored in the newly added
> > sk->sk_user_frags, and each page passed to userspace is get_page()'d.
> > This reference is dropped once the userspace indicates that
On Fri, Jun 21, 2024 at 02:29:07PM +0800, Quan Zhou wrote:
>
>
> On 2024/6/20 10:55, Charlie Jenkins wrote:
> > On Wed, Jun 19, 2024 at 10:01:47AM +0800, zhouq...@iscas.ac.cn wrote:
> > > From: Quan Zhou
> > >
> > > This test creates two processes: a tracer and a tracee. The tracer
> > > activ
Introduce a simple driver for functional and stress testing of proclocal
kernel allocator. The driver exposes a device node /dev/proclocal-test,
which allows userland programs to request creation of proclocal areas
and to obtain their addresses as seen by the kernel, and in addition to
read and wr
From: Fares Mehanna
In order to be resilient against cross-process speculation-based
attacks, it makes sense to store certain (secret) items in kernel memory
local to mm.
Implement such allocations on top of secretmem infrastructure.
Specifically, on allocate
1. Create secretmem file.
2. To di
From: Fares Mehanna
To make sure the kernel mm-local mapping is untouched by the user, we will seal
the VMA before changing the protection to be used by the kernel.
This will guarantee that userspace can't unmap or alter this VMA while it is
being used by the kernel.
After the kernel is done wi
In a series posted a few years ago [1], a proposal was put forward to allow the
kernel to allocate memory local to a mm and thus push it out of reach for
current and future speculation-based cross-process attacks. We still believe
this is a nice thing to have.
However, in the time passed since th
On Mon, Jun 17, 2024 at 7:17 AM Pavel Begunkov wrote:
>
> On 6/13/24 02:35, Mina Almasry wrote:
> > Convert netmem to be a union of struct page and struct netmem. Overload
> > the LSB of struct netmem* to indicate that it's a net_iov, otherwise
> > it's a page.
> >
> > Currently these entries in s
If CONFIG_PTE_MARKER_UFFD_WP is disabled, then testing with test_uffdio_up
enables calling uffdio_regsiter with the flag UFFDIO_REGISTER_MODE_WP. The
kernel ensures in vma_can_userfault() that if CONFIG_PTE_MARKER_UFFD_WP
is disabled, only allow the VM_UFFD_WP on anonymous vmas.
Signed-off-by: Aud
Now that we have updated userfaultfd_api to correctly return
EIVAL when a feature is requested but not available, let's fix
the uffd-stress test to only set the UFFD_FEATURE_WP_UNPOPULATED
feature when the config is set. In addition, still run the test if
the CONFIG_PTE_MARKER_UFFD_WP is not set, j
Currently if we request a feature that is not set in the Kernel
config we fail silently and return all the available features. However,
the man page indicates we should return an EINVAL.
We need to fix this issue since we can end up with a Kernel warning
should a program request the feature UFFD_F
We cannot use CLONE_VFORK because we also need to wait for the timeout
signal.
Restore tests timeout by using the original fork() call in __run_test()
but also in __TEST_F_IMPL(). Also fix a race condition when waiting for
the test child process.
Because test metadata are shared between test pro
On Fri, Jun 21, 2024 at 11:16:31AM +0100, Fuad Tabba wrote:
> Hi David,
>
> On Fri, Jun 21, 2024 at 10:10 AM David Hildenbrand wrote:
> >
> > On 21.06.24 10:54, Fuad Tabba wrote:
> > > Hi David,
> > >
> > > On Fri, Jun 21, 2024 at 9:44 AM David Hildenbrand
> > > wrote:
> > >>
> > Again fro
On Fri, Jun 21, 2024 at 09:25:10AM +, Quentin Perret wrote:
> On Friday 21 Jun 2024 at 10:02:08 (+0200), David Hildenbrand wrote:
> > Sure, there might be cases like "pKVM can handle access to private pages in
> > user page mappings", "AMD-SNP will not crash the host if writing to private
> > p
On Fri, Jun 21, 2024 at 9:08 AM Benjamin Tissoires wrote:
>
> On Jun 21 2024, Alexei Starovoitov wrote:
> > On Fri, Jun 21, 2024 at 1:56 AM Benjamin Tissoires
> > wrote:
> > >
> > > Same story than hid_hw_raw_requests:
> > >
> > > This allows to intercept and prevent or change the behavior of
>
On Jun 21 2024, Alexei Starovoitov wrote:
> On Fri, Jun 21, 2024 at 1:56 AM Benjamin Tissoires wrote:
> >
> > Same story than hid_hw_raw_requests:
> >
> > This allows to intercept and prevent or change the behavior of
> > hid_hw_output_report() from a bpf program.
> >
> > The intent is to solve a
On Fri, Jun 21, 2024 at 1:56 AM Benjamin Tissoires wrote:
>
> This allows to intercept and prevent or change the behavior of
> hid_hw_raw_request() from a bpf program.
>
> The intent is to solve a couple of use case:
> - firewalling a HID device: a firewall can monitor who opens the hidraw
> nod
On Fri, Jun 21, 2024 at 1:56 AM Benjamin Tissoires wrote:
>
> Same story than hid_hw_raw_requests:
>
> This allows to intercept and prevent or change the behavior of
> hid_hw_output_report() from a bpf program.
>
> The intent is to solve a couple of use case:
> - firewalling a HID device: a fire
On Thu, Jun 20, 2024 at 10:08 PM Muhammad Usama Anjum
wrote:
>
> On 6/20/24 11:48 PM, Jiaqi Yan wrote:
> > Add regression and new tests when hugepage has correctable memory
> > errors, and how userspace wants to deal with it:
> > * if enable_soft_offline=1, mapped hugepage is soft offlined
> > * i
Hello:
This patch was applied to netdev/net-next.git (main)
by David S. Miller :
On Fri, 21 Jun 2024 04:16:37 + you wrote:
> amt.sh is written in bash, not sh.
> So, shebang should be bash.
>
> Signed-off-by: Taehee Yoo
> ---
> tools/testing/selftests/net/amt.sh | 2 +-
> 1 file changed, 1
On Thu, Jun 20, 2024 at 04:54:00PM -0700, Sean Christopherson wrote:
> Heh, and then we'd end up turning memfd into guest_memfd. As I see it, being
> able to safely map TDX/SNP/pKVM private memory is a happy side effect that is
> possible because guest_memfd isn't subordinate to the primary MMU,
On Fri, Jun 21, 2024 at 12:25:59PM +0100, Mark Rutland wrote:
> On Thu, Jun 20, 2024 at 10:57:27AM -0700, Paul E. McKenney wrote:
> > On Wed, Jun 19, 2024 at 11:06:58PM +, Zhouyi Zhou wrote:
> > > Add CFcommon.arch for the various arch's need for rcutorture.
> > >
> > > In accordance with
On Fri, Jun 21, 2024 at 07:32:40AM +, Quentin Perret wrote:
> > No, I'm interested in what pKVM is doing that needs this to be so much
> > different than the CC case..
>
> The underlying technology for implementing CC is obviously very
> different (MMU-based for pKVM, encryption-based for the
On Thu, Jun 20, 2024 at 10:57:27AM -0700, Paul E. McKenney wrote:
> On Wed, Jun 19, 2024 at 11:06:58PM +, Zhouyi Zhou wrote:
> > Add CFcommon.arch for the various arch's need for rcutorture.
> >
> > In accordance with [1], [2] and [3], move x86 specific kernel option
> > CONFIG_HYPERVISOR_
On Fri, Jun 21, 2024 at 4:50 PM Chris Li wrote:
>
> On Fri, Jun 21, 2024 at 12:47 AM Barry Song <21cn...@gmail.com> wrote:
> >
> > On Fri, Jun 21, 2024 at 7:25 PM Ryan Roberts wrote:
> > >
> > > On 20/06/2024 12:34, David Hildenbrand wrote:
> > > > On 20.06.24 11:04, Ryan Roberts wrote:
> > > >>
From: Geliang Tang
Use public network helpers make_sockaddr() and connect_to_addr() instead of
using the local defined function make_socket() and connect().
Then make_socket() can be dropped.
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sk_lookup.c | 50 +++---
From: Geliang Tang
This patch uses public helper connect_to_fd() exported in network_helpers.h
instead of using make_socket() and connect() in prog_tests/sk_lookup.c.
This can simplify the code.
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sk_lookup.c | 33 +---
From: Geliang Tang
This patch adds a new parameter "len" for make_socket() to get the length
of the address by make_sockaddr(), then local helper inetaddr_len() can be
dropped.
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sk_lookup.c | 30 +--
1 file change
From: Geliang Tang
This patch uses public helper start_server_addr() in make_server() in
prog_tests/sk_lookup.c to avoid duplicate code.
Add a helper setsockopts() to set SOL_CUSTOM sockopt looply, set
it to setsockopt pointer of struct network_helper_opts, and pass it to
start_server_addr().
S
From: Geliang Tang
Use public network helper connect_to_fd() instead of open-coding it in
prog_tests/sockmap_ktls.c. This can avoid duplicate code.
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sockmap_ktls.c| 14 ++
1 file changed, 2 insertions(+), 12 deleti
From: Geliang Tang
Include network_helpers.h in prog_tests/sockmap_ktls.c, use public network
helper start_server() instead of the local defined function tcp_server().
This can avoid duplicate code.
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sockmap_ktls.c| 18 ++-
From: Geliang Tang
This patch set uses network helpers in sockmap_ktls and sk_lookup, and drop
three local helpers tcp_server(), inetaddr_len() and make_socket() in them.
Geliang Tang (6):
selftests/bpf: Use start_server in sockmap_ktls
selftests/bpf: Use connect_to_fd in sockmap_ktls
self
Hi David,
On Fri, Jun 21, 2024 at 10:10 AM David Hildenbrand wrote:
>
> On 21.06.24 10:54, Fuad Tabba wrote:
> > Hi David,
> >
> > On Fri, Jun 21, 2024 at 9:44 AM David Hildenbrand wrote:
> >>
> Again from that thread, one of most important aspects guest_memfd is
> that VMAs
> ar
Add a test to verify sampling packets via psample works.
In order to do that, create a subcommand in ovs-dpctl.py to listen to
on the psample multicast group and print samples.
Signed-off-by: Adrian Moreno
---
.../selftests/net/openvswitch/openvswitch.sh | 110 +-
.../selftests
The trunc action was supported decode-able but not parse-able. Add
support for parsing the action string.
Signed-off-by: Adrian Moreno
---
.../testing/selftests/net/openvswitch/ovs-dpctl.py | 13 +
1 file changed, 13 insertions(+)
diff --git a/tools/testing/selftests/net/openvswitc
The userspace action lacks parsing support plus it contains a bug in the
name of one of its attributes.
This patch makes userspace action work.
Signed-off-by: Adrian Moreno
---
.../selftests/net/openvswitch/ovs-dpctl.py| 24 +--
1 file changed, 22 insertions(+), 2 deletions(
Add sample and emit_sample action support to ovs-dpctl.py.
Refactor common attribute parsing logic into an external function.
Signed-off-by: Adrian Moreno
---
.../selftests/net/openvswitch/ovs-dpctl.py| 162 +-
1 file changed, 161 insertions(+), 1 deletion(-)
diff --git a/t
** Background **
Currently, OVS supports several packet sampling mechanisms (sFlow,
per-bridge IPFIX, per-flow IPFIX). These end up being translated into a
userspace action that needs to be handled by ovs-vswitchd's handler
threads only to be forwarded to some third party application that
will some
On Fri, Jun 21, 2024 at 9:24 PM Huang, Ying wrote:
>
> Barry Song <21cn...@gmail.com> writes:
>
> > On Fri, Jun 21, 2024 at 7:25 PM Ryan Roberts wrote:
> >>
> >> On 20/06/2024 12:34, David Hildenbrand wrote:
> >> > On 20.06.24 11:04, Ryan Roberts wrote:
> >> >> On 20/06/2024 01:26, Barry Song wro
On 21.06.24 11:25, Quentin Perret wrote:
On Friday 21 Jun 2024 at 10:02:08 (+0200), David Hildenbrand wrote:
Thanks for the information. IMHO we really should try to find a common
ground here, and FOLL_EXCLUSIVE is likely not it :)
That's OK, IMO at least :-).
Thanks for reviving this discus
On Friday 21 Jun 2024 at 10:02:08 (+0200), David Hildenbrand wrote:
> Thanks for the information. IMHO we really should try to find a common
> ground here, and FOLL_EXCLUSIVE is likely not it :)
That's OK, IMO at least :-).
> Thanks for reviving this discussion with your patch set!
>
> pKVM is i
Barry Song <21cn...@gmail.com> writes:
> On Fri, Jun 21, 2024 at 7:25 PM Ryan Roberts wrote:
>>
>> On 20/06/2024 12:34, David Hildenbrand wrote:
>> > On 20.06.24 11:04, Ryan Roberts wrote:
>> >> On 20/06/2024 01:26, Barry Song wrote:
>> >>> From: Barry Song
>> >>>
>> >>> Both Ryan and Chris have
On 21.06.24 10:54, Fuad Tabba wrote:
Hi David,
On Fri, Jun 21, 2024 at 9:44 AM David Hildenbrand wrote:
Again from that thread, one of most important aspects guest_memfd is that VMAs
are not required. Stating the obvious, lack of VMAs makes it really hard to
drive
swap, reclaim, migration,
We don't want this call to allow an infinite loop in HID-BPF, so let's
have some tests.
Signed-off-by: Benjamin Tissoires
---
tools/testing/selftests/hid/hid_bpf.c | 41 +
tools/testing/selftests/hid/progs/hid.c | 37 +
2 files change
Similar to test_multiply_events_wq: we receive one event and inject a
new one. But given that this time we are already in the event hook, we
can use hid_bpf_try_input_report() directly as this function will not
sleep.
Note that the injected event gets processed before the original one this
way.
S
This is the same logic than hid_hw_raw_request or hid_hw_output_report:
we can allow hid_bpf_try_input_report to be called from a hook on
hid_input_report if we ensure that the call can not be made twice in a
row.
There is one extra subtlety in which there is a lock in hid_input_report.
But given
Now that bpf_wq is available, we can write a test with it. Having
hid_bpf_input_report() waiting for the device means that we can
directly call it, and we get that event when the device is ready.
Signed-off-by: Benjamin Tissoires
---
tools/testing/selftests/hid/hid_bpf.c | 38 ++
hid_bpf_input_report() is already marked to be used in sleepable context
only. So instead of hammering with timers the device to hopefully get
an available slot where the device is not sending events, we can make
that kfunc wait for the current event to be terminated before it goes in.
This allows
We add 3 new tests:
- first, we make sure we can prevent the output_report to happen
- second, we make sure that we can detect that a given hidraw client
was actually doing the request, and for that client only, call ourself
hid_bpf_hw_output_report(), returning a custom value
- last, we ensure
Same story than hid_hw_raw_requests:
This allows to intercept and prevent or change the behavior of
hid_hw_output_report() from a bpf program.
The intent is to solve a couple of use case:
- firewalling a HID device: a firewall can monitor who opens the hidraw
nodes and then prevent or allow
We add 3 new tests:
- first, we make sure we can prevent the raw_request to happen
- second, we make sure that we can detect that a given hidraw client
was actually doing the request, and for that client only, call ourself
hid_bpf_hw_request(), returning a custom value
- last, we ensure that we
When we attach a sleepable hook to hid_hw_raw_requests, we can (and in
many cases should) call ourself hid_bpf_raw_request(), to actually fetch
data from the device itself.
However, this means that we might enter an infinite loop between
hid_hw_raw_requests hooks and hid_bpf_hw_request() call.
To
This allows to intercept and prevent or change the behavior of
hid_hw_raw_request() from a bpf program.
The intent is to solve a couple of use case:
- firewalling a HID device: a firewall can monitor who opens the hidraw
nodes and then prevent or allow access to write operations on that
hidraw
This allows to know who actually sent what when we process the request
to the device.
This will be useful for a BPF firewall program to allow or not requests
coming from a dedicated hidraw node client.
Signed-off-by: Benjamin Tissoires
---
drivers/hid/bpf/hid_bpf_dispatch.c | 12 ++---
drivers
Looks like if a bpf program gets inserted and then removed,
hdev->bpf.device_data is then allocated, but the loop iterating
over the bpf program is never assigning ret.
This is a problem and also revealed another bug in which only the last
value of ret was checked. This effectively meant than only
This series is a followup of the struct_ops conversion.
Therefore, it is based on top of the for-6.11/bpf branch of the hid.git
tree:
https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/?h=for-6.11/bpf
The first patch should go in ASAP, it's a fix that was detected by Dan
and which is
Hi David,
On Fri, Jun 21, 2024 at 9:44 AM David Hildenbrand wrote:
>
> >> Again from that thread, one of most important aspects guest_memfd is that
> >> VMAs
> >> are not required. Stating the obvious, lack of VMAs makes it really hard
> >> to drive
> >> swap, reclaim, migration, etc. from cod
On Wed, Jun 05, 2024 at 08:15:10PM GMT, Yong-Xuan Wang wrote:
> Update the get-reg-list test to test the Svade and Svadu Extensions are
> available for guest OS.
>
> Signed-off-by: Yong-Xuan Wang
> ---
> tools/testing/selftests/kvm/riscv/get-reg-list.c | 8
> 1 file changed, 8 insertion
On 21.06.24 09:25, Ryan Roberts wrote:
On 20/06/2024 12:34, David Hildenbrand wrote:
On 20.06.24 11:04, Ryan Roberts wrote:
On 20/06/2024 01:26, Barry Song wrote:
From: Barry Song
Both Ryan and Chris have been utilizing the small test program to aid
in debugging and identifying issues with s
On Fri, Jun 21, 2024 at 12:47 AM Barry Song <21cn...@gmail.com> wrote:
>
> On Fri, Jun 21, 2024 at 7:25 PM Ryan Roberts wrote:
> >
> > On 20/06/2024 12:34, David Hildenbrand wrote:
> > > On 20.06.24 11:04, Ryan Roberts wrote:
> > >> On 20/06/2024 01:26, Barry Song wrote:
> > >>> From: Barry Song
Again from that thread, one of most important aspects guest_memfd is that VMAs
are not required. Stating the obvious, lack of VMAs makes it really hard to
drive
swap, reclaim, migration, etc. from code that fundamentally operates on VMAs.
: More broadly, no VMAs are required. The lack of sta
Hi Sean,
On Thu, Jun 20, 2024 at 4:37 PM Sean Christopherson wrote:
>
> On Wed, Jun 19, 2024, Fuad Tabba wrote:
> > Hi Jason,
> >
> > On Wed, Jun 19, 2024 at 12:51 PM Jason Gunthorpe wrote:
> > >
> > > On Wed, Jun 19, 2024 at 10:11:35AM +0100, Fuad Tabba wrote:
> > >
> > > > To be honest, person
On 21.06.24 09:32, Quentin Perret wrote:
On Thursday 20 Jun 2024 at 20:18:14 (-0300), Jason Gunthorpe wrote:
On Thu, Jun 20, 2024 at 03:47:23PM -0700, Elliot Berman wrote:
On Thu, Jun 20, 2024 at 11:29:56AM -0300, Jason Gunthorpe wrote:
On Thu, Jun 20, 2024 at 04:01:08PM +0200, David Hildenbra
On 21/06/2024 08:47, Barry Song wrote:
> On Fri, Jun 21, 2024 at 7:25 PM Ryan Roberts wrote:
>>
>> On 20/06/2024 12:34, David Hildenbrand wrote:
>>> On 20.06.24 11:04, Ryan Roberts wrote:
On 20/06/2024 01:26, Barry Song wrote:
> From: Barry Song
>
> Both Ryan and Chris have been
On Fri, Jun 21, 2024 at 7:25 PM Ryan Roberts wrote:
>
> On 20/06/2024 12:34, David Hildenbrand wrote:
> > On 20.06.24 11:04, Ryan Roberts wrote:
> >> On 20/06/2024 01:26, Barry Song wrote:
> >>> From: Barry Song
> >>>
> >>> Both Ryan and Chris have been utilizing the small test program to aid
> >
On 21.06.24 01:54, Sean Christopherson wrote:
On Thu, Jun 20, 2024, Jason Gunthorpe wrote:
On Thu, Jun 20, 2024 at 01:30:29PM -0700, Sean Christopherson wrote:
I.e. except for blatant bugs, e.g. use-after-free, we need to be able to
guarantee
with 100% accuracy that there are no outstanding ma
On 21/06/2024 00:34, Chris Li wrote:
>> + * thp_swap_allocator_test
>> + *
>> + * The purpose of this test program is helping check if THP swpout
>> + * can correctly get swap slots to swap out as a whole instead of
>> + * being split. It randomly releases swap entries through madvise
>> + * DONTN
On Thursday 20 Jun 2024 at 20:18:14 (-0300), Jason Gunthorpe wrote:
> On Thu, Jun 20, 2024 at 03:47:23PM -0700, Elliot Berman wrote:
> > On Thu, Jun 20, 2024 at 11:29:56AM -0300, Jason Gunthorpe wrote:
> > > On Thu, Jun 20, 2024 at 04:01:08PM +0200, David Hildenbrand wrote:
> > > > Regarding huge p
On 20/06/2024 12:34, David Hildenbrand wrote:
> On 20.06.24 11:04, Ryan Roberts wrote:
>> On 20/06/2024 01:26, Barry Song wrote:
>>> From: Barry Song
>>>
>>> Both Ryan and Chris have been utilizing the small test program to aid
>>> in debugging and identifying issues with swap entry allocation. Wh
On Thu, 2024-06-20 at 13:13 -0400, Paul Moore wrote:
> On Thu, Jun 20, 2024 at 1:06 PM Roberto Sassu
> wrote:
> > On Thu, 2024-06-20 at 12:51 -0400, Paul Moore wrote:
> > > On Thu, Jun 20, 2024 at 12:31 PM Roberto Sassu
> > > wrote:
> > > > On Thu, 2024-06-20 at 12:08 -0400, Paul Moore wrote:
> >
99 matches
Mail list logo