Re: [RFC] module: Strict per-modname namespaces

2024-11-06 Thread Masahiro Yamada
On Thu, Nov 7, 2024 at 4:02 AM Peter Zijlstra wrote: > > Hi, > > I've been wanting $topic for a while, and having just stumbled into the > whole namespace thing by accident, I figured I'd give it a go, most if > the hard parts seem to have already been done. > > It reserves and disallows imports o

Re: [PATCH 1/6] lib: math: Move kunit tests into tests/ subdir

2024-11-06 Thread Geert Uytterhoeven
Hi Andrew, On Wed, Nov 6, 2024 at 10:17 PM Andrew Morton wrote: > On Wed, 6 Nov 2024 09:33:55 +0100 Geert Uytterhoeven > wrote: > > > This conflicts with "[PATCH] m68k: defconfig: Update defconfigs for > > > v6.12-rc1"[1]. Of course the proper way forward would be to add > > > "default KUNIT_A

Re: [PATCH v3 7/9] vhost: Add new UAPI to support change to task mode

2024-11-06 Thread Cindy Lu
On Tue, Nov 5, 2024 at 6:32 PM Stefano Garzarella wrote: > > On Tue, Nov 05, 2024 at 03:25:26PM +0800, Cindy Lu wrote: > >Add a new UAPI to enable setting the vhost device to task mode. > >The userspace application can use VHOST_SET_INHERIT_FROM_OWNER > >to configure the mode if necessary. > >This

Re: [PATCH v8 2/3] modpost: Produce extended MODVERSIONS information

2024-11-06 Thread Lucas De Marchi
On Wed, Nov 06, 2024 at 02:19:38PM -0800, Matthew Maurer wrote: > If booted against an old kernel, it will > behave as though there is no modversions information. Huh? This I don't get. If you have the new libkmod and boot an old kernel, that should just not break becauase well, long symbols we

Re: [RFC] module: Strict per-modname namespaces

2024-11-06 Thread Greg KH
On Wed, Nov 06, 2024 at 08:02:40PM +0100, Peter Zijlstra wrote: > Hi, > > I've been wanting $topic for a while, and having just stumbled into the > whole namespace thing by accident, I figured I'd give it a go, most if > the hard parts seem to have already been done. > > It reserves and disallows

Re: [RFC] module: Strict per-modname namespaces

2024-11-06 Thread Christoph Hellwig
On Wed, Nov 06, 2024 at 03:42:03PM -0800, Luis Chamberlain wrote: > > This allows exports targeted at specific modules and no others -- one > > random example included. I've hated the various kvm exports we've had > > for a while, and strictly limiting them to the kvm module helps > > alleviate som

Re: [RFC] module: Strict per-modname namespaces

2024-11-06 Thread Christoph Hellwig
On Wed, Nov 06, 2024 at 08:02:40PM +0100, Peter Zijlstra wrote: > It reserves and disallows imports on any "MODULE_${name}" namespace, > while it implicitly adds the same namespace to every module. Ah nice. This is pretty similar to what I want and had badly prototyped a while ago. > This allows

[PATCH v2 5/6] kselftest/arm64: Provide a SIGUSR1 handler in the kernel mode FP stress test

2024-11-06 Thread Mark Brown
The other stress test programs provide a SIGUSR1 handler which modifies the live register state in order to validate that signal context is being restored during signal return. While we can't usefully do this when testing kernel mode FP usage provide a handler for SIGUSR1 which just counts the numb

[PATCH net-next] selftests: wireguards: use nft by default

2024-11-06 Thread Hangbin Liu
Use nft by default if it's supported, as nft is the replacement for iptables, which is used by default in some releases. Additionally, iptables is dropped in some releases. Signed-off-by: Hangbin Liu --- CC nft developers to see if there are any easier configurations, as I'm not very familiar wit

[PATCH net] selftests: wireguard: load nf_conntrack if it's not present

2024-11-06 Thread Hangbin Liu
Some distros may not load nf_conntrack by default, which will cause subsequent nf_conntrack settings to fail. Let's load this module if it's not loaded by default. Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Signed-off-by: Hangbin Liu --- tools/testing/selftests/wireguard/netns.

[PATCH 4/4] kselftest/arm64: Add FPMR coverage to fp-ptrace

2024-11-06 Thread Mark Brown
Add coverage for FPMR to fp-ptrace. FPMR can be available independently of SVE and SME, if SME is supported then FPMR is cleared by entering and exiting streaming mode. As with other registers we generate random values to load into the register, we restrict these to bitfields which are always defin

[PATCH v2 6/6] kselftest/arm64: Test signal handler state modification in fp-stress

2024-11-06 Thread Mark Brown
Currently in fp-stress we test signal delivery to the test threads by sending SIGUSR2 which simply counts how many signals are delivered. The test programs now also all have a SIGUSR1 handler which for the threads doing userspace testing additionally modifies the floating point register state in th

