[PATCH] selftests: pidfd: Fix compiling errors and warning

2025-02-04 Thread I Hsin Cheng
When compiling selftests files under tools/testing/selftests/pidfd/ , some compiling errors and warnings will pop out as the following. CC pidfd_fdinfo_test pidfd_fdinfo_test.c: In function ‘child_fdinfo_nspid_test’: pidfd_fdinfo_test.c:231:13: warning: implicit declaration of function \ ‘

Re: [RFC PATCH 0/2] livepatch: Add support for hybrid mode

2025-02-04 Thread Yafang Shao
On Tue, Feb 4, 2025 at 9:05 PM Petr Mladek wrote: > > On Mon 2025-02-03 17:44:52, Yafang Shao wrote: > > On Fri, Jan 31, 2025 at 9:18 PM Miroslav Benes wrote: > > > > > > > > > > > > > + What exactly is meant by frequent replacements (busy loop?, once > > > > > a minute?) > > > > > > > > The s

[PATCH] selftests: pidfd: Fix compiling warning of pidfs_setns

2025-02-04 Thread I Hsin Cheng
In the compilation of pidfs_setns_test.c , a warning as the following will pop out. pidfd_setns_test.c: In function ‘current_nsset_setup’: pidfd_setns_test.c:173:54: warning: implicit declaration of function \ ‘ioctl’ [-Wimplicit-function-declaration] 173 | self->child_pidfd_deri

Re: [PATCH v7 6/6] selftests/mm: use PIDFD_SELF in guard pages test

2025-02-04 Thread Shakeel Butt
On Thu, Jan 30, 2025 at 08:40:31PM +, Lorenzo Stoakes wrote: > Now we have PIDFD_SELF available for process_madvise(), make use of it in > the guard pages test. > > This is both more convenient and asserts that PIDFD_SELF works as expected. > > Signed-off-by: Lorenzo Stoakes Reviewed-by: Sh

Re: [PATCH v7 5/6] selftests: pidfd: add tests for PIDFD_SELF_*

2025-02-04 Thread Shakeel Butt
On Thu, Jan 30, 2025 at 08:40:30PM +, Lorenzo Stoakes wrote: > Add tests to assert that PIDFD_SELF* correctly refers to the current > thread and process. > > We explicitly test pidfd_send_signal(), however We defer testing of > mm-specific functionality which uses pidfd, namely process_madvise

Re: [PATCH v7 3/6] tools: testing: separate out wait_for_pid() into helper header

2025-02-04 Thread Shakeel Butt
On Thu, Jan 30, 2025 at 08:40:28PM +, Lorenzo Stoakes wrote: > It seems tests other than the pidfd tests use the wait_for_pid() function > declared in pidfd.h. > > Since we will shortly be modifying pidfd.h in a way that might clash with > other tests, separate this out and update tests accord

Re: [PATCH] selftests/mm: Fix thuge-gen test name uniqueness

2025-02-04 Thread Dev Jain
On 05/02/25 4:23 am, Mark Brown wrote: The thuge-gen test_mmap() and test_shmget() tests are repeatedly run for a variety of sizes but always report the result of their test with the same name, meaning that automated sysetms running the tests are unable to distinguish between the various tests

Re: [PATCH v7 2/6] selftests/pidfd: add missing system header imcludes to pidfd tests

2025-02-04 Thread Shakeel Butt
On Thu, Jan 30, 2025 at 08:40:27PM +, Lorenzo Stoakes wrote: > The pidfd_fdinfo_test.c and pidfd_setns_test.c tests appear to be missing > fundamental system header imports required to execute correctly. Add these. > > Signed-off-by: Lorenzo Stoakes Reviewed-by: Shakeel Butt

[PATCH v6 2/7] mm/huge_memory: move folio split common code to __folio_split()

2025-02-04 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. Signed-off-by: Zi Yan --- mm/huge_memory.c | 107 +++

[PATCH v6 6/7] mm/truncate: use buddy allocator like folio split for truncate operation.

2025-02-04 Thread Zi Yan
Instead of splitting the large folio uniformly during truncation, try to use buddy allocator like split at the start of 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 fall back to uniform split ot

[PATCH v6 7/7] selftests/mm: add tests for folio_split(), buddy allocator like split.

2025-02-04 Thread Zi Yan
It splits page cache folios to orders from 0 to 8 at different in-folio offset. Signed-off-by: Zi Yan --- .../selftests/mm/split_huge_page_test.c | 34 +++ 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/mm/split_huge_page_test.c b/to

[PATCH v6 5/7] mm/huge_memory: add folio_split() to debugfs testing interface.

2025-02-04 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 --- mm/huge_memory.c | 47 ++- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/mm/h

[PATCH v6 4/7] mm/huge_memory: remove the old, unused __split_huge_page()

2025-02-04 Thread Zi Yan
Now split_huge_page_to_list_to_order() uses the new backend split code in __folio_split_without_mapping(), the old __split_huge_page() and __split_huge_page_tail() can be removed. Signed-off-by: Zi Yan --- mm/huge_memory.c | 207 --- 1 file changed, 20

[PATCH v6 3/7] mm/huge_memory: add buddy allocator like folio_split()

