Re: [PATCH v21 18/24] ovpn: add support for peer floating

2025-03-07 Thread Sabrina Dubroca
2025-03-06, 11:02:50 +0100, Antonio Quartulli wrote: > On 05/03/2025 17:56, Sabrina Dubroca wrote: > > 2025-03-05, 14:14:36 +0100, Antonio Quartulli wrote: > > > On 05/03/2025 12:20, Sabrina Dubroca wrote: > > > > 2025-03-05, 00:19:32 +0100, Antonio Quartulli wrote: > > > > > On 04/03/2025 19:37, S

[PATCH v9 5/6] scanf: tidy header `#include`s

2025-03-07 Thread Tamir Duberstein
Remove the unused `kernel.h`. Replace `string.h` with `sprintf.h` as the former doesn't seem to be used directly. Signed-off-by: Tamir Duberstein --- lib/tests/scanf_kunit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/tests/scanf_kunit.c b/lib/tests/scanf_kunit.c in

[PATCH 0/2] arm64: livepatch: Enable livepatch without sframe

2025-03-07 Thread Song Liu
There are recent efforts to enable livepatch for arm64, with sframe [1] or without sframe [2]. This set tries to enable livepatch without sframe. Some of the code, however, are from [1]. Although the sframe implementation is more promising in longer term, it suffers from the following issues: 1

[PATCH 1/2] arm64: Implement arch_stack_walk_reliable

2025-03-07 Thread Song Liu
With proper exception boundary detection, it is possible to implment arch_stack_walk_reliable without sframe. Note that, arch_stack_walk_reliable does not guarantee getting reliable stack in all scenarios. Instead, it can reliably detect when the stack trace is not reliable, which is enough to pro

[PATCH 2/2] arm64: Implement HAVE_LIVEPATCH

2025-03-07 Thread Song Liu
This is largely based on [1] by Suraj Jitindar Singh. Test coverage: - Passed manual tests with samples/livepatch. - Passed all but test-kprobe.sh in selftests/livepatch. test-kprobe.sh is expected to fail, because arm64 doesn't have KPROBES_ON_FTRACE. - Passed tests with kpatch-build [2]. (T

Re: [PATCH] rust: enable `clippy::ptr_as_ptr` lint

2025-03-07 Thread Tamir Duberstein
On Fri, Mar 7, 2025 at 12:04 PM Benno Lossin wrote: > > On Fri Mar 7, 2025 at 5:58 PM CET, Benno Lossin wrote: > > On Fri Mar 7, 2025 at 5:41 PM CET, Tamir Duberstein wrote: > >> In Rust 1.51.0, Clippy introduced the `ignored_unit_patterns` lint [1]: > > > > You link to the `ptr_as_ptr` lint thoug

[PATCH v10 7/8] mm/truncate: use folio_split() in truncate operation

2025-03-07 Thread Zi Yan
Instead of splitting the large folio uniformly during truncation, try to use buddy allocator like folio_split() at the start and the end of a truncation range to minimize the number of resulting folios if it is supported. try_folio_split() is introduced to use folio_split() if supported and it fall

[PATCH v10 8/8] selftests/mm: add tests for folio_split(), buddy allocator like split

2025-03-07 Thread Zi Yan
It splits page cache folios to orders from 0 to 8 at different in-folio offset. Signed-off-by: Zi Yan Cc: Baolin Wang Cc: David Hildenbrand Cc: Hugh Dickins Cc: John Hubbard Cc: Kefeng Wang Cc: Kirill A. Shuemov Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Ryan Roberts Cc: Yang Shi Cc: Yu Zhao

Re: [PATCH] rust: enable `clippy::ptr_as_ptr` lint

2025-03-07 Thread Miguel Ojeda
On Fri, Mar 7, 2025 at 5:58 PM Benno Lossin wrote: > > You link to the `ptr_as_ptr` lint though, is this a typo? I think Tamir was following the pattern of commit 3fcc23397628 ("rust: enable `clippy::ignored_unit_patterns` lint"), which I appreciate! :) Cheers, Miguel