[PATCH v2 4/6] kselftest/arm64: Implement irritators for ZA and ZT

2024-11-06 Thread Mark Brown
Currently we don't use the irritator signal in our floating point stress tests so when we added ZA and ZT stress tests we didn't actually bother implementing any actual action in the handlers, we just counted the signal deliveries. In preparation for using the irritators let's implement them, just

[PATCH v2 3/6] kselftest/arm64: Corrupt P0 in the irritator when testing SSVE

2024-11-06 Thread Mark Brown
When building for streaming SVE the irritator for SVE skips updates of both P0 and FFR. While FFR is skipped since it might not be present there is no reason to skip corrupting P0 so switch to an instruction valid in streaming mode and move the ifdef. Signed-off-by: Mark Brown --- tools/testing/

[PATCH v2 2/6] kselftest/arm64: Remove unused ADRs from irritator handlers

2024-11-06 Thread Mark Brown
The irritator handlers for the fp-stress test programs all use ADR to load an address into x0 which is then not referenced. Remove these ADRs as they just cause confusion. Acked-by: Mark Rutland Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/fpsimd-test.S | 1 - tools/testing/se

[PATCH v2 1/6] kselftest/arm64: Correct misleading comments on fp-stress irritators

2024-11-06 Thread Mark Brown
The comments in the handlers for the irritator signal in the test threads for fp-stress suggest that the irritator will corrupt the register state observed by the main thread but this is not the case, instead the FPSIMD and SVE irritators (which are the only ones that are implemented) modify the cu

[PATCH v2 0/6] kselftest/arm64: Test floating point signal context restore in fp-stress

2024-11-06 Thread Mark Brown
Currently we test signal delivery to the programs run by fp-stress but our signal handlers simply count the number of signals seen and don't do anything with the floating point state. The original fpsimd-test and sve-test programs had signal handlers called irritators which modify the live registe

[PATCH 3/4] kselftest/arm64: Expand the set of ZA writes fp-ptrace does

2024-11-06 Thread Mark Brown
Currently our test for implementable ZA writes is written in a bit of a convoluted fashion which excludes all changes where we clear SVCR.SM even though we can actually support that since changing the vector length resets SVCR. Make the logic more direct, enabling us to actually run these cases. S

[PATCH 2/4] kselftest/arm64: Use a define for SVCR

2024-11-06 Thread Mark Brown
For some reason when we're accessing SVCR in the FP tests we use the raw numerical version of the register name rather than hiding that behind a preprocessor macro for readability. Since we already use the generated defines for sysreg bitfields in other the KVM selftests let's do the same thing her

[PATCH 1/4] kselftets/arm64: Use flag bits for features in fp-ptrace assembler code

2024-11-06 Thread Mark Brown
The assembler portions of fp-ptrace are passed feature flags by the C code indicating which architectural features are supported. Currently these use an entire register for each flag which is wasteful and gets cumbersome as new flags are added. Switch to using flag bits in a single register to make

[PATCH 0/4] kselftest/arm64: fp-ptrace enhancements

2024-11-06 Thread Mark Brown
This series contains a bit of a grab bag of improvements to the floating point tests, mainly fp-ptrace. Globally over all the tests we start using defines from the generated sysregs (following the example of the KVM selftests) for SVCR, stop being quite so wasteful with registers when calling into

Re: [PATCH] kunit: string-stream: Fix a UAF bug in kunit_init_suite()

2024-11-06 Thread Jinjie Ruan
Gentle Ping. On 2024/10/24 17:43, Jinjie Ruan wrote: > In kunit_debugfs_create_suite(), if alloc_string_stream() fails in the > kunit_suite_for_each_test_case() loop, the "suite->log = stream" > has assigned before, and the error path only free the suite->log's stream > memory but not set it to NU

Re: [RFC] module: Strict per-modname namespaces

2024-11-06 Thread Luis Chamberlain
On Wed, Nov 06, 2024 at 08:02:40PM +0100, Peter Zijlstra wrote: > Hi, > > I've been wanting $topic for a while, and having just stumbled into the > whole namespace thing by accident, I figured I'd give it a go, most if > the hard parts seem to have already been done. Neat, hch suggested something

Re: [PATCH v8 2/3] modpost: Produce extended MODVERSIONS information

2024-11-06 Thread Matthew Maurer
> > > If booted against an old kernel, it will > > behave as though there is no modversions information. > > Huh? This I don't get. If you have the new libkmod and boot > an old kernel, that should just not break becauase well, long > symbols were not ever supported properly anyway, so no regressio

Re: [PATCH bpf-next 1/2] libbpf: Add missing per-arch include path

