Re: [PATCH bpf-next v6 4/5] bpf: verifier: Support eliding map lookup nullness

2025-01-02 Thread Eduard Zingerman
On Thu, 2024-12-19 at 21:09 -0700, Daniel Xu wrote: lgtm, but please see a note below. [...] > +/* Returns constant key value if possible, else negative error */ > +static s64 get_constant_map_key(struct bpf_verifier_env *env, > + struct bpf_reg_state *key, > +

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

2025-01-02 Thread Shuah Khan
On 1/2/25 03:04, Shivam Chaudhary wrote: Replace direct error handling with 'ksft_test_result_*' macros for better reporting. Test logs: Before change: - Without root error: unshare, errno 1 - With root No, output After change: - Without root TAP version 13 1..1 ok 2 # SKIP This test need

Re: [PATCH v5 0/6] vhost: Add support of kthread API

2025-01-02 Thread Lei Yang
I tested this series v5 with virtio-net regression tests, everything works fine. Tested-by: Lei Yang On Mon, Dec 30, 2024 at 8:46 PM Cindy Lu wrote: > > In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), > the vhost now uses vhost_task and operates as a child of the > owner

Re: [PATCH 1/3] remoteproc: k3-r5: Fix checks in k3_r5_rproc_{mbox_callback/kick}

2025-01-02 Thread Siddharth Vadapalli
On Tue, Dec 24, 2024 at 02:44:55PM +0530, Beleswar Padhi wrote: > Commit f3f11cfe8907 ("remoteproc: k3-r5: Acquire mailbox handle during > probe routine") introduced a check in the "k3_r5_rproc_mbox_callback()" > and "k3_r5_rproc_kick()" callbacks to exit if the remote core's state > was "RPROC_DET

Re: [PATCH 2/3] remoteproc: k3-dsp: Fix checks in k3_dsp_rproc_{mbox_callback/kick}

2025-01-02 Thread Siddharth Vadapalli
On Tue, Dec 24, 2024 at 02:44:56PM +0530, Beleswar Padhi wrote: > Commit ea1d6fb5b571 ("remoteproc: k3-dsp: Acquire mailbox handle during > probe routine") introduced a check in the "k3_dsp_rproc_mbox_callback()" > and "k3_dsp_rproc_kick()" callbacks to exit if the remote core's state > was "RPROC_

Re: [PATCH v2 28/28] cfi: Use RCU while invoking __module_address().

2025-01-02 Thread Sami Tolvanen
Hi Elliot, On Mon, Dec 30, 2024 at 7:33 PM Elliot Berman wrote: > > On Fri, Dec 20, 2024 at 06:41:42PM +0100, Sebastian Andrzej Siewior wrote: > > __module_address() can be invoked within a RCU section, there is no > > requirement to have preemption disabled. > > > > I'm not sure if using rcu_rea

Re: [PATCH v7 1/2] selftests: tmpfs: Add Test-skip if not run as root

2025-01-02 Thread Shuah Khan
On 1/2/25 03:04, Shivam Chaudhary wrote: Add 'ksft_exit_skip()', 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, o

[RFC PATCH RESEND v2 0/2] Add file seal to prevent future exec mappings

2025-01-02 Thread Isaac J. Manjarres
* Resending because I accidentally forgot to include Lorenzo in the "to" list. Android uses the ashmem driver [1] for creating shared memory regions between processes. The ashmem driver exposes an ioctl command for processes to restrict the permissions an ashmem buffer can be mapped with. Buffe

[RFC PATCH RESEND v2 2/2] selftests/memfd: Add tests for F_SEAL_FUTURE_EXEC

2025-01-02 Thread Isaac J. Manjarres
Add tests to ensure that F_SEAL_FUTURE_EXEC behaves as expected. Signed-off-by: Isaac J. Manjarres --- tools/testing/selftests/memfd/memfd_test.c | 79 ++ 1 file changed, 79 insertions(+) diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memf

[PATCH v3 0/2] fix reading ESP during coredump

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

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

2025-01-02 Thread Nam Cao
The field "eip" (instruction pointer) and "esp" (stack pointer) of a task can be read from /proc/PID/stat. These fields can be interesting for coredump. However, these fields were disabled by commit 0a1eb2d474ed ("fs/proc: Stop reporting eip and esp in /proc/PID/stat"), because it is generally uns

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

2025-01-02 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. Reviewed-by: John Ogness Signed-off-by: Nam Cao --- tools/t

[RFC PATCH RESEND v2 1/2] mm/memfd: Add support for F_SEAL_FUTURE_EXEC to memfd

2025-01-02 Thread Isaac J. Manjarres
Android currently uses the ashmem driver [1] for creating shared memory regions between processes. Ashmem buffers can initially be mapped with PROT_READ, PROT_WRITE, and PROT_EXEC. Processes can then use the ASHMEM_SET_PROT_MASK ioctl command to restrict--never add--the permissions that the buffer

Re: [PATCH v2 28/28] cfi: Use RCU while invoking __module_address().

