Re: (subset) [PATCH HID v2 00/11] HID: bpf: add a new hook to control hid-generic

2024-09-13 Thread Benjamin Tissoires
On Sep 13 2024, Benjamin Tissoires wrote: > On Sep 13 2024, Benjamin Tissoires wrote: > > On Tue, 10 Sep 2024 23:43:36 +0900, Benjamin Tissoires wrote: > > > This is a slight change from the fundamentals of HID-BPF. > > > In theory, HID-BPF is abstract to the kernel itself, and makes > > > only cha

[GIT PULL] RCU changes for v6.12

2024-09-13 Thread Neeraj Upadhyay
Hello Linus, When the merge window opens, please pull this RCU update from: git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux.git tags/rcu.release.v6.12 # HEAD: 355debb83bf79853cde43579f88eed16adb1da29: Merge branches 'context_tracking.15.08.24a', 'csd.lock.15.08.24a', 'nocb.09.09.24

RE: [RFC PATCH 00/39] 1G page support for guest_memfd

2024-09-13 Thread Du, Fan
> -Original Message- > From: Ackerley Tng > Sent: Wednesday, September 11, 2024 7:44 AM > To: ta...@google.com; quic_eber...@quicinc.com; roy...@amazon.co.uk; > j...@nvidia.com; pet...@redhat.com; da...@redhat.com; > rient...@google.com; f...@google.com; jthough...@google.com; > sea...@g

Re: [PATCH bpf-next/net v6 3/3] selftests/bpf: Add mptcp subflow subtest