2025-02-04 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 v6 0/7] Buddy allocator like (or non-uniform) folio split

2025-02-04 Thread Zi Yan
Hi all, This patchset adds a new buddy allocator like (or non-uniform) large folio split to reduce the total number of after-split folios, the amount of memory needed for multi-index xarray split, and keep more large folios after a split. It is on top of mm-everything-2025-02-01-05-58. It is ready

[PATCH v6 1/7] mm/huge_memory: add two new (not yet used) functions for folio_split()

2025-02-04 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 split. The added __split_folio_to_order() can split a folio int

Re: [RFC PATCH 2/2] livepatch: Implement livepatch hybrid mode

2025-02-04 Thread Yafang Shao
On Tue, Feb 4, 2025 at 9:21 PM Petr Mladek wrote: > > On Mon 2025-01-27 23:34:50, Yafang Shao wrote: > > On Mon, Jan 27, 2025 at 10:31 PM Petr Mladek wrote: > > > > > > On Mon 2025-01-27 14:35:26, Yafang Shao wrote: > > > > The atomic replace livepatch mechanism was introduced to handle > > > >

Re: [PATCH] selftests/mm: Fix thuge-gen test name uniqueness

2025-02-04 Thread Anshuman Khandual
On 2/5/25 04:23, Mark Brown wrote: > The thuge-gen test_mmap() and test_shmget() tests are repeatedly run for a > variety of sizes but always report the result of their test with the same > name, meaning that automated sysetms running the tests are unable to s/sysetms/system^^

Re: [PATCH net-next] netconsole: selftest: Add test for fragmented messages

2025-02-04 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Mon, 03 Feb 2025 11:04:15 -0800 you wrote: > Add a new selftest to verify netconsole's handling of messages that > exceed the packet size limit and require fragmentation. The test sends > messages with varying size

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-04 Thread Hou Tao
+cc Cody Haas Sorry for the resend. I sent the reply in the HTML format. On 2/4/2025 4:28 PM, Hou Tao wrote: > Currently, the update of existing element in hash map involves two > steps: > 1) insert the new element at the head of the hash list > 2) remove the old element > > It is possible that

Re: [PATCH] rcu: Merge rcu_seq_done_exact() logic into rcu_seq_done()

2025-02-04 Thread Joel Fernandes
On Tue, Feb 4, 2025 at 3:22 PM Paul E. McKenney wrote: > > On Tue, Feb 04, 2025 at 10:44:45AM -0500, Joel Fernandes wrote: > > On Thu, Jan 30, 2025 at 12:56 AM Paul E. McKenney > > wrote: > > > By "where we were initially", one might reasonably guess that you meant > > > that the initial value a

Re: [PATCH 1/8] unwind: build kernel with sframe info

2025-02-04 Thread Indu Bhagat
On 1/27/25 1:33 PM, Weinan Liu wrote: Use the -Wa,--gsframe flags to build the code, so GAS will generate a new .sframe section for the stack trace information. Currently, the sframe format only supports arm64 and x86_64 architectures. Add this configuration on arm64 to enable sframe unwinder in

Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

2025-02-04 Thread Puranjay Mohan
Puranjay Mohan writes: > Weinan Liu writes: > >> This patchset implements a generic kernel sframe-based [1] unwinder. >> The main goal is to support reliable stacktraces on arm64. >> >> On x86 orc unwinder provides reliable stacktraces. But arm64 misses the >> required support from objtool: it c

Re: [syzbot] [net?] general protection fault in add_wait_queue

2025-02-04 Thread Michal Luczaj
gt; on a socket that is already SOCK_DEAD), but here it goes: >>> https://lore.kernel.org/netdev/20250204-vsock-linger-nullderef-v1-0-6eb1760fa...@rbox.co/ >> >> What about the fix proposed here: >> https://lore.kernel.org/lkml/20250203124959.114591-1-aha310...@gmail.com/

[PATCH] selftests/mm: Fix thuge-gen test name uniqueness

2025-02-04 Thread Mark Brown
__func__); +"%s: mmap %lu\n", __func__, size); if (shmdt(map)) ksft_exit_fail_msg("%s: shmdt: %s\n", __func__, strerror(errno)); } --- base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b change-id: 20250204-kselftest-mm-fix-dups-076a48577184 Best regards, -- Mark Brown

[PATCH net] selftests: mptcp: connect: -f: no reconnect

