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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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
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
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
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 ":"
>
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
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
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
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
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
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
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
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
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
+ 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
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
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
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
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,
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
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
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
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
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
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
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
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).
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
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
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.
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:
-
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
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
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
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:
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
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
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
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
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-
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
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-
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
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
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
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()
>
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
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:
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
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
63 matches
Mail list logo