Re: [PATCH 2/2] tools/nolibc: add support for 32-bit s390

2025-02-05 Thread Sven Schnelle
Hi Thomas, Thomas Weißschuh writes: > 32-bit s390 is very close to the existing 64-bit implementation. > > Some special handling is necessary as there is neither LLVM nor > QEMU support. Also the kernel itself can not build natively for 32-bit > s390, so instead the test program is executed with

[PATCH net 1/2] bonding: fix incorrect MAC address setting to receive NA messages

2025-02-05 Thread Hangbin Liu
In order to receive the neighbor solicitation messages on the backup slave, we should add the NS target's corresponding MAC address. But the target in bonding is a unicast addresses. We can't use it directly. Instead, we should convert it to a Solicited-Node Multicast Address first and then convert

[PATCH net 0/2] bonding: fix incorrect mac address setting

2025-02-05 Thread Hangbin Liu
The mac address on backup slave should be convert from Solicited-Node Multicast address, not from bonding unicast target address. Hangbin Liu (2): bonding: fix incorrect MAC address setting to receive NA messages selftests: bonding: fix incorrect mac address drivers/net/bonding/bond_options.

[PATCH net 2/2] selftests: bonding: fix incorrect mac address

2025-02-05 Thread Hangbin Liu
The correct mac address for NS target 2001:db8::254 is 33:33:ff:00:02:54, not 33:33:00:00:02:54. The same with client maddress. Fixes: 86fb6173d11e ("selftests: bonding: add ns multicast group testing") Signed-off-by: Hangbin Liu --- tools/testing/selftests/drivers/net/bonding/bond_options.sh |

Re: [PATCH -v2 0/7] module: Strict per-modname namespaces

2025-02-05 Thread Petr Pavlu
On 12/16/24 17:43, Petr Pavlu wrote: > On 12/2/24 15:59, Peter Zijlstra wrote: >> Hi! >> >> Implement a means for exports to be available only to an explicit list of >> named >> modules. By explicitly limiting the usage of certain exports, the abuse >> potential/risk is greatly reduced. >> >> The

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

2025-02-05 Thread Paul E. McKenney
On Tue, Feb 04, 2025 at 08:28:29PM -0500, Joel Fernandes wrote: > 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 initiall

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

2025-02-05 Thread Geert Uytterhoeven
On Tue, 4 Feb 2025 at 20:38, Tamir Duberstein wrote: > 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 >

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

2025-02-05 Thread Christian Brauner
On Tue, Feb 04, 2025 at 09:43:31AM -0800, Suren Baghdasaryan wrote: > 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

Re: [PATCH net 1/2] bonding: fix incorrect MAC address setting to receive NA messages

2025-02-05 Thread Hangbin Liu
Oh, I just found the subject is incorrect. We want to receive the NS message, not NA message on backup slaves. Thanks Hangbin On Wed, Feb 05, 2025 at 08:03:35AM +, Hangbin Liu wrote: > In order to receive the neighbor solicitation messages on the backup slave, > we should add the NS target's

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

2025-02-05 Thread Joel Fernandes
On Wed, Feb 5, 2025 at 10:56 AM Paul E. McKenney wrote: > > On Wed, Feb 05, 2025 at 10:45:08AM -0500, Joel Fernandes wrote: > > On Wed, Feb 5, 2025 at 5:28 AM Paul E. McKenney wrote: > > > > > > On Tue, Feb 04, 2025 at 08:28:29PM -0500, Joel Fernandes wrote: > > > > On Tue, Feb 4, 2025 at 3:22 PM

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

2025-02-05 Thread Paul E. McKenney
On Wed, Feb 05, 2025 at 10:45:08AM -0500, Joel Fernandes wrote: > On Wed, Feb 5, 2025 at 5:28 AM Paul E. McKenney wrote: > > > > On Tue, Feb 04, 2025 at 08:28:29PM -0500, Joel Fernandes wrote: > > > On Tue, Feb 4, 2025 at 3:22 PM Paul E. McKenney > > > wrote: > > > > > > > > On Tue, Feb 04, 2025

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

2025-02-05 Thread Petr Mladek
On Wed 2025-02-05 10:54:47, Yafang Shao wrote: > 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 r

Re: [PATCH v3] kbuild: keep symbols for symbol_get() even with CONFIG_TRIM_UNUSED_KSYMS