2024-11-06 Thread Andrii Nakryiko
On Mon, Nov 4, 2024 at 2:26 AM Björn Töpel wrote: > > patchwork-bot+netdev...@kernel.org writes: > > > Hello: > > > > This series was applied to bpf/bpf-next.git (master) > > by Andrii Nakryiko : > > > > On Fri, 27 Sep 2024 15:13:52 +0200 you wrote: > >> From: Björn Töpel > >> > >> libbpf does no

Re: [PATCH 1/6] lib: math: Move kunit tests into tests/ subdir

2024-11-06 Thread Andrew Morton
On Wed, 6 Nov 2024 09:33:55 +0100 Geert Uytterhoeven wrote: > Hi all, > > This conflicts with "[PATCH] m68k: defconfig: Update defconfigs for > > v6.12-rc1"[1]. Of course the proper way forward would be to add > > "default KUNIT_ALL_TESTS" to all tests that still lack it, so I can > > just neve

Re: [PATCH] rcu: Use READ_ONCE() for rdp->gpwrap access in __note_gp_changes()

2024-11-06 Thread Paul E. McKenney
On Mon, Nov 04, 2024 at 03:12:30PM +, Zilin Guan wrote: > In function __note_gp_changes(), rdp->gpwrap is read using READ_ONCE() > in line 1307: > > 1307if (IS_ENABLED(CONFIG_PROVE_RCU) && READ_ONCE(rdp->gpwrap)) > 1308WRITE_ONCE(rdp->last_sched_clock, jiffies); > > while read

Re: [PATCH] dax: Allow block size > PAGE_SIZE

2024-11-06 Thread Dan Williams
Jan Kara wrote: [..] > > This WARN still feels like the wrong thing, though. Right now it is the > > only thing in DAX code complaining on a page size/block size mismatch > > (at least for virtiofs). If this is so important, I feel like there > > should be a higher level check elsewhere, like somet

[RFC] module: Strict per-modname namespaces

2024-11-06 Thread Peter Zijlstra
Hi, I've been wanting $topic for a while, and having just stumbled into the whole namespace thing by accident, I figured I'd give it a go, most if the hard parts seem to have already been done. It reserves and disallows imports on any "MODULE_${name}" namespace, while it implicitly adds the same

Re: [PATCH] tests/module/gen_test_kallsyms.sh: use 0 value for variables

2024-11-06 Thread Sami Tolvanen
Hi Luis, On Wed, Nov 6, 2024 at 12:24 AM Luis Chamberlain wrote: > > Use 0 for the values as we use them for the return value on init > to keep the test modules simple. This fixes a splat reported > > do_init_module: 'test_kallsyms_b'->init suspiciously returned 255, it should > follow 0/-E conv

[PATCH] kselftest/arm64: Check that SVCR is 0 in signal handlers

2024-11-06 Thread Mark Brown
cr() != 0) { + fprintf(stderr, "Unexpected SVCR %llx\n", get_svcr()); + return 1; + } + return 0; } --- base-commit: 8e929cb546ee42c9a61d24fae60605e9e3192354 change-id: 20241106-arm64-fpmr-signal-test-c0a0c5bf0174 Best regards, -- Mark Brown

Re: [PATCH v4 1/2] selftests:tmpfs: Add Skip test if not run as root

2024-11-06 Thread Shuah Khan
On 11/5/24 13:26, Shivam Chaudhary wrote: Add skip test if not run as root, with an appropriate Warning. Add 'ksft_print_header()' and 'ksft_set_plan()' to structure test outputs more effectively. Test logs : Before change: - Without root error: unshare, errno 1 - With root No, output

Re: [PATCH v4 2/2] selftests: tmpfs: Add kselftest support to tmpfs

2024-11-06 Thread Shuah Khan
On 11/5/24 13:26, Shivam Chaudhary wrote: Replace direct error handling with 'ksft_test_result_*', 'ksft_print_msg' and KSFT_SKIP macros for better reporting. Test logs: Before change: - Without root error: unshare, errno 1 - With root No, output After change: - Without root TAP vers

[syzbot] [wpan?] [usb?] BUG: corrupted list in ieee802154_if_remove

2024-11-06 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:557329bcecc2 Merge tag 'mmc-v6.12-rc3' of git://git.kernel.. git tree: upstream console+strace: https://syzkaller.appspot.com/x/log.txt?x=14a9f74058 kernel config: https://syzkaller.appspot.com/x/.config?x=921b01cbfd887a9b das

Re: [PATCH 4/6] kselftest/arm64: Implement irritators for ZA and ZT

2024-11-06 Thread Mark Rutland
On Wed, Oct 23, 2024 at 09:38:32PM +0100, Mark Brown wrote: > Currently we don't use the irritator signal in our floating point stress > tests so when we added ZA and ZT stress tests we didn't actually bother > implementing any actual action in the handlers, we just counted the signal > deliveries.