2025-01-02 Thread Sami Tolvanen
Hi Petr, On Mon, Dec 30, 2024 at 1:13 PM Petr Pavlu wrote: > > On 12/20/24 18:41, Sebastian Andrzej Siewior wrote: > > __module_address() can be invoked within a RCU section, there is no > > requirement to have preemption disabled. > > > > I'm not sure if using rcu_read_lock() will introduce the

Re: watchdog: BUG: soft lockup in note_gp_changes in kernel/rcu/tree.c

2025-01-02 Thread Paul E. McKenney
On Thu, Jan 02, 2025 at 10:59:27AM +0800, Kun Hu wrote: > Hello, > > When using our customed fuzzer tool to fuzz the latest Linux kernel, the > following crash > was triggered. > > HEAD commit: dbfac60febfa806abb2d384cb6441e77335d2799 > git tree: upstream > Console output: > https://drive.googl

Re: [PATCH for-next v2] selftests/Makefile: override the srctree for out-of-tree builds

2025-01-02 Thread Quentin Monnet
2024-12-23 16:33 UTC+0800 ~ Li Zhijian > Fixes an issue where out-of-tree kselftest builds fail when building > the BPF and bpftools components. The failure occurs because the top-level > Makefile passes a relative srctree path to its sub-Makefiles, which > leads to errors in locating necessary fi

Re: [PATCH v4 2/2] livepatch: Convert timeouts to secs_to_jiffies()

2025-01-02 Thread Petr Mladek
On Wed 2024-12-18 09:35:46, Easwar Hariharan wrote: > On 12/18/2024 12:48 AM, Christophe Leroy wrote: > > > > > > Le 18/12/2024 à 09:38, Petr Mladek a écrit : > >> On Tue 2024-12-17 23:09:59, Easwar Hariharan wrote: > >>> Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced > >>>

Re: [PATCH] sev-snp: parse MP tables for VMware hypervisor

2025-01-02 Thread Ajay Kaher
On Thu, Dec 26, 2024 at 9:26 PM Kevin Loughlin wrote: > > On Thu, Dec 19, 2024 at 6:44 AM Ajay Kaher wrote: > > > > For VMware hypervisor, SEV-SNP enabled VM's could boot without UEFI. > > In this case, mpparse_find_mptable() has to be called to parse MP > > tables which contains boot information

Re: [PATCH v7 02/16] rust: implement generic driver registration

2025-01-02 Thread Danilo Krummrich
Hi Gary, On Tue, Dec 24, 2024 at 07:58:21PM +, Gary Guo wrote: > On Thu, 19 Dec 2024 18:04:04 +0100 > Danilo Krummrich wrote: > > > Implement the generic `Registration` type and the `RegistrationOps` > > trait. > > > > The `Registration` structure is the common type that represents a driver

Re: [PATCH v7 02/18] gendwarfksyms: Add address matching

2025-01-02 Thread Sami Tolvanen
Hi, On Sat, Dec 28, 2024 at 4:29 PM Masahiro Yamada wrote: > > On Fri, Dec 20, 2024 at 6:07 AM Sami Tolvanen wrote: > > > > diff --git a/scripts/gendwarfksyms/symbols.c > > b/scripts/gendwarfksyms/symbols.c > > index 7adf2ed9b89b..98febb524dd5 100644 > > --- a/scripts/gendwarfksyms/symbols.c >

Re: [PATCH v7 01/18] tools: Add gendwarfksyms