2025-02-05 Thread Masahiro Yamada
On Sun, Feb 2, 2025 at 3:51 AM Masahiro Yamada wrote: > > Linus observed that the symbol_request(utf8_data_table) call fails when > CONFIG_UNICODE=y and CONFIG_TRIM_UNUSED_KSYMS=y. > > symbol_get() relies on the symbol data being present in the ksymtab for > symbol lookups. However, EXPORT_SYMBOL_

[PATCH bpf] bpf: skip non existing key in generic_map_lookup_batch

2025-02-05 Thread Yan Zhai
The generic_map_lookup_batch currently returns EINTR if it fails with ENOENT and retries several times on bpf_map_copy_value. The next batch would start from the same location, presuming it's a transient issue. This is incorrect if a map can actually have "holes", i.e. "get_next_key" can return a k

Re: [PATCH bpf] bpf: skip non existing key in generic_map_lookup_batch

2025-02-05 Thread Hou Tao
Hi, On 2/6/2025 12:57 AM, Yan Zhai wrote: > The generic_map_lookup_batch currently returns EINTR if it fails with > ENOENT and retries several times on bpf_map_copy_value. The next batch > would start from the same location, presuming it's a transient issue. > This is incorrect if a map can actual

[linus:master] [x86] 0b6476f939: will-it-scale.per_process_ops 24.8% improvement

2025-02-05 Thread kernel test robot
Hello, kernel test robot noticed a 24.8% improvement of will-it-scale.per_process_ops on: commit: 0b6476f93998a20a537ee025f124618488ea36a7 ("x86: pgtable: convert __tlb_remove_table() to use struct ptdesc") https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master testcase: w

Re: [v1 2/3] include: move lookup_or_create_module_kobject()/to_module* to module.h

2025-02-05 Thread Rasmus Villemoes
On Mon, Feb 03 2025, Shyam Saini wrote: > Move the following to module.h to allow common usages: > - lookup_or_create_module_kobject() > - to_module_attr > - to_module_kobject > > This makes lookup_or_create_module_kobject() as inline. > > Signed-off-by: Shyam Saini > --- > include/linux/mod

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

2025-02-05 Thread Antonio Quartulli
On 04/02/2025 17:18, Sabrina Dubroca wrote: 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

[PATCH v2 0/2] tools/nolibc: support for 32-bit s390