Re: [PATCH] dax: Allow block size > PAGE_SIZE

2024-11-06 Thread Jan Kara
On Wed 06-11-24 19:55:23, Asahi Lina wrote: > On 11/5/24 7:16 AM, Dave Chinner wrote: > > On Tue, Nov 05, 2024 at 12:31:22AM +0900, Asahi Lina wrote: > > Unfortunately, the DAX infrastructure is independent of the page > > cache but is also tightly tied to PAGE_SIZE based inode->i_mapping > > index

Re: [PATCH 5/6] kselftest/arm64: Provide a SIGUSR1 handler in the kernel mode FP stress test

2024-11-06 Thread Mark Rutland
On Wed, Oct 23, 2024 at 09:38:33PM +0100, Mark Brown wrote: > The other stress test programs provide a SIGUSR1 handler which modifies the > live register state in order to validate that signal context is being > restored during signal return. While we can't usefully do this when testing > kernel mo

Re: [PATCH 6/6] kselftest/arm64: Test signal handler state modification in fp-stress

2024-11-06 Thread Mark Rutland
On Wed, Oct 23, 2024 at 09:38:34PM +0100, Mark Brown wrote: > Currently in fp-stress we test signal delivery to the test threads by > sending SIGUSR2 which simply counts how many signals are delivered. The > test programs now also all have a SIGUSR1 handler which for the threads > doing userspace t

[PATCH 1/2] Rename .data.unlikely to .data..unlikely

2024-11-06 Thread Masahiro Yamada
Commit 7ccaba5314ca ("consolidate WARN_...ONCE() static variables") was intended to collect all .data.unlikely sections into one chunk. However, this has not worked when CONFIG_LD_DEAD_CODE_DATA_ELIMINATION or CONFIG_LTO_CLANG is enabled, because .data.unlikely matches the .data.[0-9a-zA-Z_]* patte

[PATCH 6/6] rcuscale: Remove redundant WARN_ON_ONCE() splat

2024-11-06 Thread Frederic Weisbecker
From: "Uladzislau Rezki (Sony)" There are two places where WARN_ON_ONCE() is called two times in the error paths. One which is encapsulated into if() condition and another one, which is unnecessary, is placed in the brackets. Remove an extra WARN_ON_ONCE() splat which is in brackets. Signed-off

[PATCH 4/6] rcutorture: Avoid printing cpu=-1 for no-fault RCU boost failure