Re: [PATCH] rust: enable `clippy::ptr_as_ptr` lint

2025-03-07 Thread Tamir Duberstein
On Fri, Mar 7, 2025 at 1:27 PM Miguel Ojeda wrote: > > On Fri, Mar 7, 2025 at 5:58 PM Benno Lossin wrote: > > > > You link to the `ptr_as_ptr` lint though, is this a typo? > > I think Tamir was following the pattern of commit 3fcc23397628 ("rust: > enable `clippy::ignored_unit_patterns` lint"), w

Re: [PATCH v9 5/6] scanf: tidy header `#include`s

2025-03-07 Thread Andy Shevchenko
On Fri, Mar 07, 2025 at 07:34:29PM +0200, Andy Shevchenko wrote: > On Fri, Mar 07, 2025 at 06:27:38AM -0500, Tamir Duberstein wrote: ... > > #include > > + array_size.h > > > #include > + bug.h // BUILD_BUG_ON() Actually if it's only BUILD_BUG_ON(), then we better use build_bug.h. > + er

[PATCH v10 4/8] mm/huge_memory: add buddy allocator like (non-uniform) folio_split()

2025-03-07 Thread Zi Yan
folio_split() splits a large folio in the same way as buddy allocator splits a large free page for allocation. The purpose is to minimize the number of folios after the split. For example, if user wants to free the 3rd subpage in a order-9 folio, folio_split() will split the order-9 folio as: O-0,

[PATCH v10 5/8] mm/huge_memory: remove the old, unused __split_huge_page()

2025-03-07 Thread Zi Yan
Now split_huge_page_to_list_to_order() uses the new backend split code in __split_unmapped_folio(), the old __split_huge_page() and __split_huge_page_tail() can be removed. Signed-off-by: Zi Yan Cc: Baolin Wang Cc: David Hildenbrand Cc: Hugh Dickins Cc: John Hubbard Cc: Kefeng Wang Cc: Kiril

Re: [PATCH v5 bpf-next 2/2] selftests/bpf: Add a kernel flag test for LSM bpf hook

2025-03-07 Thread Song Liu
On Fri, Mar 7, 2025 at 1:37 PM Blaise Boscaccy wrote: > > This test exercises the kernel flag added to security_bpf by > effectively blocking light-skeletons from loading while allowing > normal skeletons to function as-is. Since this should work with any > arbitrary BPF program, an existing progr

[PATCH v9 0/6] scanf: convert self-test to KUnit

2025-03-07 Thread Tamir Duberstein
This is one of just 3 remaining "Test Module" kselftests (the others being bitmap and printf), the rest having been converted to KUnit. In addition to the enclosed patch, please consider this an RFC on the removal of the "Test Module" kselftest machinery. I tested this using: $ tools/testing/kuni

[PATCH v9 1/6] scanf: implicate test line in failure messages

2025-03-07 Thread Tamir Duberstein
This improves the failure output by pointing to the failing line at the top level of the test. Reviewed-by: Petr Mladek Tested-by: Petr Mladek Signed-off-by: Tamir Duberstein --- lib/test_scanf.c | 66 1 file changed, 33 insertions(+), 3

[PATCH v9 2/6] scanf: remove redundant debug logs

2025-03-07 Thread Tamir Duberstein
Remove `pr_debug` calls which emit information already contained in `pr_warn` calls that occur on test failure. This reduces unhelpful test verbosity. Note that a `pr_debug` removed from `_check_numbers_template` appears to have been the only guard against silent false positives, but in fact this

[PATCH v9 6/6] scanf: further break kunit into test cases

2025-03-07 Thread Tamir Duberstein
This gives us more granular test output. Output before: > KTAP version 1 > 1..1 > KTAP version 1 > # Subtest: scanf > # module: scanf_kunit > 1..10 > ok 1 numbers_simple > KTAP version 1 > # Subtest: numbers_list > ok 1 " " > ok 2 ":" >