2025-02-05 Thread Thomas Weißschuh
Support for 32-bit s390 is very easy to implement and useful for testing. For example I used to test some generic compat_ptr() logic, which is only testable on 32-bit s390. The series depends on my other series "selftests/nolibc: test kernel configuration cleanups". (It's not a hard dependency, on

[PATCH v2 2/2] tools/nolibc: add support for 32-bit s390

2025-02-05 Thread Thomas Weißschuh
32-bit s390 is very close to the existing 64-bit implementation. Some special handling is necessary as there is neither LLVM nor QEMU support. Also the kernel itself can not build natively for 32-bit s390, so instead the test program is executed with a 64-bit kernel. Acked-by: Willy Tarreau Sign

[PATCH v2 1/2] selftests/nolibc: rename s390 to s390x

2025-02-05 Thread Thomas Weißschuh
Support for 32-bit s390 is about to be added. As "s39032" would look horrible, use the another naming scheme. 32-bit s390 is "s390" and 64-bit s390 is "s390x", similar to how it is handled in various toolchain components. Acked-by: Willy Tarreau Signed-off-by: Thomas Weißschuh --- tools/testing

Re: [PATCH net-next v18 09/25] ovpn: implement packet processing

2025-02-05 Thread Sabrina Dubroca
Hi Antonio, Another one I should have spotted a long time ago :( 2025-01-13, 10:31:28 +0100, Antonio Quartulli wrote: > +int ovpn_aead_encrypt(struct ovpn_peer *peer, struct ovpn_crypto_key_slot > *ks, > + struct sk_buff *skb) > +{ > + const unsigned int tag_size = crypto_a

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

2025-02-05 Thread Nicolin Chen
On Wed, Feb 05, 2025 at 02:49:04PM -0800, Jacob Pan wrote: > > There have been two approaches to solve this problem: > > 1. Create an identity mapping in the stage-1. VMM could insert a few > > RMRs (Reserved Memory Regions) in guest's IORT. Then the guest kernel > > would fetch these RMR entries f

Re: [PATCH v2 02/13] virtio_net: simplify virtnet_set_affinity()

2025-02-05 Thread Nick Child
On Tue, Jan 28, 2025 at 11:46:31AM -0500, Yury Norov wrote: > The inner loop may be replaced with the dedicated for_each_online_cpu_wrap. > It helps to avoid setting the same bits in the @mask more than once, in > case of group_size is greater than number of online CPUs. nit: Looking at the previo

Re: Re: [PATCH 2/2] libbpf: BPF programs dynamic loading and attaching

2025-02-05 Thread Andrii Nakryiko
On Tue, Jan 28, 2025 at 3:08 PM Martin Kelly wrote: > > On Fri, 2025-01-24 at 10:31 -0800, Andrii Nakryiko wrote: > > > On Wed, Jan 22, 2025 at 1:53 PM Slava Imameev > > > wrote: > > > > > > > > > > BPF programs designated as dynamically loaded can be loaded and > > > > > attached independently a

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

2025-02-05 Thread Jacob Pan
Hi Nicolin, On Fri, 10 Jan 2025 19:32:16 -0800 Nicolin Chen wrote: > [ Background ] > On ARM GIC systems and others, the target address of the MSI is > translated by the IOMMU. For GIC, the MSI address page is called > "ITS" page. When the IOMMU is disabled, the MSI address is programmed > to th

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

2025-02-05 Thread Yafang Shao
On Tue, Feb 4, 2025 at 5:53 AM Song Liu wrote: > > On Mon, Feb 3, 2025 at 1:45 AM Yafang Shao wrote: > [...] > > > > If you’re managing a large fleet of servers, this issue is far from > > negligible. > > > > > > > > > Can you provide examples of companies that use atomic replacement at > > > >

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

2025-02-05 Thread I Hsin Cheng
On Wed, Feb 05, 2025 at 01:07:56PM +0100, Peter Seiderer wrote: > Hello *, > > On Wed, 5 Feb 2025 13:39:26 +0800, I Hsin Cheng > wrote: > > > When compiling selftests files under tools/testing/selftests/pidfd/ , > > some compiling errors and warnings will pop out as the following. > > > > C

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

2025-02-05 Thread Song Liu
On Wed, Feb 5, 2025 at 6:43 AM Yafang Shao wrote: > > On Tue, Feb 4, 2025 at 5:53 AM Song Liu wrote: > > > > On Mon, Feb 3, 2025 at 1:45 AM Yafang Shao wrote: > > [...] > > > > > > If you’re managing a large fleet of servers, this issue is far from > > > negligible. > > > > > > > > > > > > Can

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

2025-02-05 Thread Joel Fernandes
On Wed, Feb 5, 2025 at 5:28 AM Paul E. McKenney wrote: > > On Tue, Feb 04, 2025 at 08:28:29PM -0500, Joel Fernandes wrote: > > 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 A

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

2025-02-05 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski : On Tue, 04 Feb 2025 23:19:53 +0100 you wrote: > The '-f' parameter is there to force the kernel to emit MPTCP FASTCLOSE > by closing the connection with unread bytes in the receive queue. > > The xdisconnect() helper was

[PATCH] selftests/dma: Fix bad array reference.

2025-02-05 Thread Liu Ye
dir[directions] should be directions[dir] to correctly index the directions array. Signed-off-by: Liu Ye --- tools/testing/selftests/dma/dma_map_benchmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/dma/dma_map_benchmark.c b/tools/testing/selfte

[PATCH] selftests/dma: Fix bad array reference.

2025-02-05 Thread Liu Ye
dir[directions] should be directions[dir] to correctly index the directions array. Signed-off-by: Liu Ye --- tools/testing/selftests/dma/dma_map_benchmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/dma/dma_map_benchmark.c b/tools/testing/selfte

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

2025-02-05 Thread Yafang Shao
On Thu, Feb 6, 2025 at 1:59 AM Song Liu wrote: > > On Wed, Feb 5, 2025 at 6:43 AM Yafang Shao wrote: > > > > On Tue, Feb 4, 2025 at 5:53 AM Song Liu wrote: > > > > > > On Mon, Feb 3, 2025 at 1:45 AM Yafang Shao wrote: > > > [...] > > > > > > > > If you’re managing a large fleet of servers, this

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

2025-02-05 Thread Yafang Shao
On Thu, Feb 6, 2025 at 12:03 AM Petr Mladek wrote: > > On Wed 2025-02-05 10:54:47, Yafang Shao wrote: > > 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: > > > > > > > > > > O

Re: [PATCH] selftests: bpf: Support dynamic linking LLVM if static not available

2025-02-05 Thread Andrii Nakryiko
On Thu, Jan 30, 2025 at 2:34 PM Daniel Xu wrote: > > Since 67ab80a01886 ("selftests/bpf: Prefer static linking for LLVM > libraries"), only statically linking test_progs is supported. However, > some distros only provide a dynamically linkable LLVM. > > This commit adds a fallback for dynamically

Re: [PATCH] selftests: bpf: Support dynamic linking LLVM if static not available

2025-02-05 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko : On Thu, 30 Jan 2025 15:33:45 -0700 you wrote: > Since 67ab80a01886 ("selftests/bpf: Prefer static linking for LLVM > libraries"), only statically linking test_progs is supported. However, > some distros only provide a

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

2025-02-05 Thread Peter Seiderer
Hello *, On Wed, 5 Feb 2025 13:39:26 +0800, I Hsin Cheng wrote: > 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_t

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

2025-02-05 Thread Peter Seiderer
Hello *, On Wed, 5 Feb 2025 13:50:31 +0800, I Hsin Cheng wrote: > 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’

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

2025-02-05 Thread Mark Brown
On Wed, Feb 05, 2025 at 08:22:04AM +0530, Anshuman Khandual wrote: > On 2/5/25 04:23, Mark Brown wrote: > > Fixes: b38bd9b2c448 ("selftests/mm: thuge-gen: conform to TAP format > > output") > Just wondering how this fixes anything ? This seems like an improvement to > the current behaviour. My

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

2025-02-05 Thread Peter Seiderer
Hello Paolo, On Tue, 4 Feb 2025 11:55:57 +0100, Paolo Abeni wrote: > 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? > >

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

2025-02-05 Thread Peter Seiderer
Hello Paolo, On Tue, 4 Feb 2025 11:40:21 +0100, Paolo Abeni wrote: > 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')) { > > *nu

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

2025-02-05 Thread Peter Seiderer
Hello Simon, On Tue, 4 Feb 2025 10:52:51 +, Simon Horman wrote: > 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 me

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

2025-02-05 Thread Peter Seiderer
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/lo\@0 Result: OK: rate=100 - the bad case (before the patch)

[PATCH net-next v4 00/17] Some pktgen fixes/improvments

2025-02-05 Thread Peter Seiderer
hile taking a look at '[PATCH net] pktgen: Avoid out-of-range in get_imix_entries' ([1]) and '[PATCH net v2] pktgen: Avoid out-of-bounds access in get_imix_entries' ([2], [3]) and doing some tests and code review I detected that the /proc/net/pktgen/... parsing logic does not honour the user given

[PATCH net-next v4 03/17] net: pktgen: fix hex32_arg parsing for short reads

2025-02-05 Thread Peter Seiderer
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 mpls /proc/net/pktgen/lo\@0 mpls: 1230 Result: OK:

[PATCH net-next v4 02/17] net: pktgen: enable 'param=value' parsing

2025-02-05 Thread Peter Seiderer
Enable more flexible parameters syntax, allowing 'param=value' in addition to the already supported 'param value' pattern (additional this gives the skipping '=' in count_trail_chars() a purpose). Tested with: $ echo "min_pkt_size 999" > /proc/net/pktgen/lo\@0 $ echo "min_pkt_size

[PATCH net-next v4 06/17] net: pktgen: fix ctrl interface command parsing

2025-02-05 Thread Peter Seiderer
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: write error: Invalid argument - with patch applied $ echo -n "reset

[PATCH net-next v4 10/17] net: pktgen: remove extra tmp variable (re-use len instead)

2025-02-05 Thread Peter Seiderer
Remove extra tmp variable in pktgen_if_write (re-use len instead). Signed-off-by: Peter Seiderer --- Changes v3 -> v4 - new patch (factored out of patch 'net: pktgen: fix access outside of user given buffer in pktgen_if_write()') --- net/core/pktgen.c | 9 - 1 file changed, 4 inser

[PATCH net-next v4 17/17] selftest: net: add proc_net_pktgen

2025-02-05 Thread Peter Seiderer
Add some test for /proc/net/pktgen/... interface. - enable 'CONFIG_NET_PKTGEN=m' in tools/testing/selftests/net/config Signed-off-by: Peter Seiderer --- Changes v3 -> v4: - no changes Changes v2 -> v3: - fix typo in change description ('v1 -> v1' and tyop) - rename some vars to better mat

[PATCH net-next v4 11/17] net: pktgen: remove some superfluous variable initializing

2025-02-05 Thread Peter Seiderer
Remove some superfluous variable initializing before hex32_arg call (as the same init is done here already). Signed-off-by: Peter Seiderer --- Changes v3 -> v4 - new patch (factored out of patch 'net: pktgen: fix access outside of user given buffer in pktgen_if_write()') --- net/core/pktge

[PATCH net-next v4 15/17] net: pktgen: num_arg error out in case no valid character is parsed

2025-02-05 Thread Peter Seiderer
In num_arg() error out in case no valid character is parsed. Signed-off-by: Peter Seiderer --- Changes v3 -> v4 - new patch (factored out of patch 'net: pktgen: fix access outside of user given buffer in pktgen_if_write()') --- net/core/pktgen.c | 3 +++ 1 file changed, 3 insertions(+) di

[PATCH net-next v4 01/17] net: pktgen: replace ENOTSUPP with EOPNOTSUPP

2025-02-05 Thread Peter Seiderer
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 error 524 Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman --- Changes v

[PATCH net-next v4 12/17] net: pktgen: fix mpls maximum labels list parsing

2025-02-05 Thread Peter Seiderer
Fix mpls maximum labels list parsing up to MAX_MPLS_LABELS/16 entries (instead of up to MAX_MPLS_LABELS - 1). Fixes: $ echo "mpls 0f00,0f01,0f02,0f03,0f04,0f05,0f06,0f07,0f08,0f09,0f0a,0f0b,0f0c,0f0d,0f0e,0f0f" > /proc/net/

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

2025-02-05 Thread Peter Seiderer
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 --- Changes v3 -> v4 - add rev-by Simon Horman Changes v2 -> v3: - no changes Changes v1 -> v2: -

[PATCH net-next v4 08/17] net: pktgen: use defines for the various dec/hex number parsing digits lengths

2025-02-05 Thread Peter Seiderer
Use defines for the various dec/hex number parsing digits lengths (hex32_arg/num_arg calls). Signed-off-by: Peter Seiderer --- Changes v3 -> v4 - new patch (suggested by Simon Horman) --- net/core/pktgen.c | 80 ++- 1 file changed, 44 insertions(+),

[PATCH net-next v4 09/17] net: pktgen: align some variable declarations to the most common pattern

2025-02-05 Thread Peter Seiderer
Align some variable declarations (in get_imix_entries and get_labels) to the most common pattern (int instead of ssize_t/long) and adjust function return value accordingly. Signed-off-by: Peter Seiderer --- Changes v3 -> v4 - new patch (factored out of patch 'net: pktgen: fix access outside of

[PATCH net-next v4 14/17] net: pktgen: hex32_arg/num_arg error out in case no characters are available

2025-02-05 Thread Peter Seiderer
In hex32_arg() and num_arg() error out in case no characters are available (maxlen = 0). Signed-off-by: Peter Seiderer --- Changes v3 -> v4 - new patch (factored out of patch 'net: pktgen: fix access outside of user given buffer in pktgen_if_write()') --- net/core/pktgen.c | 6 ++ 1 fi

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

2025-02-05 Thread Peter Seiderer
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/pktgen/lo\@0 Result: OK: ratep=100 - the bad case (before the patch)

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

2025-02-05 Thread Peter Seiderer
Hello *, On Thu, 30 Jan 2025 20:40:27 +, 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 > --- > tools/testing/selftests/pidf

[PATCH net-next v4 16/17] net: pktgen: fix mpls reset parsing

2025-02-05 Thread Peter Seiderer
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" > /proc/net/pktgen/lo\@0 $ grep mpls /proc/net/pktgen/lo\@0

[PATCH net-next v4 13/17] net: pktgen: fix access outside of user given buffer in pktgen_if_write()

2025-02-05 Thread Peter Seiderer
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). Signed-off-by: Peter Seiderer --- Changes v3 -> v4: - replace C99 comment (suggested by Paolo Abeni) -