2024-11-06 Thread Frederic Weisbecker
From: "Paul E. McKenney" If a CPU runs throughout the stalled grace period without passing through a quiescent state, RCU priority boosting cannot help. The rcu_torture_boost_failed() function therefore prints a message flagging the first such CPU. However, if the stall was instead due to (for e

[PATCH 5/6] rcuscale: Do a proper cleanup if kfree_scale_init() fails

2024-11-06 Thread Frederic Weisbecker
From: "Uladzislau Rezki (Sony)" A static analyzer for C, Smatch, reports and triggers below warnings: kernel/rcu/rcuscale.c:1215 rcu_scale_init() warn: inconsistent returns 'global &fullstop_mutex'. The checker complains about, we do not unlock the "fullstop_mutex" mutex, in case of hitti

[PATCH 3/6] rcuscale: Add guest_os_delay module parameter

2024-11-06 Thread Frederic Weisbecker
From: "Paul E. McKenney" This commit adds a guest_os_delay module parameter that extends warm-up and cool-down the specified number of seconds before and after the series of test runs. This allows the data-collection intervals from any given rcuscale guest OSes to line up with active periods in

[PATCH 2/6] refscale: Correct affinity check

2024-11-06 Thread Frederic Weisbecker
From: "Paul E. McKenney" The current affinity check works fine until there are more reader processes than CPUs, at which point the affinity check is looking for non-existent CPUs. This commit therefore applies the same modulus to the check as is present in the set_cpus_allowed_ptr() call. Signe

[PATCH 1/6] torture: Add --no-affinity parameter to kvm.sh

2024-11-06 Thread Frederic Weisbecker
From: "Paul E. McKenney" In performance tests, it can be counter-productive to spread torture-test guest OSes across sockets. Plus the experimenter might have ideas about what CPUs individual guest OSes are to run on. This commit therefore adds a --no-affinity parameter to kvm.sh to prevent it

[PATCH 0/6] RCU torture for v6.13

2024-11-06 Thread Frederic Weisbecker
Hello, Please find below the RCU NOCB patches targeted for the upcoming merge window. Paul E. McKenney (4): torture: Add --no-affinity parameter to kvm.sh refscale: Correct affinity check rcuscale: Add guest_os_delay module parameter rcutorture: Avoid printing cpu=-1 for no-fault RCU boos

Re: [PATCH] dax: Allow block size > PAGE_SIZE

2024-11-06 Thread Asahi Lina
On 11/5/24 7:16 AM, Dave Chinner wrote: > On Tue, Nov 05, 2024 at 12:31:22AM +0900, Asahi Lina wrote: >> >> >> On 11/4/24 7:57 PM, Jan Kara wrote: >>> On Fri 01-11-24 21:22:31, Asahi Lina wrote: For virtio-dax, the file/FS blocksize is irrelevant. FUSE always uses large DAX blocks (2Mi

Re: [PATCH net-next v3 0/4] Introduce VLAN support in HSR

2024-11-06 Thread Jiri Pirko
Wed, Nov 06, 2024 at 10:17:06AM CET, danishan...@ti.com wrote: >This series adds VLAN support to HSR framework. >This series also adds VLAN support to HSR mode of ICSSG Ethernet driver. > >Changes from v2 to v3: >*) Modified hsr_ndo_vlan_rx_add_vid() to handle arbitrary HSR_PT_SLAVE_A, >HSR_PT_SLAV

[PATCH 2/2] rcu/nocb: Fix missed RCU barrier on deoffloading

2024-11-06 Thread Frederic Weisbecker
From: Zqiang Currently, running rcutorture test with torture_type=rcu fwd_progress=8 n_barrier_cbs=8 nocbs_nthreads=8 nocbs_toggle=100 onoff_interval=60 test_boost=2, will trigger the following warning: WARNING: CPU: 19 PID: 100 at kernel/rcu/tree_nocb.h:1061 rcu_nocb_rdp_deoffload+0x29

[PATCH 1/2] rcu: Remove unused declaration rcu_segcblist_offload()

2024-11-06 Thread Frederic Weisbecker
From: Yue Haibing Commit 17351eb59abd ("rcu/nocb: Simplify (de-)offloading state machine") removed the implementation but leave declaration. Signed-off-by: Yue Haibing Reviewed-by: Frederic Weisbecker Reviewed-by: "Paul E. McKenney" Signed-off-by: Neeraj Upadhyay Signed-off-by: Frederic Weis

[PATCH 0/2] RCU NOCB for v6.13

2024-11-06 Thread Frederic Weisbecker
Hello, Please find below the RCU NOCB patches targeted for the upcoming merge window. Yue Haibing (1): rcu: Remove unused declaration rcu_segcblist_offload() Zqiang (1): rcu/nocb: Fix missed RCU barrier on deoffloading kernel/rcu/rcu_segcblist.h | 1 - kernel/rcu/tree_nocb.h | 13

Re: [PATCH] vdpa/mlx5: Fix error path during device add

2024-11-06 Thread Eugenio Perez Martin
On Tue, Nov 5, 2024 at 7:52 PM Dragos Tatulea wrote: > > In the error recovery path of mlx5_vdpa_dev_add(), the cleanup is > executed and at the end put_device() is called which ends up calling > mlx5_vdpa_free(). This function will execute the same cleanup all over > again. Most resources support

Re: [PATCH 2/6] kselftest/arm64: Remove unused ADRs from irritator handlers

2024-11-06 Thread Mark Rutland
On Wed, Oct 23, 2024 at 09:38:30PM +0100, Mark Brown wrote: > The irritator handlers for the fp-stress test programs all use ADR to load > an address into x0 which is then not referenced. Remove these ADRs as they > just cause confusion. > > Signed-off-by: Mark Brown Acked-by: Mark Rutland Mar

[PATCH v3 2/3] timers: Use __raise_softirq_irqoff() to raise the softirq.

2024-11-06 Thread Sebastian Andrzej Siewior
As an optimisation use __raise_softirq_irqoff() to raise the softirq. This is always called from an interrupt handler, interrupts are already disabled so it can be reduced to just or set softirq flag and let softirq be invoked on return from interrupt. Use __raise_softirq_irqoff() to raise the sof

[PATCH v3 1/3] hrtimer: Use __raise_softirq_irqoff() to raise the softirq.

2024-11-06 Thread Sebastian Andrzej Siewior
As an optimisation use __raise_softirq_irqoff() to raise the softirq. This is always called from an interrupt handler so it can be reduced to just or set softirq flag and let softirq be invoked on return from interrupt. Use __raise_softirq_irqoff() to raise the softirq. Reviewed-by: Frederic Weis

[PATCH v3 3/3] softirq: Use a dedicated thread for timer wakeups on PREEMPT_RT.

2024-11-06 Thread Sebastian Andrzej Siewior
A timer/ hrtimer softirq is raised in-IRQ context. With threaded interrupts enabled or on PREEMPT_RT this leads to waking the ksoftirqd for the processing of the softirq. ksoftirqd runs as SCHED_OTHER which means it will compete with other tasks for CPU ressources. This can introduce long delays fo

PATCH v3 0/3] softirq: Use a dedicated thread for timer wakeups with forced-threading.