2025-02-04 Thread Matthieu Baerts (NGI0)
own(fd, SHUT_WR); } else if (--cfg_repeat > 0) { xdisconnect(fd); --- base-commit: 4241a702e0d0c2ca9364cfac08dbf134264962de change-id: 20250204-net-mptcp-sft-conn-f-d1c14274ba66 Best regards, -- Matthieu Baerts (NGI0)

Re: [PATCH] rcu: Merge rcu_seq_done_exact() logic into rcu_seq_done()

2025-02-04 Thread Paul E. McKenney
On Tue, Feb 04, 2025 at 10:44:45AM -0500, Joel Fernandes wrote: > On Thu, Jan 30, 2025 at 12:56 AM Paul E. McKenney wrote: > > By "where we were initially", one might reasonably guess that you meant > > that the initial value and the target are one and the same. But I suspect > > that you are thi

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

2025-02-04 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. Acked-by: Geert Uytterhoeven # m68k Acked-by: Petr Mladek Signed-off-by: Tamir Duberstein --- MAIN

Re: [PATCH] selftests/cgroup: use bash in test_cpuset_v1_hp.sh

2025-02-04 Thread Tejun Heo
On Wed, Feb 05, 2025 at 12:59:53AM +0530, Bharadwaj Raju wrote: > The script uses non-POSIX features like `[[` for conditionals and hence > does not work when run with a POSIX /bin/sh. > > Change the shebang to /bin/bash instead, like the other tests in cgroup. > > Signed-off-by: Bharadwaj Raju

[PATCH 2/2] printf: break kunit into test cases

2025-02-04 Thread Tamir Duberstein
Use `suite_{init,exit}` and move all tests into `printf_test_cases`. This gives us nicer output in the event of a failure. Combine `plain_format` and `plain_hash` into `hash_pointer` since they're testing the same scenario. Signed-off-by: Tamir Duberstein --- lib/printf_kunit.c | 196 ++

[PATCH 1/2] printf: convert self-test to KUnit

2025-02-04 Thread Tamir Duberstein
Convert the printf() 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. Signed-off-by: Tamir Duberstein --- Documentation/core-api/printk-formats.rst | 2 +- MAINTAINERS

[PATCH 0/2] printf: convert self-test to KUnit

2025-02-04 Thread Tamir Duberstein
[0]. Link: https://lore.kernel.org/all/20250204-scanf-kunit-convert-v3-0-386d7c3ee...@gmail.com/T/#u [0] Signed-off-by: Tamir Duberstein --- Tamir Duberstein (2): printf: convert self-test to KUnit printf: break kunit into test cases Documentation/core-api/printk-formats.rst | 2 +- M

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

2025-02-04 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] selftests/cgroup: use bash in test_cpuset_v1_hp.sh

2025-02-04 Thread Bharadwaj Raju
The script uses non-POSIX features like `[[` for conditionals and hence does not work when run with a POSIX /bin/sh. Change the shebang to /bin/bash instead, like the other tests in cgroup. Signed-off-by: Bharadwaj Raju --- tools/testing/selftests/cgroup/test_cpuset_v1_hp.sh | 2 +- 1 file chan

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

2025-02-04 Thread Tamir Duberstein
Please disregard.

Re: [PATCH v3 0/2] EDITME: cover title for scanf-kunit-convert

2025-02-04 Thread Tamir Duberstein
Oops, broken cover letter. Resending.

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

2025-02-04 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. Acked-by: Geert Uytterhoeven # m68k Acked-by: Petr Mladek Signed-off-by: Tamir Duberstein --- MAIN

[PATCH v3 2/2] scanf: break kunit into test cases

2025-02-04 Thread Tamir Duberstein
Use `suite_{init,exit}` and move some tests into `scanf_test_cases`. This gives us nicer output in the event of a failure. Signed-off-by: Tamir Duberstein --- lib/scanf_kunit.c | 82 +++ 1 file changed, 47 insertions(+), 35 deletions(-) diff -

[PATCH v3 0/2] EDITME: cover title for scanf-kunit-convert

2025-02-04 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

Re: [PATCH v2] scanf: convert self-test to KUnit

2025-02-04 Thread Tamir Duberstein
On Tue, Feb 4, 2025 at 7:17 AM Petr Mladek wrote: > > On Tue 2025-02-04 05:27:23, Tamir Duberstein wrote: > > Oops, meant to address this in the last reply. > > > > On Tue, Feb 4, 2025 at 3:39 AM Petr Mladek wrote: > > > > > > Should this go via the printk tree, please? > > > Or is David going to

[PATCH net-next v3 2/2] selftests: drv-net: Test queue xsk attribute

2025-02-04 Thread Joe Damato
Test that queues which are used for AF_XDP have the xsk nest attribute. The attribute is currently empty, but its existence means the AF_XDP is being used for the queue. Signed-off-by: Joe Damato Suggested-by: Jakub Kicinski --- v3: - Change comment style of helper C program to avoid kdoc wa

[PATCH net-next v3 0/2] netdevgenl: Add an xsk attribute to queues

2025-02-04 Thread Joe Damato
Greetings: Welcome to v3. No functional changes, see changelog below. This is an attempt to followup on something Jakub asked me about [1], adding an xsk attribute to queues and more clearly documenting which queues are linked to NAPIs... After the RFC [2], Jakub suggested creating an empty nest

Re: [GIT PULL] livepatching for 6.14-rc2

2025-02-04 Thread pr-tracker-bot
The pull request you sent on Tue, 4 Feb 2025 13:19:13 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching.git > tags/livepatching-for-6.14-rc2 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/d009de7d54281f5c23d7d82ec5e6e2d54609791a Thank y

Re: [PATCH v2] vdpa/mlx5: Fix mlx5_vdpa_get_config() endianness on big-endian machines