2025-01-02 Thread Sami Tolvanen
Hi Masahiro, On Fri, Dec 27, 2024 at 6:02 AM Masahiro Yamada wrote: > > On Fri, Dec 20, 2024 at 6:07 AM Sami Tolvanen wrote: > > > +int main(int argc, char **argv) > > +{ > > + unsigned int n; > > + int opt; > > + > > + struct option opts[] = { { "debug", 0, NULL, 'd' }, > > Yo

Re: [PATCH bpf-next v6 5/5] bpf: selftests: verifier: Add nullness elision tests

2025-01-02 Thread Eduard Zingerman
On Thu, 2024-12-19 at 21:09 -0700, Daniel Xu wrote: > Test that nullness elision works for common use cases. For example, we > want to check that both constant scalar spills and STACK_ZERO functions. > As well as when there's both const and non-const values of R2 leading up > to a lookup. And obvio

[PATCH] rseq/selftests: Fix riscv rseq_offset_deref_addv inline asm

2025-01-02 Thread Stafford Horne
When working on OpenRISC support for restartable sequences I noticed and fixed these two issues with the riscv support bits. 1 The 'inc' argument to RSEQ_ASM_OP_R_DEREF_ADDV was being implicitly passed to the macro. Fix this by adding 'inc' to the list of macro arguments. 2 The inline asm

Re: [PATCH v7 04/16] rust: add rcu abstraction

2025-01-02 Thread Danilo Krummrich
On Tue, Dec 24, 2024 at 08:54:50PM +, Gary Guo wrote: > On Thu, 19 Dec 2024 18:04:06 +0100 > Danilo Krummrich wrote: > > > From: Wedson Almeida Filho > > > > Add a simple abstraction to guard critical code sections with an rcu > > read lock. > > > > Reviewed-by: Boqun Feng > > Signed-off-

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

2025-01-02 Thread Shivam Chaudhary
Replace direct error handling with 'ksft_test_result_*' macros for better reporting. Test logs: Before change: - Without root error: unshare, errno 1 - With root No, output After change: - Without root TAP version 13 1..1 ok 2 # SKIP This test needs root to run! Totals: pass:0 fail:0 xfail:0

[PATCH v7 1/2] selftests: tmpfs: Add Test-skip if not run as root

2025-01-02 Thread Shivam Chaudhary
Add 'ksft_exit_skip()', 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 After change: - Without root TAP vers

[PATCH v7 0/2] selftests: tmpfs: Add kselftest support

2025-01-02 Thread Shivam Chaudhary
This version 7 patch series replace direct error handling methods with ksft macros, which provide better reporting.Currently, when the tmpfs test runs, it does not display any output if it passes,and if it fails (particularly when not run as root),it simply exits without any warning or message. Th

Re: [PATCH v4 3/3] selftests: pci_endpoint: Migrate to Kselftest framework

2025-01-02 Thread Niklas Cassel
Hello Mani, Vinod, On Thu, Jan 02, 2025 at 12:34:04PM +0530, Manivannan Sadhasivam wrote: > On Tue, Dec 31, 2024 at 08:33:57PM +0100, Niklas Cassel wrote: > > > > I have some patches that adds DMA_MEMCPY to dw-edma, but I'm not sure if > > the DWC eDMA hardware supports having both src and dst a

Re: [PATCH v7 08/16] rust: add devres abstraction

2025-01-02 Thread Danilo Krummrich
On Tue, Dec 24, 2024 at 09:53:23PM +, Gary Guo wrote: > On Thu, 19 Dec 2024 18:04:10 +0100 > Danilo Krummrich wrote: > > > Add a Rust abstraction for the kernel's devres (device resource > > management) implementation. > > > > The Devres type acts as a container to manage the lifetime and >

Re: [PATCH v2 00/28] module: Use RCU instead of RCU-sched.

2025-01-02 Thread Christophe Leroy
Hi Sebastian, Le 20/12/2024 à 18:41, Sebastian Andrzej Siewior a écrit : Hi, This is an updated version of the inital post after PeterZ made me aware that there are users outside of the module directory. The goal is replace the mix auf rcu_read_lock(), rcu_read_lock_sched() and preempt_disable(

Re: [PATCH v7 08/16] rust: add devres abstraction

2025-01-02 Thread Danilo Krummrich
On Thu, Jan 02, 2025 at 11:30:11AM +0100, Danilo Krummrich wrote: > On Tue, Dec 24, 2024 at 09:53:23PM +, Gary Guo wrote: > > On Thu, 19 Dec 2024 18:04:10 +0100 > > Danilo Krummrich wrote: > > > > > Add a Rust abstraction for the kernel's devres (device resource > > > management) implementati

Re: [RFC PATCH 1/2] ptp: add PTP_SYS_OFFSET_STAT for xtstamping with status

2025-01-02 Thread Peter Hilber
On Wed, Dec 25, 2024 at 04:42:14PM -0800, Richard Cochran wrote: > On Mon, Dec 23, 2024 at 07:13:46PM +0100, Peter Hilber wrote: > > > The precise synchronization of the VM guest with its immediate > > environment can also be important; a VM guest may depend the decision > > about leap second smea

Re: [RFC PATCH 1/2] ptp: add PTP_SYS_OFFSET_STAT for xtstamping with status

2025-01-02 Thread Richard Cochran
On Thu, Jan 02, 2025 at 05:11:01PM +0100, Peter Hilber wrote: > Would it be more acceptable to just announce leap seconds, but not > whether to smear? Up until now, leap second announcements were handled in user space, and the kernel played no role. > I do not understand. Is the point that guests

Re: [PATCH v7 03/16] rust: implement `IdArray`, `IdTable` and `RawDeviceId`

2025-01-02 Thread Danilo Krummrich
On Tue, Dec 24, 2024 at 08:10:02PM +, Gary Guo wrote: > On Thu, 19 Dec 2024 18:04:05 +0100 > Danilo Krummrich wrote: > > > Most subsystems use some kind of ID to match devices and drivers. Hence, > > we have to provide Rust drivers an abstraction to register an ID table > > for the driver to

[PATCH] selftests: livepatch: test if ftrace can trace a livepatched function

2025-01-02 Thread Filipe Xavier
This new test makes sure that ftrace can trace a function that was introduced by a livepatch. Signed-off-by: Filipe Xavier --- tools/testing/selftests/livepatch/test-ftrace.sh | 37 1 file changed, 37 insertions(+) diff --git a/tools/testing/selftests/livepatch/test-ftr