2024-11-06 Thread Sebastian Andrzej Siewior
Hi, the following was in the PREEMPT_RT queue since last softirq rework. The result is that timer wake ups (hrtimer, timer_list) happens in hardirq processing them requires to wake ksoftirqd. ksoftirqd runs at SCHED_OTHER so it will compete for resources with all other tasks in the system, potenti

[PATCH 8/8] rcu/kvfree: Fix data-race in __mod_timer / kvfree_call_rcu

2024-11-06 Thread Frederic Weisbecker
From: "Uladzislau Rezki (Sony)" KCSAN reports a data race when access the krcp->monitor_work.timer.expires variable in the schedule_delayed_monitor_work() function: BUG: KCSAN: data-race in __mod_timer / kvfree_call_rcu read to 0x888237d1cce8 of 8 bytes by task 10149 on cpu 1: schedule_de

[PATCH 7/8] rcu/srcutiny: don't return before reenabling preemption

2024-11-06 Thread Frederic Weisbecker
From: Michal Schmidt Code after the return statement is dead. Enable preemption before returning from srcu_drive_gp(). This will be important when/if PREEMPT_AUTO (lazy resched) gets merged. Fixes: 65b4a59557f6 ("srcu: Make Tiny SRCU explicitly disable preemption") Reviewed-by: Paul E. McKenney

[PATCH 6/8] rcu-tasks: Remove open-coded one-byte cmpxchg() emulation

2024-11-06 Thread Frederic Weisbecker
From: "Paul E. McKenney" This commit removes the open-coded one-byte cmpxchg() emulation from rcu_trc_cmpxchg_need_qs(), replacing it with just cmpxchg() given the latter's new-found ability to handle single-byte arguments across all architectures. Signed-off-by: Paul E. McKenney Signed-off-by:

[PATCH 5/8] doc: Remove kernel-parameters.txt entry for rcutorture.read_exit

2024-11-06 Thread Frederic Weisbecker
From: "Paul E. McKenney" There is only ever the one read-exit task, and there is no module parameter named rcutorture.read_exit, so remove the bogus documentation. Instead, use rcutorture.read_exit_burst to enable/disable read-exit race testing. Signed-off-by: Paul E. McKenney Cc: Alexei Starov

[PATCH 4/8] rcutorture: Test start-poll primitives with interrupts disabled

2024-11-06 Thread Frederic Weisbecker
From: "Paul E. McKenney" This commit tests the ->start_poll() and ->start_poll_full() functions with interrupts disabled, but only for RCU variants setting the ->start_poll_irqsoff flag. Signed-off-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker --- kernel/rcu/rcutorture.c | 10 ++

[PATCH 3/8] rcu: Permit start_poll_synchronize_rcu*() with interrupts disabled

2024-11-06 Thread Frederic Weisbecker
From: "Paul E. McKenney" The header comment for both start_poll_synchronize_rcu() and start_poll_synchronize_rcu_full() state that interrupts must be enabled when calling these two functions, and there is a lockdep assertion in start_poll_synchronize_rcu_common() enforcing this restriction. Howe

[PATCH 2/8] rcu: Allow short-circuiting of synchronize_rcu_tasks_rude()

2024-11-06 Thread Frederic Weisbecker
From: "Paul E. McKenney" There are now architectures for which all deep-idle and entry-exit functions are properly inlined or marked noinstr. Such architectures do not need synchronize_rcu_tasks_rude(), or will not once RCU Tasks has been modified to pay attention to idle tasks. This commit the

[PATCH 0/8] RCU fixes for v6.13

2024-11-06 Thread Frederic Weisbecker
Hello, Please find below the general RCU fixes targeted for the upcoming merge window. Michal Schmidt (1): rcu/srcutiny: don't return before reenabling preemption Paul E. McKenney (6): doc: Add rcuog kthreads to kernel-per-CPU-kthreads.rst rcu: Allow short-circuiting of synchronize_rcu_tas

[PATCH 1/8] doc: Add rcuog kthreads to kernel-per-CPU-kthreads.rst

2024-11-06 Thread Frederic Weisbecker
From: "Paul E. McKenney" This commit adds the rcuog kthreads to the list of callback-offloading kthreads that can be affinitied away from worker CPUs. Signed-off-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker --- Documentation/admin-guide/kernel-per-CPU-kthreads.rst | 2 +- 1 file ch

Re: [PATCH 2/2] selftests: coredump: Add stackdump test

2024-11-06 Thread John Ogness
On 2024-11-06, Nam Cao wrote: > Add a test which checks that the kstkesp field in /proc/pid/stat can be > read for all threads of a coredumping process. > > For full details including the motivation for this test and how it works, > see the README file added by this commit. > > Signed-off-by: Nam