2025-02-04 Thread Dragos Tatulea
On 02/04, Konstantin Shkolnyy wrote: > mlx5_vdpa_dev_add() doesn’t initialize mvdev->actual_features. It’s > initialized later by mlx5_vdpa_set_driver_features(). However, > mlx5_vdpa_get_config() depends on the VIRTIO_F_VERSION_1 flag in > actual_features, to return data with correct endianness. W

Re: [PATCH v7 0/6] introduce PIDFD_SELF* sentinels

2025-02-04 Thread Suren Baghdasaryan
On Tue, Feb 4, 2025 at 2:01 AM Lorenzo Stoakes wrote: > > On Tue, Feb 04, 2025 at 10:46:35AM +0100, Christian Brauner wrote: > > On Thu, 30 Jan 2025 20:40:25 +, Lorenzo Stoakes wrote: > > > If you wish to utilise a pidfd interface to refer to the current process > > > or > > > thread it is ra

[PATCH bpf-next v2 2/3] bpf: selftests: Test constant key extraction on irrelevant maps

2025-02-04 Thread Daniel Xu
Test that very high constant map keys are not interpreted as an error value by the verifier. This would previously fail. Acked-by: Eduard Zingerman Signed-off-by: Daniel Xu --- .../selftests/bpf/progs/verifier_array_access.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a

[PATCH v2] vdpa/mlx5: Fix mlx5_vdpa_get_config() endianness on big-endian machines

2025-02-04 Thread Konstantin Shkolnyy
mlx5_vdpa_dev_add() doesn’t initialize mvdev->actual_features. It’s initialized later by mlx5_vdpa_set_driver_features(). However, mlx5_vdpa_get_config() depends on the VIRTIO_F_VERSION_1 flag in actual_features, to return data with correct endianness. When it’s called before mlx5_vdpa_set_driver_f

[PATCH bpf-next v2 0/3] bpf: Some fixes for nullness elision

2025-02-04 Thread Daniel Xu
Two fixes for nullness elision. See commits for more details. === Changelog === Changes from v1: * Reword commit message in patch 1 * Add tags Daniel Xu (3): bpf: verifier: Do not extract constant map keys for irrelevant maps bpf: selftests: Test constant key extraction on irrelevant maps b

Re: [PATCH v7 1/6] pidfd: add PIDFD_SELF* sentinels to refer to own thread/process