[PATCH v9 4/6] scanf: break kunit into test cases

2025-03-07 Thread Tamir Duberstein
Use `suite_init` and move some tests into `scanf_test_cases`. This gives us nicer output in the event of a failure. Reviewed-by: David Gow Signed-off-by: Tamir Duberstein --- lib/tests/scanf_kunit.c | 82 - 1 file changed, 47 insertions(+), 35 del

Re: [PATCH bpf-next v2 1/3] bpf, sockmap: avoid using sk_socket after free

2025-03-07 Thread Michal Luczaj
On 2/28/25 06:51, Jiayuan Chen wrote: > ... > static void sk_psock_verdict_data_ready(struct sock *sk) > { > - struct socket *sock = sk->sk_socket; > + struct socket *sock; > const struct proto_ops *ops; > int copied; > > trace_sk_data_ready(sk); > > + /* We need

[PATCH v3 0/2] Add Goodix Berlin-A series support

2025-03-07 Thread Jens Reidel
This series adds support for the Goodix Berlin-A series touch ICs (gt9897). This was tested on a Xiaomi 11 Lite 5G NE (xiaomi-lisa), which uses the gt9897 IC connected over SPI. I am not aware of any device that has gt9897 connected over I2C and therefore could not test it, so I didn't add a compat

[PATCH v3 1/2] dt-bindings: input: goodix,gt9916: Document gt9897 compatible

2025-03-07 Thread Jens Reidel
Document the Goodix GT9897 which is a Berlin-A series touchscreen controller IC by Goodix. Acked-by: Rob Herring (Arm) Signed-off-by: Jens Reidel --- .../devicetree/bindings/input/touchscreen/goodix,gt9916.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bi

Re: [PATCH v3 2/2] Input: goodix_berlin - Add support for Berlin-A series

2025-03-07 Thread Neil Armstrong
On 07/03/2025 10:48, Jens Reidel wrote: The current implementation of the goodix_berlin driver lacks support for revisions A and B of the Berlin IC. This change adds support for the gt9897 IC, which is a Berlin-A revision part. The differences between revision D and A are rather minor, a handful

Re: [PATCH v1 18/19] Documentation/livepatch: Update documentation for state, callbacks, and shadow variables

2025-03-07 Thread Joe Lawrence
On 3/7/25 07:26, Petr Mladek wrote: > On Thu 2025-03-06 17:54:41, Joe Lawrence wrote: >> >> With that in mind, a livepatch state could be thought of as an >> indication of "a context needing special handling in a (versioned) way". > > I am not sure about the word "context". But it might be because

Re: [PATCH net-next 2/2] vsock/test: Add test for null ptr deref when transport changes

2025-03-07 Thread Michal Luczaj
On 3/6/25 17:09, Luigi Leonardi wrote: > Add a new test to ensure that when the transport changes a null pointer > dereference does not occur[1]. > > Note that this test does not fail, but it may hang on the client side if > it triggers a kernel oops. > > This works by creating a socket, trying t

Re: [PATCH v2] kunit: tool: Fix bug in parsing test plan

2025-03-07 Thread Brendan Jackman
On Thu, 6 Mar 2025 at 19:20, Rae Moar wrote: > > A bug was identified where the KTAP below caused an infinite loop: > > TAP version 13 > ok 4 test_case > 1..4 > > The infinite loop was caused by the parser not parsing a test plan > if following a test result line. > > Fix this bug to correctly

Re: [PATCHv5 net 1/3] bonding: fix calling sleeping function in spin lock and some race conditions

2025-03-07 Thread Hangbin Liu
On Fri, Mar 07, 2025 at 10:33:57AM +0200, Nikolay Aleksandrov wrote: > On 3/7/25 10:11, Hangbin Liu wrote: > > Hi Nikolay, > > On Fri, Mar 07, 2025 at 09:42:49AM +0200, Nikolay Aleksandrov wrote: > >> On 3/7/25 05:19, Hangbin Liu wrote: > >>> The fixed commit placed mutex_lock() inside spin_lock_bh

Re: [PATCH] module: Taint the kernel when write-protecting ro_after_init fails

2025-03-07 Thread Luis Chamberlain
+ linux-mm since we're adding TAINT_BAD_PAGE On Thu, Mar 06, 2025 at 11:36:55AM +0100, Petr Pavlu wrote: > In the unlikely case that setting ro_after_init data to read-only fails, it > is too late to cancel loading of the module. The loader then issues only > a warning about the situation. Given t

Re: [PATCH v2 0/2] Fix xdp_adjust_frags_tail_grow selftest on powerpc

2025-03-07 Thread Venkat Rao Bagalkote
On 05/03/25 10:43 pm, Saket Kumar Bhaskar wrote: For platforms on powerpc architecture with a default page size greater than 4096, there was an inconsistency in fragment size calculation. This caused the BPF selftest xdp_adjust_tail/xdp_adjust_frags_tail_grow to fail on powerpc. The issue occu

Re: [PATCH v9 2/8] mm/huge_memory: add two new (not yet used) functions for folio_split()

2025-03-07 Thread Zi Yan
On 6 Mar 2025, at 11:21, Zi Yan wrote: > On 5 Mar 2025, at 17:38, Hugh Dickins wrote: > >> On Wed, 5 Mar 2025, Zi Yan wrote: >>> On 5 Mar 2025, at 16:03, Hugh Dickins wrote: Beyond checking that, I didn't have time yesterday to investigate further, but I'll try again today (still us

[PATCH v9 3/6] scanf: convert self-test to KUnit

2025-03-07 Thread Tamir Duberstein
Convert the scanf() self-test to a KUnit test. In the interest of keeping the patch reasonably-sized this doesn't refactor the tests into proper parameterized tests - it's all one big test case. Reviewed-by: David Gow Reviewed-by: Petr Mladek Tested-by: Petr Mladek Signed-off-by: Tamir Duberst

Re: [PATCH net] ipvs: prevent integer overflow in do_ip_vs_get_ctl()

2025-03-07 Thread Jan Engelhardt
On Friday 2025-03-07 14:44, Dan Carpenter wrote: > case IP_VS_SO_GET_SERVICES: > { > struct ip_vs_get_services *get; >- int size; >+ size_t size; > > get = (struct ip_vs_get_services *)arg; > size = struct_size(get,

[PATCH v3 2/2] Input: goodix_berlin - Add support for Berlin-A series

2025-03-07 Thread Jens Reidel
The current implementation of the goodix_berlin driver lacks support for revisions A and B of the Berlin IC. This change adds support for the gt9897 IC, which is a Berlin-A revision part. The differences between revision D and A are rather minor, a handful of address changes and a slightly larger

[PATCH net] ipvs: prevent integer overflow in do_ip_vs_get_ctl()

2025-03-07 Thread Dan Carpenter
The get->num_services variable is an unsigned int which is controlled by the user. The struct_size() function ensures that the size calculation does not overflow an unsigned long, however, we are saving the result to an int so the calculation can overflow. Save the result from struct_size() type

[PATCH bpf-next 0/2] selftests/bpf: Move test_lwt_seg6local to test_progs

2025-03-07 Thread Bastien Curutchet (eBPF Foundation)
Hi all, This patch series continues the work to migrate the script tests into prog_tests. test_lwt_seg6local.sh tests some bpf_lwt_* helpers. It contains only one test that uses a network topology quite different than the ones that can be found in others prog_tests/lwt_*.c files so I add a new pr

Re: [PATCH v1 18/19] Documentation/livepatch: Update documentation for state, callbacks, and shadow variables

2025-03-07 Thread Petr Mladek
On Thu 2025-03-06 17:54:41, Joe Lawrence wrote: > On 1/15/25 03:24, Petr Mladek wrote: > > This commit updates the livepatch documentation to reflect recent changes > > in the behavior of states, callbacks, and shadow variables. > > > > Key changes include: > > > > - Per-state callbacks replace p

Re: [PATCHv5 net 1/3] bonding: fix calling sleeping function in spin lock and some race conditions

2025-03-07 Thread Jakub Kicinski
On Fri, 7 Mar 2025 09:42:49 +0200 Nikolay Aleksandrov wrote: > TBH, keeping buggy code with a comment doesn't sound good to me. I'd rather > remove this > support than tell people "good luck, it might crash". It's better to be safe > until a > correct design is in place which takes care of these

Re: [PATCHv5 net 1/3] bonding: fix calling sleeping function in spin lock and some race conditions

2025-03-07 Thread Nikolay Aleksandrov
On 3/7/25 10:11, Hangbin Liu wrote: > Hi Nikolay, > On Fri, Mar 07, 2025 at 09:42:49AM +0200, Nikolay Aleksandrov wrote: >> On 3/7/25 05:19, Hangbin Liu wrote: >>> The fixed commit placed mutex_lock() inside spin_lock_bh(), which triggers >>> a warning: >>> >>> BUG: sleeping function called from

[PATCH v8 0/3] rust: kunit: Support KUnit tests with a user-space like syntax

2025-03-07 Thread David Gow
Hi all, This is v8 of the Rust/KUnit integration patch. I think all of the suggestions have at least been responded to (even if there are a few I'm leaving as either future projects or matters of taste). Hopefully this is good-to-go for 6.15, so we can start using it concurrently with making any a

[PATCH v8 1/3] rust: kunit: add KUnit case and suite macros

2025-03-07 Thread David Gow
From: José Expósito Add a couple of Rust const functions and macros to allow to develop KUnit tests without relying on generated C code: - The `kunit_unsafe_test_suite!` Rust macro is similar to the `kunit_test_suite` C macro. It requires a NULL-terminated array of test cases (see below).

[PATCH v8 2/3] rust: macros: add macro to easily run KUnit tests

2025-03-07 Thread David Gow
From: José Expósito Add a new procedural macro (`#[kunit_tests(kunit_test_suit_name)]`) to run KUnit tests using a user-space like syntax. The macro, that should be used on modules, transforms every `#[test]` in a `kunit_case!` and adds a `kunit_unsafe_test_suite!` registering all of them. The

[PATCH bpf-next 2/2] selftests/bpf: lwt_seg6local: Move test to test_progs

2025-03-07 Thread Bastien Curutchet (eBPF Foundation)
test_lwt_seg6local.sh isn't used by the BPF CI. Add a new file in the test_progs framework to migrate the tests done by test_lwt_seg6local.sh. It uses the same network topology and the same BPF programs located in progs/test_lwt_seg6local.c. Use the network helpers instead of `nc` to exchange the

[PATCH bpf-next 1/2] selftests/bpf: lwt_seg6local: Remove unused routes

2025-03-07 Thread Bastien Curutchet (eBPF Foundation)
Some routes in fb00:: are initialized during setup, even though they aren't needed by the test as the UDP packets will travel through the lightweight tunnels. Remove these unnecessary routes. Signed-off-by: Bastien Curutchet (eBPF Foundation) --- tools/testing/selftests/bpf/test_lwt_seg6local.

[PATCH v8 3/3] rust: kunit: allow to know if we are in a test

2025-03-07 Thread David Gow
From: José Expósito In some cases, we need to call test-only code from outside the test case, for example, to mock a function or a module. In order to check whether we are in a test or not, we need to test if `CONFIG_KUNIT` is set. Unfortunately, we cannot rely only on this condition because: -

[PATCHv5 net 1/3] bonding: fix calling sleeping function in spin lock and some race conditions

2025-03-07 Thread Hangbin Liu
The fixed commit placed mutex_lock() inside spin_lock_bh(), which triggers a warning: BUG: sleeping function called from invalid context at... Fix this by moving the IPsec deletion operation to bond_ipsec_free_sa, which is not held by spin_lock_bh(). Additionally, there are also some race cond

[PATCH net-next v6 3/4] virtio-net: Map NAPIs to queues

2025-03-07 Thread Joe Damato
Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping can be accessed by user apps. Note that the netif_queue_set_napi currently requires RTNL, so care must be taken to ensure RTNL is held on paths where this API might be reached. The paths in the driver where this API can be reac

[PATCH v6 bpf-next 0/2] security: Propagate caller information in bpf hooks

2025-03-07 Thread Blaise Boscaccy
Hello, While trying to implement an eBPF gatekeeper program, we ran into an issue whereas the LSM hooks are missing some relevant data. Certain subcommands passed to the bpf() syscall can be invoked from either the kernel or userspace. Additionally, some fields in the bpf_attr struct contain poin

[PATCH v6 bpf-next 2/2] selftests/bpf: Add a kernel flag test for LSM bpf hook

2025-03-07 Thread Blaise Boscaccy
This test exercises the kernel flag added to security_bpf by effectively blocking light-skeletons from loading while allowing normal skeletons to function as-is. Since this should work with any arbitrary BPF program, an existing program from LSKELS_EXTRA was used as a test payload. Signed-off-by:

[PATCH v6 bpf-next 1/2] security: Propagate caller information in bpf hooks

2025-03-07 Thread Blaise Boscaccy
Certain bpf syscall subcommands are available for usage from both userspace and the kernel. LSM modules or eBPF gatekeeper programs may need to take a different course of action depending on whether or not a BPF syscall originated from the kernel or userspace. Additionally, some of the bpf_attr st

Re: [PATCH bpf-next 0/2] selftests/bpf: Move test_lwt_seg6local to test_progs

2025-03-07 Thread Stanislav Fomichev
On 03/07, Bastien Curutchet (eBPF Foundation) wrote: > Hi all, > > This patch series continues the work to migrate the script tests into > prog_tests. > > test_lwt_seg6local.sh tests some bpf_lwt_* helpers. It contains only one > test that uses a network topology quite different than the ones tha

Re: [PATCH v3 0/2] scanf: convert self-test to KUnit

2025-03-07 Thread Kees Cook
On Tue, Feb 04, 2025 at 02:25:54PM -0500, Tamir Duberstein wrote: > lib/scanf_kunit.c| 800 ++ > lib/test_scanf.c | 814 > --- If you can rebase this on -next and folks Ack it, I can carry this

Re: [PATCH v9 5/6] scanf: tidy header `#include`s

2025-03-07 Thread Andy Shevchenko
On Fri, Mar 07, 2025 at 06:27:38AM -0500, Tamir Duberstein wrote: > Remove the unused `kernel.h`. Replace `string.h` with `sprintf.h` as the > former doesn't seem to be used directly. ... > #include + array_size.h > #include + bug.h // BUILD_BUG_ON() + errno.h // actually asm/errno.h, but

[PATCH v10 0/8] Buddy allocator like (or non-uniform) folio split

2025-03-07 Thread Zi Yan
Hi all, This patchset adds a new buddy allocator like (or non-uniform) large folio split from a order-n folio to order-m with m < n. It reduces 1. the total number of after-split folios from 2^(n-m) to n-m+1; 2. the amount of memory needed for multi-index xarray split from 2^(n/6-m/6) to n/6-

Re: [PATCH v2 5/5] tools/nolibc: mark more test functions as static

2025-03-07 Thread Thomas Weißschuh
On 2025-03-04 07:58:19+, Louis Taylor wrote: > It was mentioned that a new test_ function should be static, so go back > over existing functions and mark those static as well. Actually Willy wants these non-static for debugging purposes. I can't seem to get that into my head -.- Let's drop thi

[PATCH v10 3/8] mm/huge_memory: move folio split common code to __folio_split()

2025-03-07 Thread Zi Yan
This is a preparation patch for folio_split(). In the upcoming patch folio_split() will share folio unmapping and remapping code with split_huge_page_to_list_to_order(), so move the code to a common function __folio_split() first. Add a TODO for splitting large shmem folio in swap cache. Signed-

[PATCH v10 2/8] mm/huge_memory: add two new (not yet used) functions for folio_split()

2025-03-07 Thread Zi Yan
This is a preparation patch, both added functions are not used yet. The added __split_unmapped_folio() is able to split a folio with its mapping removed in two manners: 1) uniform split (the existing way), and 2) buddy allocator like (or non-uniform) split. The added __split_folio_to_order() can

[PATCH v10 1/8] xarray: add xas_try_split() to split a multi-index entry

2025-03-07 Thread Zi Yan
A preparation patch for non-uniform folio split, which always split a folio into half iteratively, and minimal xarray entry split. Currently, xas_split_alloc() and xas_split() always split all slots from a multi-index entry. They cost the same number of xa_node as the to-be-split slots. For exam

[PATCH v10 6/8] mm/huge_memory: add folio_split() to debugfs testing interface

2025-03-07 Thread Zi Yan
This allows to test folio_split() by specifying an additional in folio page offset parameter to split_huge_page debugfs interface. Signed-off-by: Zi Yan Cc: Baolin Wang Cc: David Hildenbrand Cc: Hugh Dickins Cc: John Hubbard Cc: Kefeng Wang Cc: Kirill A. Shuemov Cc: Matthew Wilcox Cc: Miao

Re: [PATCH v9 5/6] scanf: tidy header `#include`s

2025-03-07 Thread Tamir Duberstein
On Fri, Mar 7, 2025 at 12:40 PM Andy Shevchenko wrote: > > On Fri, Mar 07, 2025 at 07:34:29PM +0200, Andy Shevchenko wrote: > > On Fri, Mar 07, 2025 at 06:27:38AM -0500, Tamir Duberstein wrote: > > ... > > > > #include > > > > + array_size.h > > > > > #include > > > + bug.h // BUILD_BUG_ON() >

Re: [PATCH v9 2/8] mm/huge_memory: add two new (not yet used) functions for folio_split()

2025-03-07 Thread David Hildenbrand
On 06.03.25 17:27, Zi Yan wrote: On 6 Mar 2025, at 4:19, David Hildenbrand wrote: On 05.03.25 22:08, Zi Yan wrote: On 5 Mar 2025, at 15:50, Hugh Dickins wrote: On Wed, 5 Mar 2025, Zi Yan wrote: On 4 Mar 2025, at 6:49, Hugh Dickins wrote: I think (might be wrong, I'm in a rush) my mods are

[PATCH v5 bpf-next 2/2] selftests/bpf: Add a kernel flag test for LSM bpf hook

2025-03-07 Thread Blaise Boscaccy
This test exercises the kernel flag added to security_bpf by effectively blocking light-skeletons from loading while allowing normal skeletons to function as-is. Since this should work with any arbitrary BPF program, an existing program from LSKELS_EXTRA was used as a test payload. Signed-off-by:

[PATCH v5 bpf-next 1/2] security: Propagate caller information in bpf hooks

2025-03-07 Thread Blaise Boscaccy
Certain bpf syscall subcommands are available for usage from both userspace and the kernel. LSM modules or eBPF gatekeeper programs may need to take a different course of action depending on whether or not a BPF syscall originated from the kernel or userspace. Additionally, some of the bpf_attr st

[PATCH v5 bpf-next 0/2] security: Propagate caller information in bpf hooks

2025-03-07 Thread Blaise Boscaccy
Hello, While trying to implement an eBPF gatekeeper program, we ran into an issue whereas the LSM hooks are missing some relevant data. Certain subcommands passed to the bpf() syscall can be invoked from either the kernel or userspace. Additionally, some fields in the bpf_attr struct contain poin