Re: [PATCH 1/2] fs/proc: do_task_stat: Fix ESP not readable during coredump

2024-11-06 Thread John Ogness
On 2024-11-06, Nam Cao wrote: > Commit 0a1eb2d474ed ("fs/proc: Stop reporting eip and esp in > /proc/PID/stat") disabled stack pointer reading, because it is generally > dangerous to do so. > > Commit fd7d56270b52 ("fs/proc: Report eip/esp in /prod/PID/stat for > coredumping") made an exception fo

Re: [PATCH 3/6] kselftest/arm64: Corrupt P15 in the irritator when testing SSVE

2024-11-06 Thread Mark Brown
On Wed, Nov 06, 2024 at 11:27:24AM +, Mark Rutland wrote: > > +#ifndef SSVE > > // And FFR > > wrffr p15.b > > #endif > Both RDFFR and WRFFR are illegal in streaming mode unless FEAT_FA64 is > implemented and enabled, so we cannot use DRFFR in the SSVE case. Indeed, I'm surprised

Re: [PATCH 3/6] kselftest/arm64: Corrupt P15 in the irritator when testing SSVE

2024-11-06 Thread Mark Rutland
On Wed, Oct 23, 2024 at 09:38:31PM +0100, Mark Brown wrote: > When building for streaming SVE the irritator for SVE skips updates of both > P15 and FFR. While FFR is skipped since it might not be present there is no > reason to skip corrupting P15 so move the ifdef appropriately. I think you mean

Re: [PATCH 1/6] kselftest/arm64: Correct misleading comments on fp-stress irritators

2024-11-06 Thread Mark Rutland
On Wed, Oct 23, 2024 at 09:38:29PM +0100, Mark Brown wrote: > The comments in the handlers for the irritator signal in the test threads > for fp-stress suggest that the irritator will corrupt the register state > observed by the main thread but this is not the case, instead the FPSIMD > and SVE irr

Re: [PATCH 1/2] exec: fix up /proc/pid/comm in the execveat(AT_EMPTY_PATH) case

2024-11-06 Thread Christian Brauner
On Wed, Oct 30, 2024 at 02:37:31PM -0600, Tycho Andersen wrote: > From: Tycho Andersen > > Zbigniew mentioned at Linux Plumber's that systemd is interested in > switching to execveat() for service execution, but can't, because the > contents of /proc/pid/comm are the file descriptor which was use

Re: [syzbot] [lvs?] possible deadlock in start_sync_thread

2024-11-06 Thread D. Wythe
On 11/5/24 7:25 PM, Pablo Neira Ayuso wrote: Hi, I am Cc'ing SHARED MEMORY COMMUNICATIONS (SMC) SOCKETS maintainers. Similar issue already reported by syzkaller here: https://lore.kernel.org/netdev/ZyIgRmJUbnZpzXNV@calendula/T/#mf1f03a65108226102d8567c9fb6bab98c072444c related to smc->clcs

Re: [PATCH] virtio-pci: Add MSI support

2024-11-06 Thread Michael S. Tsirkin
On Fri, Jul 12, 2024 at 07:59:14PM +0530, Manivannan Sadhasivam wrote: > Virtio spec has so far only supported MSI-X and INTX for receiving the > interrupts from the virtio device on PCI transport. But this becomes a > limiting factor for devices supporting only MSI (plus INTX emulation) as > they

[PATCH net-next v3 0/4] Introduce VLAN support in HSR

2024-11-06 Thread MD Danish Anwar
This series adds VLAN support to HSR framework. This series also adds VLAN support to HSR mode of ICSSG Ethernet driver. Changes from v2 to v3: *) Modified hsr_ndo_vlan_rx_add_vid() to handle arbitrary HSR_PT_SLAVE_A, HSR_PT_SLAVE_B order and skip INTERLINK port in patch 2/4 as suggested by Paolo

Re: [PATCH net 0/4] virtio_net: Make RSS interact properly with queue number

2024-11-06 Thread Michael S. Tsirkin
On Mon, Nov 04, 2024 at 04:57:02PM +0800, Philo Lu wrote: > With this patch set, RSS updates with queue_pairs changing: > - When virtnet_probe, init default rss and commit > - When queue_pairs changes _without_ user rss configuration, update rss > with the new queue number > - When queue_pairs ch

[PATCH net-next v3 1/4] net: hsr: Add VLAN support