2025-02-04 Thread Shakeel Butt
On Thu, Jan 30, 2025 at 08:40:26PM +, Lorenzo Stoakes wrote: > It is useful to be able to utilise the pidfd mechanism to reference the > current thread or process (from a userland point of view - thread group > leader from the kernel's point of view). > > Therefore introduce PIDFD_SELF_THREAD

[PATCH] selftests: net: fix grammar in reuseaddr_ports_exhausted.c log message

2025-02-04 Thread Pranav Tyagi
This patch fixes a grammatical error in a test log message in reuseaddr_ports_exhausted.c for better clarity as a part of lfx application tasks Signed-off-by: Pranav Tyagi --- tools/testing/selftests/net/reuseaddr_ports_exhausted.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

Re: [PATCH net-next v18 07/25] ovpn: implement basic TX path (UDP)

2025-02-04 Thread Sabrina Dubroca
2025-02-03, 10:52:41 +0100, Sabrina Dubroca wrote: > 2025-01-13, 10:31:26 +0100, Antonio Quartulli wrote: > > +static void ovpn_encrypt_post(struct sk_buff *skb, int ret) > > +{ > > + struct ovpn_peer *peer = ovpn_skb_cb(skb)->peer; > > + > > + if (unlikely(ret < 0)) > > + goto err; >

Re: [PATCH] KVM: selftests: Fix spelling mistake "initally" -> "initially"

2025-02-04 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] rcu: Merge rcu_seq_done_exact() logic into rcu_seq_done()

2025-02-04 Thread Joel Fernandes
On Thu, Jan 30, 2025 at 12:56 AM Paul E. McKenney wrote: > By "where we were initially", one might reasonably guess that you meant > that the initial value and the target are one and the same. But I suspect > that you are thinking of a third value, the value of the underlying > grace-period seque

Re: [PATCH 02/16] elf, uapi: Add definition for STN_UNDEF

2025-02-04 Thread Kees Cook
On Mon, Feb 03, 2025 at 10:05:03AM +0100, Thomas Weißschuh wrote: > The definition is used by tools/testing/selftests/vDSO/parse_vdso.c. > To be able to build the vDSO selftests without a libc dependency, > add the definition to the kernels own UAPI headers. > > Link: https://refspecs.linuxfoundat

Re: [PATCH 04/16] elf, uapi: Add definitions for VER_FLG_BASE and VER_FLG_WEAK

2025-02-04 Thread Kees Cook
On Mon, Feb 03, 2025 at 10:05:05AM +0100, Thomas Weißschuh wrote: > The definitions are used by tools/testing/selftests/vDSO/parse_vdso.c. > To be able to build the vDSO selftests without a libc dependency, > add the definitions to the kernels own UAPI headers. > > Link: https://docs.oracle.com/cd

Re: [PATCH 06/16] elf, uapi: Add types ElfXX_Verdef and ElfXX_Veraux

2025-02-04 Thread Kees Cook
On Mon, Feb 03, 2025 at 10:05:07AM +0100, Thomas Weißschuh wrote: > The types are used by tools/testing/selftests/vDSO/parse_vdso.c. > To be able to build the vDSO selftests without a libc dependency, > add the types to the kernels own UAPI headers. > > Link: > https://refspecs.linuxfoundation.or

Re: [PATCH 05/16] elf, uapi: Add type ElfXX_Versym

2025-02-04 Thread Kees Cook
On Mon, Feb 03, 2025 at 10:05:06AM +0100, Thomas Weißschuh wrote: > The types are used by tools/testing/selftests/vDSO/parse_vdso.c. > To be able to build the vDSO selftests without a libc dependency, > add the types to the kernels own UAPI headers. > > As documented by elf(5). > > Signed-off-by:

Re: [PATCH 03/16] elf, uapi: Add definition for DT_GNU_HASH

2025-02-04 Thread Kees Cook
On Mon, Feb 03, 2025 at 10:05:04AM +0100, Thomas Weißschuh wrote: > The definition is used by tools/testing/selftests/vDSO/parse_vdso.c. > To be able to build the vDSO selftests without a libc dependency, > add the define to the kernels own UAPI headers. > > Link: > https://refspecs.linuxbase.org

Re: [PATCH 04/16] elf, uapi: Add definitions for VER_FLG_BASE and VER_FLG_WEAK

2025-02-04 Thread Kees Cook
On Tue, Feb 04, 2025 at 04:17:03PM +0100, Thomas Weißschuh wrote: > On Tue, Feb 04, 2025 at 07:10:00AM -0800, Kees Cook wrote: > > On Mon, Feb 03, 2025 at 10:05:05AM +0100, Thomas Weißschuh wrote: > > > The definitions are used by tools/testing/selftests/vDSO/parse_vdso.c. > > > To be able to build

Re: [PATCH 04/16] elf, uapi: Add definitions for VER_FLG_BASE and VER_FLG_WEAK

2025-02-04 Thread Thomas Weißschuh
On Tue, Feb 04, 2025 at 07:10:00AM -0800, Kees Cook wrote: > On Mon, Feb 03, 2025 at 10:05:05AM +0100, Thomas Weißschuh wrote: > > The definitions are used by tools/testing/selftests/vDSO/parse_vdso.c. > > To be able to build the vDSO selftests without a libc dependency, > > add the definitions to

Re: [PATCH 04/16] elf, uapi: Add definitions for VER_FLG_BASE and VER_FLG_WEAK

2025-02-04 Thread Kees Cook
On Mon, Feb 03, 2025 at 10:05:05AM +0100, Thomas Weißschuh wrote: > The definitions are used by tools/testing/selftests/vDSO/parse_vdso.c. > To be able to build the vDSO selftests without a libc dependency, > add the definitions to the kernels own UAPI headers. For all the UAPI changes, where are

Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

2025-02-04 Thread Puranjay Mohan
Weinan Liu writes: > This patchset implements a generic kernel sframe-based [1] unwinder. > The main goal is to support reliable stacktraces on arm64. > > On x86 orc unwinder provides reliable stacktraces. But arm64 misses the > required support from objtool: it cannot generate orc unwind tables

Re: [PATCH net-next v3 09/10] net: pktgen: fix mpls reset parsing

2025-02-04 Thread Simon Horman
On Mon, Feb 03, 2025 at 06:02:00PM +0100, Peter Seiderer wrote: > Fix mpls list reset parsing to work as describe in > Documentation/networking/pktgen.rst: > > pgset "mpls 0"turn off mpls (or any invalid argument works too!) > > - before the patch > > $ echo "mpls 0001,0002"

Re: [PATCH net-next v3 07/10] net: pktgen: fix access outside of user given buffer in pktgen_thread_write()

2025-02-04 Thread Simon Horman
On Mon, Feb 03, 2025 at 06:01:58PM +0100, Peter Seiderer wrote: > Honour the user given buffer size for the strn_len() calls (otherwise > strn_len() will access memory outside of the user given buffer). > > Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman

Re: [PATCH net-next v3 06/10] net: pktgen: fix ctrl interface command parsing

2025-02-04 Thread Simon Horman
On Mon, Feb 03, 2025 at 06:01:57PM +0100, Peter Seiderer wrote: > Enable command writing without trailing '\n': > > - the good case > > $ echo "reset" > /proc/net/pktgen/pgctrl > > - the bad case (before the patch) > > $ echo -n "reset" > /proc/net/pktgen/pgctrl > -bash: echo:

Re: [PATCH net-next v3 05/10] net: pktgen: fix 'ratep 0' error handling (return -EINVAL)

2025-02-04 Thread Simon Horman
On Mon, Feb 03, 2025 at 06:01:56PM +0100, Peter Seiderer wrote: > Given an invalid 'ratep' command e.g. 'ratep 0' the return value is '1', > leading to the following misleading output: > > - the good case > > $ echo "ratep 100" > /proc/net/pktgen/lo\@0 > $ grep "Result:" /proc/net/pkt

Re: [PATCH net-next v3 04/10] net: pktgen: fix 'rate 0' error handling (return -EINVAL)

2025-02-04 Thread Simon Horman
On Mon, Feb 03, 2025 at 06:01:55PM +0100, Peter Seiderer wrote: > Given an invalid 'rate' command e.g. 'rate 0' the return value is '1', > leading to the following misleading output: > > - the good case > > $ echo "rate 100" > /proc/net/pktgen/lo\@0 > $ grep "Result:" /proc/net/pktgen

Re: [PATCH net-next v3 03/10] net: pktgen: fix hex32_arg parsing for short reads

2025-02-04 Thread Simon Horman
On Mon, Feb 03, 2025 at 06:01:54PM +0100, Peter Seiderer wrote: > Fix hex32_arg parsing for short reads (here 7 hex digits instead of the > expected 8), shift result only on successful input parsing. > > - before the patch > > $ echo "mpls 123" > /proc/net/pktgen/lo\@0 > $ grep mp

Re: [PATCH net-next v3 01/10] net: pktgen: replace ENOTSUPP with EOPNOTSUPP

2025-02-04 Thread Simon Horman
On Mon, Feb 03, 2025 at 06:01:52PM +0100, Peter Seiderer wrote: > Replace ENOTSUPP with EOPNOTSUPP, fixes checkpatch hint > > WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP > > and e.g. > > $ echo "clone_skb 1" > /proc/net/pktgen/lo\@0 > -bash: echo: write error: Unknown er

Re: [PATCH] dt-bindings: power: rpmpd: Fix comment for SM6375

2025-02-04 Thread Ulf Hansson
On Mon, 2 Dec 2024 at 17:25, Luca Weiss wrote: > > During an earlier commit, the comment from SM6350 was copied without > modifying. Adjust the comment to reflect the defines. > > Signed-off-by: Luca Weiss Applied for next, thanks! Kind regards Uffe > --- > include/dt-bindings/power/qcom-rpm

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

2025-02-04 Thread Dmitry Torokhov
Hi Jens, On Mon, Feb 03, 2025 at 06:43:09PM +0100, Jens Reidel wrote: > > - error = regmap_raw_read(cd->regmap, GOODIX_BERLIN_FW_VERSION_INFO_ADDR, > + if (ic_data->ic_type == IC_TYPE_BERLIN_A) > + fw_version_info_addr = GOODIX_BERLIN_FW_VERSION_INFO_ADDR_A; > + else > +

Re: [RFC PATCH 2/2] livepatch: Implement livepatch hybrid mode

2025-02-04 Thread Petr Mladek
On Mon 2025-01-27 23:34:50, Yafang Shao wrote: > On Mon, Jan 27, 2025 at 10:31 PM Petr Mladek wrote: > > > > On Mon 2025-01-27 14:35:26, Yafang Shao wrote: > > > The atomic replace livepatch mechanism was introduced to handle scenarios > > > where we want to unload a specific livepatch without unl

Re: [RFC PATCH 0/2] livepatch: Add support for hybrid mode

2025-02-04 Thread Petr Mladek
On Mon 2025-02-03 17:44:52, Yafang Shao wrote: > On Fri, Jan 31, 2025 at 9:18 PM Miroslav Benes wrote: > > > > > > > > > > + What exactly is meant by frequent replacements (busy loop?, once a > > > > minute?) > > > > > > The script: > > > > > > #!/bin/bash > > > while true; do > > > yum

Re: [PATCH RFCv2 00/13] iommu: Add MSI mapping support with nested SMMU

2025-02-04 Thread Jason Gunthorpe
On Tue, Feb 04, 2025 at 01:55:01PM +0100, Eric Auger wrote: > OK so you need to set host sw_msi_start to the guest doorbell GPA which > is currently set, in qemu, at > GITS_TRANSLATER 0x0808 + 0x1 Yes (but don't do this except for testing) The challenge that remains is how to build an AP

Re: [PATCH RFCv2 00/13] iommu: Add MSI mapping support with nested SMMU

2025-02-04 Thread Eric Auger
Hi Jason, On 1/29/25 9:13 PM, Jason Gunthorpe wrote: > On Wed, Jan 29, 2025 at 06:46:20PM +0100, Eric Auger wrote: > This missing peice is cleaning up the ITS mapping to allow for > multiple ITS pages. I've imagined that kvm would someone give iommufd > a FD that holds the specific IT

Re: [PATCH v5 3/5] rust: str: implement `strip_prefix` for `BStr`

2025-02-04 Thread Alice Ryhl
On Tue, Feb 4, 2025 at 1:05 PM Andreas Hindborg wrote: > > Implement `strip_prefix` for `BStr` by deferring to `slice::strip_prefix` > on the underlying `&[u8]`. > > Reviewed-by: Gary Guo > Reviewed-by: Alice Ryhl > Signed-off-by: Andreas Hindborg > --- > > It is also possible to get this metho

Re: [PATCH] bpf: Fix mix-up of 4096 and page size.

2025-02-04 Thread Alexander Lobakin
From: Saket Kumar Bhaskar Date: Tue, 4 Feb 2025 12:27:52 +0530 > On Tue, Jan 28, 2025 at 04:03:11PM +0100, Alexander Lobakin wrote: >> From: Alexei Starovoitov >> Date: Thu, 23 Jan 2025 21:14:04 -0800 >> >>> On Wed, Jan 22, 2025 at 10:38 AM Saket Kumar Bhaskar >>> wrote: For platforms

Re: [PATCH] KVM: selftests: Fix spelling mistake "initally" -> "initially"

2025-02-04 Thread Claudio Imbrenda
On Tue, 4 Feb 2025 10:56:47 + Colin Ian King wrote: > There is a spelling mistake in a literal string and in the function > test_get_inital_dirty. Fix them. > > Signed-off-by: Colin Ian King Reviewed-by: Claudio Imbrenda > --- > tools/testing/selftests/kvm/s390/cmma_test.c | 4 ++-- >

[GIT PULL] livepatching for 6.14-rc2

2025-02-04 Thread Petr Mladek
Hi Linus, please pull a simple fixup of livepatching selftests from git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching.git tags/livepatching-for-6.14-rc2 == - Fix livepatching selftests for util-linux-2.40.x. -

Re: [PATCH v2] scanf: convert self-test to KUnit

2025-02-04 Thread Petr Mladek
On Tue 2025-02-04 05:27:23, Tamir Duberstein wrote: > Oops, meant to address this in the last reply. > > On Tue, Feb 4, 2025 at 3:39 AM Petr Mladek wrote: > > > > Should this go via the printk tree, please? > > Or is David going to take it via the kunit tree? > > Going via printk would be my pre

[PATCH v5 5/5] rust: add parameter support to the `module!` macro

2025-02-04 Thread Andreas Hindborg
This patch includes changes required for Rust kernel modules to utilize module parameters. This code implements read only support for integer types without `sysfs` support. Signed-off-by: Andreas Hindborg --- rust/kernel/lib.rs | 1 + rust/kernel/module_param.rs | 225 ++

[PATCH v5 3/5] rust: str: implement `strip_prefix` for `BStr`

2025-02-04 Thread Andreas Hindborg
Implement `strip_prefix` for `BStr` by deferring to `slice::strip_prefix` on the underlying `&[u8]`. Reviewed-by: Gary Guo Reviewed-by: Alice Ryhl Signed-off-by: Andreas Hindborg --- It is also possible to get this method by implementing `core::slice::SlicePattern` for `BStr`. `SlicePattern` i

[PATCH v5 4/5] rust: str: add radix prefixed integer parsing functions

2025-02-04 Thread Andreas Hindborg
Add the trait `ParseInt` for parsing string representations of integers where the string representations are optionally prefixed by a radix specifier. Implement the trait for the primitive integer types. Signed-off-by: Andreas Hindborg --- rust/kernel/str.rs | 109 +++

[PATCH v5 2/5] rust: str: implement `Index` for `BStr`

2025-02-04 Thread Andreas Hindborg
The `Index` implementation on `BStr` was lost when we switched `BStr` from a type alias of `[u8]` to a newtype. This patch adds back `Index` by implementing `Index` for `BStr` when `Index` would be implemented for `[u8]`. Signed-off-by: Andreas Hindborg --- rust/kernel/str.rs | 11 +++ 1

[PATCH v5 0/5] rust: extend `module!` macro with integer parameter support

2025-02-04 Thread Andreas Hindborg
This series extends the `module!` macro with support module parameters. It also adds some string to integer parsing functions and updates `BStr` with a method to strip a string prefix. This series stated out as code by Adam Bratschi-Kaye lifted from the original `rust` branch [1]. After a bit of

[PATCH v5 1/5] rust: str: implement `PartialEq` for `BStr`

2025-02-04 Thread Andreas Hindborg
Implement `PartialEq` for `BStr` by comparing underlying byte slices. Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Signed-off-by: Andreas Hindborg --- rust/kernel/str.rs | 6 ++ 1 file changed, 6 insertions(+) diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs index 28e2201604d67800f8

Re: [PATCH] virtio: Remove virtio devices on device_shutdown()

2025-02-04 Thread Eric Auger
Hi, On 2/3/25 3:48 PM, Michael S. Tsirkin wrote: > On Fri, Jan 31, 2025 at 10:53:15AM +0100, Eric Auger wrote: >> Hi Kirill, Michael >> >> On 8/8/24 9:51 AM, Kirill A. Shutemov wrote: >>> Hongyu reported a hang on kexec in a VM. QEMU reported invalid memory >>> accesses during the hang. >>> >>>

Re: [PATCH][next] KVM: selftests: Fix spelling mistake "initally" -> "initially"

2025-02-04 Thread Janosch Frank
On 2/4/25 9:48 AM, Colin Ian King wrote: There is a spelling mistake in a literal string. Fix it. Signed-off-by: Colin Ian King --- tools/testing/selftests/kvm/s390/cmma_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/s390/cmma_test.c b

[PATCH bpf-next] selftests/bpf: Remove with_addr.sh and with_tunnels.sh

2025-02-04 Thread Bastien Curutchet (eBPF Foundation)
Those two scripts were used by test_flow_dissector.sh to setup/cleanup the network topology before/after the tests. test_flow_dissector.sh have been deleted by commit 63b37657c5fd ("selftests/bpf: remove test_flow_dissector.sh") so they aren't used anywhere now. Remove the two unused scripts and t

[PATCH] KVM: selftests: Fix spelling mistake "initally" -> "initially"

2025-02-04 Thread Colin Ian King
There is a spelling mistake in a literal string and in the function test_get_inital_dirty. Fix them. Signed-off-by: Colin Ian King --- tools/testing/selftests/kvm/s390/cmma_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/kvm/s390/cmma_test.c

Re: [PATCH net-next v3 02/10] net: pktgen: enable 'param=value' parsing

2025-02-04 Thread Paolo Abeni
On 2/3/25 6:01 PM, Peter Seiderer wrote: > Enable additional to 'parm value' the 'param=value' parsing It could be language bias on my side, by I find the above statement hard to parse. Could you please rephrase it? IMHO something alike: """ Enable more flexible parameters syntax, allowing "para

Re: [PATCH net-next v3 08/10] net: pktgen: fix access outside of user given buffer in pktgen_if_write()

2025-02-04 Thread Simon Horman
On Mon, Feb 03, 2025 at 06:01:59PM +0100, Peter Seiderer wrote: > Honour the user given buffer size for the hex32_arg(), num_arg(), > strn_len(), get_imix_entries() and get_labels() calls (otherwise they will > access memory outside of the user given buffer). > > In hex32_arg(), num_arg(), strn_le

Re: [PATCH net-next v3 08/10] net: pktgen: fix access outside of user given buffer in pktgen_if_write()

2025-02-04 Thread Paolo Abeni
Hi, On 2/3/25 6:01 PM, Peter Seiderer wrote: > @@ -806,6 +812,9 @@ static long num_arg(const char __user *user_buffer, > unsigned long maxlen, > if ((c >= '0') && (c <= '9')) { > *num *= 10; > *num += c - '0'; > + } else if (i

Re: [PATCH v2] scanf: convert self-test to KUnit

2025-02-04 Thread Tamir Duberstein
Oops, meant to address this in the last reply. On Tue, Feb 4, 2025 at 3:39 AM Petr Mladek wrote: > > Should this go via the printk tree, please? > Or is David going to take it via the kunit tree? Going via printk would be my preference.

Re: [PATCH v2] scanf: convert self-test to KUnit

2025-02-04 Thread Tamir Duberstein
On Tue, Feb 4, 2025 at 3:39 AM Petr Mladek wrote: > > On Mon 2025-02-03 06:48:05, Tamir Duberstein wrote: [...] > > diff --git a/lib/Makefile b/lib/Makefile > > index d5cfc7afbbb8..a53cf6dd1505 100644 > > --- a/lib/Makefile > > +++ b/lib/Makefile > > @@ -85,7 +85,6 @@ obj-$(CONFIG_TEST_STATIC_KE

Re: [PATCH v2 1/2] get_maintainer: add --substatus for reporting subsystem status

2025-02-04 Thread Lorenzo Stoakes
On Mon, Feb 03, 2025 at 12:13:16PM +0100, Vlastimil Babka wrote: > The subsystem status is currently reported with --role(stats) by > adjusting the maintainer role for any status different from Maintained. > This has two downsides: > > - if a subsystem has only reviewers or mailing lists and no mai

Re: [PATCH v2 2/2] get_maintainer: stop reporting subsystem status as maintainer role

2025-02-04 Thread Lorenzo Stoakes
On Mon, Feb 03, 2025 at 12:13:17PM +0100, Vlastimil Babka wrote: > After introducing the --substatus option, we can stop adjusting the > reported maintainer role by the subsystem's status. > > For compatibility with the --git-chief-penguins option, keep the "chief > penguin" role. > > Signed-off-by

Re: [PATCH v2 0/2] get_maintainer: report subsystem status separately from maintainer role

2025-02-04 Thread Lorenzo Stoakes
On Mon, Feb 03, 2025 at 12:13:15PM +0100, Vlastimil Babka wrote: > The subsystem status (S: field) can inform a patch submitter if the > subsystem is well maintained or e.g. maintainers are missing. In > get_maintainer, it is currently reported with --role(stats) by adjusting > the maintainer role

Re: [syzbot] [net?] general protection fault in add_wait_queue

2025-02-04 Thread Stefano Garzarella
sock_set_flag(sk, SOCK_DEAD); > > > > if (vsk->transport) > > vsk->transport->release(vsk); > > else if (sock_type_connectible(sk->sk_type)) > > vsock_remove_sock(vsk); > > > >+ sock_orphan(sk); > >

Re: [PATCH v7 0/6] introduce PIDFD_SELF* sentinels

2025-02-04 Thread Lorenzo Stoakes
On Tue, Feb 04, 2025 at 10:46:35AM +0100, Christian Brauner wrote: > On Thu, 30 Jan 2025 20:40:25 +, Lorenzo Stoakes wrote: > > If you wish to utilise a pidfd interface to refer to the current process or > > thread it is rather cumbersome, requiring something like: > > > > int pidfd = pidfd

  1   2   >