2024-09-13 Thread Martin KaFai Lau
On 9/11/24 8:16 AM, Matthieu Baerts (NGI0) wrote: +static void test_subflow(void) +{ + int cgroup_fd, prog_fd, err; + struct mptcp_subflow *skel; + struct nstoken *nstoken; + struct bpf_link *link; + + cgroup_fd = test__join_cgroup("/mptcp_subflow"); + if (!ASS

Re: [PATCH bpf-next/net v6 2/3] selftests/bpf: Add getsockopt to inspect mptcp subflow

2024-09-13 Thread Martin KaFai Lau
On 9/11/24 8:16 AM, Matthieu Baerts (NGI0) wrote: diff --git a/tools/testing/selftests/bpf/progs/mptcp_bpf.h b/tools/testing/selftests/bpf/progs/mptcp_bpf.h new file mode 100644 index ..179b74c1205f --- /dev/null +++ b/tools/testing/selftests/bpf/progs/mptcp_bpf.h @@ -0,0 +1,42 @@ +/

Re: [PATCH v3 0/6] livepatch: klp-convert tool - Minimal version

2024-09-13 Thread Josh Poimboeuf
On Thu, Sep 12, 2024 at 11:15:08AM -0400, Joe Lawrence wrote: > Anyway, now we have two RFC / patchsets supporting in-tree creation of > klp-relocations (klp-convert and Josh's objtool patchset). I think we > need to figure out whether one precludes the other, can they co-exist, > or does that eve

Re: [RFC 00/31] objtool, livepatch: Livepatch module generation

2024-09-13 Thread Josh Poimboeuf
On Fri, Sep 13, 2024 at 10:39:18AM -0400, Joe Lawrence wrote: > and now a happy kernel build and boot. Thanks! > A klp-build of the usual cmdline.patch succeeds, however it generates > some strange relocations: > > Relocation section '.rela.text' at offset 0x238 contains 6 entries: > Off

Re: [PATCH] selftests: mm: Fix build errors on armhf

2024-09-13 Thread Jeff Xu
On Mon, Aug 19, 2024 at 3:05 AM Muhammad Usama Anjum wrote: > > On 8/14/24 3:29 AM, Jeff Xu wrote: > > Hi Muhammad > > > > On Fri, Aug 9, 2024 at 1:25 AM Muhammad Usama Anjum > > wrote: > >> > >> The __NR_mmap isn't found on armhf. The mmap() is commonly available What is armhf ? is that arm64 ?

Re: [RFC PATCH 15/39] KVM: guest_memfd: hugetlb: allocate and truncate from hugetlb

2024-09-13 Thread Elliot Berman
On Tue, Sep 10, 2024 at 11:43:46PM +, Ackerley Tng wrote: > If HugeTLB is requested at guest_memfd creation time, HugeTLB pages > will be used to back guest_memfd. > > Signed-off-by: Ackerley Tng > --- > virt/kvm/guest_memfd.c | 252 ++--- > 1 file changed

Re: [PATCH bpf-next v2] selftests/bpf: convert test_xdp_features.sh to test_progs

2024-09-13 Thread Martin KaFai Lau
On 9/10/24 11:10 AM, Alexis Lothoré (eBPF Foundation) wrote: test_xdp_features.sh is a shell script allowing to test that xdp features advertised by an interface are indeed delivered. The test works by starting two instance of the same program, both attaching specific xdp programs to each side of

Re: [PATCH 0/3] rcu/nocb updates

2024-09-13 Thread Frederic Weisbecker
Le Fri, Sep 13, 2024 at 11:42:02PM +0200, Frederic Weisbecker a écrit : > Hi, > > This series include: > > * Fix another RT wake up while CPU is offline (reported by Cheng-Jui Wang) > * Cleanup rcuo wakeup > * Remove another superfluous barrier > > Thanks. > > Frederic Weisbecker (3): > rcu/n

[PATCH 3/3] rcu/nocb: Remove superfluous memory barrier after bypass enqueue

2024-09-13 Thread Frederic Weisbecker
Pre-GP accesses performed by the update side must be ordered against post-GP accesses performed by the readers. This is ensured by the bypass or nocb locking on enqueue time, followed by the fully ordered rnp locking initiated while callbacks are accelerated, and then propagated throughout the whol

[PATCH 2/3] rcu/nocb: Conditionally wake up rcuo if not already waiting on GP

2024-09-13 Thread Frederic Weisbecker
A callback enqueuer currently wakes up the rcuo kthread if it is adding the first non-done callback of a CPU, whether the kthread is waiting on a grace period or not (unless the CPU is offline). This looks like a desired behaviour because then the rcuo kthread doesn't wait for the end of the curre

[PATCH 1/3] rcu/nocb: Fix RT throttling hrtimer armed from offline CPU

2024-09-13 Thread Frederic Weisbecker
After a CPU is marked offline and until it reaches its final trip to idle, rcuo has several opportunities to be woken up, either because a callback has been queued in the meantime or because rcutree_report_cpu_dead() has issued the final deferred NOCB wake up. If RCU-boosting is enabled, RCU kthre

[PATCH 0/3] rcu/nocb updates

2024-09-13 Thread Frederic Weisbecker
Hi, This series include: * Fix another RT wake up while CPU is offline (reported by Cheng-Jui Wang) * Cleanup rcuo wakeup * Remove another superfluous barrier Thanks. Frederic Weisbecker (3): rcu/nocb: Fix RT throttling hrtimer armed from offline CPU rcu/nocb: Conditionally wake up rcuo if

[PATCH 5/5] rust: cleanup unnecessary casts

2024-09-13 Thread Gary Guo
With `long` mapped to `isize`, `size_t`/`__kernel_size_t` mapped to usize and `char` mapped to `u8`, many of the existing casts are no longer necessary. Signed-off-by: Gary Guo --- rust/kernel/kunit.rs | 10 ++ rust/kernel/print.rs | 4 ++-- rust/kernel/str.rs | 6 +++--- rust/

Re: [RFC PATCH 2/3] ipv6: Run a reverse sk_lookup on sendmsg.

2024-09-13 Thread Martin KaFai Lau
On 9/13/24 2:39 AM, Tiago Lam wrote: This follows the same rationale provided for the ipv4 counterpart, where it now runs a reverse socket lookup when source addresses and/or ports are changed, on sendmsg, to check whether egress traffic should be allowed to go through or not. As with ipv4, the

Re: [External] Re: [RFC 00/31] objtool, livepatch: Livepatch module generation

2024-09-13 Thread A K M Fazla Mehrab .
Hi Josh, On Thu, Sep 12, 2024 at 9:06 AM Song Liu wrote: [...] > > Red Hat (and Meta?) will start using it as soon as x86 support is ready, > > because IBT/LTO support is needed, which kpatch-build can't handle. > > While we (Meta) do have a workaround in kpatch to build livepatch for > kernels b

Re: [PATCH 08/13] media: i2c: imx214: Add vblank and hblank controls

2024-09-13 Thread Dave Stevenson
On Thu, 12 Sept 2024 at 15:51, Dave Stevenson wrote: > > Hi André & Ricardo > > On Thu, 12 Sept 2024 at 14:41, Ricardo Ribalda Delgado > wrote: > > > > Hi > > > > Arent you missing some chage in enum_frame_interval? > > Raw sensors shouldn't be using [enum|set|get]_frame_interval at all > https:/

Re: [PATCH v9 7/7] remoteproc: stm32: Add support of an OP-TEE TA to load the firmware

2024-09-13 Thread Mathieu Poirier
On Fri, Aug 30, 2024 at 11:51:47AM +0200, Arnaud Pouliquen wrote: > The new TEE remoteproc driver is used to manage remote firmware in a > secure, trusted context. The 'st,stm32mp1-m4-tee' compatibility is > introduced to delegate the loading of the firmware to the trusted > execution context. In s

Re: [PATCH v9 2/7] remoteproc: Add TEE support

2024-09-13 Thread Mathieu Poirier
On Fri, Aug 30, 2024 at 11:51:42AM +0200, Arnaud Pouliquen wrote: > Add a remoteproc TEE (Trusted Execution Environment) driver > that will be probed by the TEE bus. If the associated Trusted > application is supported on secure part this driver offers a client > interface to load a firmware by the

Re: [PATCH net] selftests: forwarding: Avoid false MDB delete/flush failures

2024-09-13 Thread Jakub Kicinski
On Fri, 13 Sep 2024 19:40:04 +1000 Jamie Bainbridge wrote: > Running this test on a small system produces different failures every > test checking deletions, and some flushes. From different test runs: This increases the runtime of the test 1m 25s -> 1m 35s sec which may be fine. But unfortunately

Re: [PATCH v1 0/5] Add Microchip IPC mailbox and remoteproc support

2024-09-13 Thread Mathieu Poirier
Hi Valentina, On Thu, 12 Sept 2024 at 10:48, Valentina Fernandez wrote: > > Hello all, > > This series adds support for the Microchip Inter-Processor Communication > (IPC) mailbox controller, as well as an IPC remoteproc platform driver. > > Microchip's family of RISC-V SoCs typically has one or

Re: [RFC 00/31] objtool, livepatch: Livepatch module generation

2024-09-13 Thread Joe Lawrence
On Thu, Sep 12, 2024 at 09:44:04AM -0400, Joe Lawrence wrote: > On Wed, Sep 11, 2024 at 12:39:42AM -0700, Josh Poimboeuf wrote: > > On Mon, Sep 02, 2024 at 08:59:43PM -0700, Josh Poimboeuf wrote: > > > Hi, > > > > > > Here's a new way to build livepatch modules called klp-build. > > > > > > I sta

Re: (subset) [PATCH HID v2 00/11] HID: bpf: add a new hook to control hid-generic

2024-09-13 Thread Benjamin Tissoires
On Sep 13 2024, Benjamin Tissoires wrote: > On Tue, 10 Sep 2024 23:43:36 +0900, Benjamin Tissoires wrote: > > This is a slight change from the fundamentals of HID-BPF. > > In theory, HID-BPF is abstract to the kernel itself, and makes > > only changes at the HID level (through report descriptors or

Re: (subset) [PATCH HID v2 00/11] HID: bpf: add a new hook to control hid-generic

2024-09-13 Thread Benjamin Tissoires
On Tue, 10 Sep 2024 23:43:36 +0900, Benjamin Tissoires wrote: > This is a slight change from the fundamentals of HID-BPF. > In theory, HID-BPF is abstract to the kernel itself, and makes > only changes at the HID level (through report descriptors or > events emitted to/from the device). > > Howeve

Re: [PATCH v2] rcu/kvfree: Add kvfree_rcu_barrier() API

2024-09-13 Thread Uladzislau Rezki
On Thu, Sep 12, 2024 at 11:07:24AM -0700, Paul E. McKenney wrote: > On Thu, Sep 12, 2024 at 06:16:56PM +0200, Uladzislau Rezki wrote: > > On Wed, Sep 11, 2024 at 03:39:19AM -0700, Paul E. McKenney wrote: > > > On Wed, Sep 11, 2024 at 11:43:54AM +0200, Uladzislau Rezki wrote: > > > > On Tue, Sep 10,

Re: [RFC PATCH 3/3] bpf: Add sk_lookup test to use ORIGDSTADDR cmsg.

2024-09-13 Thread Philo Lu
Hi Tiago, On 2024/9/13 17:39, Tiago Lam wrote: This patch reuses the framework already in place for sk_lookup, allowing it now to send a reply from the server fd directly, instead of having to create a socket bound to the original destination address and reply from there. It does this by passing

Re: [PATCH v4 1/2] Introduce klp_ops into klp_func structure

2024-09-13 Thread zhang warden
Hi, Miroslav & Petr > On Sep 6, 2024, at 17:44, zhang warden wrote: > >> > + struct list_head func_stack; > + struct ftrace_ops fops; > +}; > + > > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > index 52426665eecc..e4572bf34316 10

[PATCH net] selftests: forwarding: Avoid false MDB delete/flush failures

2024-09-13 Thread Jamie Bainbridge
Running this test on a small system produces different failures every test checking deletions, and some flushes. From different test runs: TEST: Common host entries configuration tests (L2)[FAIL] Failed to delete L2 host entry TEST: Common port group entries configuration tests

[RFC PATCH 2/3] ipv6: Run a reverse sk_lookup on sendmsg.

2024-09-13 Thread Tiago Lam
This follows the same rationale provided for the ipv4 counterpart, where it now runs a reverse socket lookup when source addresses and/or ports are changed, on sendmsg, to check whether egress traffic should be allowed to go through or not. As with ipv4, the ipv6 sendmsg path is also extended here

[RFC PATCH 3/3] bpf: Add sk_lookup test to use ORIGDSTADDR cmsg.

2024-09-13 Thread Tiago Lam
This patch reuses the framework already in place for sk_lookup, allowing it now to send a reply from the server fd directly, instead of having to create a socket bound to the original destination address and reply from there. It does this by passing the source address and port from where to reply f

[RFC PATCH 0/3] Allow sk_lookup UDP return traffic to egress.

2024-09-13 Thread Tiago Lam
Currently, sk_lookup allows an ebpf program to run on the ingress socket lookup path, and accept traffic not only on a range of addresses, but also on a range of ports. At Cloudflare we use sk_lookup for two main cases: 1. Sharing a single port between multiple services - i.e. two services (or m

[RFC PATCH 1/3] ipv4: Run a reverse sk_lookup on sendmsg.

2024-09-13 Thread Tiago Lam
In order to check if egress traffic should be allowed through, we run a reverse socket lookup (i.e. normal socket lookup with the src/dst addresses and ports reversed) to check if the corresponding ingress traffic is allowed in. Thus, if there's a sk_lookup reverse call returns a socket that match

Re: [PATCH v2 16/19] gendwarfksyms: Add support for reserved structure fields

2024-09-13 Thread Benno Lossin
On 13.09.24 00:37, Sami Tolvanen wrote: > Hi, > > On Thu, Sep 12, 2024 at 2:58 PM Benno Lossin wrote: >> >> On 12.09.24 22:58, Sami Tolvanen wrote: >>> That's an interesting point. Is the problem that you cannot assign >>> arbitrary values to the Rust enum that bindgen generates, or is using >>>

Re: [PATCH bpf-next v2] selftests/bpf: convert test_xdp_features.sh to test_progs

2024-09-13 Thread Simon Horman
On Thu, Sep 12, 2024 at 10:17:13PM +0200, Alexis Lothoré wrote: > Hi Simon, > > On 9/11/24 16:18, Simon Horman wrote: > > [...] > > >> diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_features.c > >> b/tools/testing/selftests/bpf/prog_tests/xdp_features.c > >> new file mode 100644 > >> i