2024-11-06 Thread MD Danish Anwar
From: WingMan Kwok Add support for creating VLAN interfaces over HSR/PRP interface. Signed-off-by: WingMan Kwok Signed-off-by: Murali Karicheri Signed-off-by: MD Danish Anwar --- net/hsr/hsr_device.c | 5 - net/hsr/hsr_forward.c | 19 ++- 2 files changed, 14 insertions(

[PATCH net-next v3 2/4] net: hsr: Add VLAN CTAG filter support

2024-11-06 Thread MD Danish Anwar
From: Murali Karicheri This patch adds support for VLAN ctag based filtering at slave devices. The slave ethernet device may be capable of filtering ethernet packets based on VLAN ID. This requires that when the VLAN interface is created over an HSR/PRP interface, it passes the VID information to

[PATCH 2/2] selftests: coredump: Add stackdump test

2024-11-06 Thread Nam Cao
Add a test which checks that the kstkesp field in /proc/pid/stat can be read for all threads of a coredumping process. For full details including the motivation for this test and how it works, see the README file added by this commit. Signed-off-by: Nam Cao --- tools/testing/selftests/coredump/

[PATCH 1/2] fs/proc: do_task_stat: Fix ESP not readable during coredump

2024-11-06 Thread Nam Cao
Commit 0a1eb2d474ed ("fs/proc: Stop reporting eip and esp in /proc/PID/stat") disabled stack pointer reading, because it is generally dangerous to do so. Commit fd7d56270b52 ("fs/proc: Report eip/esp in /prod/PID/stat for coredumping") made an exception for coredumping thread, because for this cas

[PATCH 0/2] fix reading ESP during coredump

2024-11-06 Thread Nam Cao
Hi, In /proc/PID/stat, there is the kstkesp field which is the stack pointer of a thread. While the thread is active, this field reads zero. But during a coredump, it should have a valid value. However, at the moment, kstkesp is zero even during coredump. The first commit fixes this problem, and

Re: [PATCH v3 4/9] vhost: Add kthread support in function vhost_worker_create

2024-11-06 Thread Cindy Lu
On Tue, Nov 5, 2024 at 5:36 PM Jason Wang wrote: > > On Tue, Nov 5, 2024 at 3:27 PM Cindy Lu wrote: > > > > Restored the previous functions kthread_wakeup and kthread_stop. > > Also add a new structure, vhost_task_fn. The function vhost_worker_create > > Will initializes this structure based on t

[PATCH net-next v3 3/4] net: ti: icssg-prueth: Add VLAN support for HSR mode

2024-11-06 Thread MD Danish Anwar
From: Ravi Gunasekaran Add support for VLAN addition/deletion in HSR mode. In HSR mode, even if the host port is not a member of the VLAN domain, the slave ports should simply forward the frames. So allow forwarding of all VLAN frames in HSR mode. Signed-off-by: Ravi Gunasekaran Signed-off-by:

[PATCH net-next v3 4/4] selftests: hsr: Add test for VLAN

2024-11-06 Thread MD Danish Anwar
Add test for VLAN ping for HSR. The test adds vlan interfaces to the hsr interface and then verifies if ping to them works. Signed-off-by: MD Danish Anwar --- tools/testing/selftests/net/hsr/config | 1 + tools/testing/selftests/net/hsr/hsr_ping.sh | 98 + 2 files chang

Re: [PATCH v2] vhost/vsock: specify module version

2024-11-06 Thread Michael S. Tsirkin
On Wed, Oct 02, 2024 at 07:16:02AM -0700, Jakub Kicinski wrote: > On Mon, 30 Sep 2024 19:03:52 +0200 Aleksandr Mikhalitsyn wrote: > > > At this point my question is, should we solve the problem higher and > > > show all the modules in /sys/modules, either way? > > > > Probably, yes. We can ask L

Re: [PATCH net 0/4] virtio_net: Make RSS interact properly with queue number

2024-11-06 Thread Xuan Zhuo
Hi Jason, could you review this firstly? Thanks. On Mon, 4 Nov 2024 16:57:02 +0800, Philo Lu wrote: > With this patch set, RSS updates with queue_pairs changing: > - When virtnet_probe, init default rss and commit > - When queue_pairs changes _without_ user rss configuration, update rss > wit

Re: [PATCH] vhost/net: Set num_buffers for virtio 1.0

2024-11-06 Thread Michael S. Tsirkin
On Sun, Sep 15, 2024 at 10:35:53AM +0900, Akihiko Odaki wrote: > The specification says the device MUST set num_buffers to 1 if > VIRTIO_NET_F_MRG_RXBUF has not been negotiated. > > Fixes: 41e3e42108bc ("vhost/net: enable virtio 1.0") > Signed-off-by: Akihiko Odaki True, this is out of spec. But

Re: [PATCH 1/6] lib: math: Move kunit tests into tests/ subdir

2024-11-06 Thread Geert Uytterhoeven
Hi all, On Fri, Oct 11, 2024 at 10:59 AM Geert Uytterhoeven wrote: > On Fri, Oct 11, 2024 at 9:31 AM David Gow wrote: > > From: Luis Felipe Hernandez > > > > This patch is a follow-up task from a discussion stemming from point 3 > > in a recent patch introducing the int_pow kunit test [1] and >