Re: [PATCH v2 1/2] time/timekeeping: Fix possible inconsistencies in _COARSE clockids

2025-04-16 Thread John Stultz
On Mon, Mar 31, 2025 at 12:54 AM Miroslav Lichvar wrote: > On Thu, Mar 27, 2025 at 06:32:27PM +0100, Thomas Gleixner wrote: > > On Thu, Mar 27 2025 at 16:42, Miroslav Lichvar wrote: > > > On Thu, Mar 27, 2025 at 10:22:31AM +0100, Thomas Gleixner wrote: > > > To clearly see the difference with the

[PATCH bpf-next v1 1/2] bpf: Create cgroup storage if needed when updating link

2025-04-16 Thread Jiayuan Chen
when we attach a prog without cgroup_storage map being used, cgroup_storage in struct bpf_prog_array_item is empty. Then, if we use BPF_LINK_UPDATE to replace old prog with a new one that uses the cgroup_storage map, we miss cgroup_storage being initiated. This cause a painc when accessing stroage

[PATCH bpf-next v1 0/2] bpf: Fix panic in bpf_get_local_storage

2025-04-16 Thread Jiayuan Chen
The selftest I provided can reproduce a panic: './test_progs -a cgroup_storage_update' When we attach a program to cgroup and if prog->aux->cgroup_storage exists, which means the cgroup_storage map is used in the program, we will then allocate storage by bpf_cgroup_storages_alloc() and assign it t

[PATCH net-next v2 3/4] selftests: net: Allow custom net ns paths

2025-04-16 Thread Joe Damato
Extend NetNSEnter to allow custom paths in order to support, for example, /proc/self/ns/net. Signed-off-by: Joe Damato --- tools/testing/selftests/net/lib/py/netns.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/lib/py/netns.py b/tools/test

Re: [PATCH v1] fs/dax: fix folio splitting issue by resetting old folio order + _nr_pages

2025-04-16 Thread Darrick J. Wong
On Thu, Apr 10, 2025 at 12:12:33PM -0700, Alison Schofield wrote: > On Thu, Apr 10, 2025 at 11:10:20AM +0200, David Hildenbrand wrote: > > Alison reports an issue with fsdax when large extends end up using > > large ZONE_DEVICE folios: > > > > Passes the ndctl/dax unit tests. > > Tested-by: Aliso

Re: [PATCH v3 3/3] selftests: net: add a virtio_net deadlock selftest

2025-04-16 Thread Jakub Kicinski
On Wed, 16 Apr 2025 15:46:42 +0800 Jason Wang wrote: > On Wed, Apr 16, 2025 at 2:54 PM Bui Quang Minh > wrote: > > On 4/16/25 11:27, Jakub Kicinski wrote: > > > Unfortunately this doesn't work on a basic QEMU setup: > > > > > > # ethtool -G eth0 rx 128 > > > [ 15.680655][ T287] virtio_net vi

[PATCH] KVM: selftests: add test for SVE host corruption

2025-04-16 Thread Mark Brown
This test program, originally written by Mark Rutland and lightly modified by me for upstream, verifies that we do not have the issues with host SVE state being discarded which were fixed in fbc7e61195e2 ("KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state") by running a simple

Re: [PATCH RFC bpf-next 1/4] bpf: add struct largest member size in func model

2025-04-16 Thread Andrii Nakryiko
On Fri, Apr 11, 2025 at 1:32 PM Alexis Lothoré (eBPF Foundation) wrote: > > In order to properly JIT the trampolines needed to attach BPF programs > to functions, some architectures like ARM64 need to know about the > alignment needed for the function arguments. Such alignment can > generally be d

Re: [PATCH v3 1/2] x86/sgx: Use sgx_nr_used_pages for EPC page count instead of sgx_nr_free_pages

2025-04-16 Thread Jarkko Sakkinen
On Wed, Apr 16, 2025 at 09:50:44PM +0300, Jarkko Sakkinen wrote: > On Tue, Apr 15, 2025 at 02:51:21PM +0300, Elena Reshetova wrote: > > Note: The serialization for sgx_nr_total_pages is not needed because > > the variable is only updated during the initialization and there's no > > concurrent acces

Re: [PATCH v3 1/2] x86/sgx: Use sgx_nr_used_pages for EPC page count instead of sgx_nr_free_pages

2025-04-16 Thread Jarkko Sakkinen
On Tue, Apr 15, 2025 at 02:51:21PM +0300, Elena Reshetova wrote: > Note: The serialization for sgx_nr_total_pages is not needed because > the variable is only updated during the initialization and there's no > concurrent access. No. It's - not a side-note but core part of the rationale. - the rea

Re: [PATCH v3 2/2] x86/sgx: Implement EUPDATESVN and opportunistically call it during first EPC page alloc

2025-04-16 Thread Jarkko Sakkinen
On Tue, Apr 15, 2025 at 02:51:22PM +0300, Elena Reshetova wrote: > SGX architecture introduced a new instruction called EUPDATESVN > to Ice Lake. It allows updating security SVN version, given that EPC > is completely empty. The latter is required for security reasons > in order to reason that encl

[PATCH 3/6] tools/nolibc: properly align dirent buffer

2025-04-16 Thread Thomas Weißschuh
As byte buffer is overlaid with a 'struct dirent64'. it has to satisfy the structs alignment requirements. Fixes: 665fa8dea90d ("tools/nolibc: add support for directory access") Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/dirent.h | 1 + 1 file changed, 1 insertion(+) diff --git a/

Re: [RFC PATCH 0/8] Introduce simple hazard pointers for lockdep

2025-04-16 Thread Breno Leitao
Hello Vlad, On Wed, Apr 16, 2025 at 05:04:31PM +0200, Uladzislau Rezki wrote: > On Wed, Apr 16, 2025 at 07:14:04AM -0700, Breno Leitao wrote: > > Hi Boqun, > > > > On Sun, Apr 13, 2025 at 11:00:47PM -0700, Boqun Feng wrote: > > > > > Overall it looks promising to me, but I would like to see how

[PATCH 5/6] selftests/nolibc: disable ubsan for smash_stack()

2025-04-16 Thread Thomas Weißschuh
smash_stack() intentionally crashes. Prevent UBSAN from tripping over it. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/nolibc-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-te

[PATCH 6/6] selftests/nolibc: enable UBSAN if available

2025-04-16 Thread Thomas Weißschuh
UBSAN detects undefined behaviour at runtime. To avoid introduction of new UB, enable UBSAN for nolibc-test. By signalling detected errors through traps no runtime dependency is necessary. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 3 ++- 1 file changed, 2 ins

[PATCH 1/6] tools/nolibc: add __nolibc_has_feature()

2025-04-16 Thread Thomas Weißschuh
Certain compiler features are signaled via the __has_feature() preprocessor builtin. Add a nolibc wrapper for it, similar to __nolibc_has_attribute(). Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/compiler.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/include/noli

[PATCH 0/6] tools/nolibc: fix some undefined behaviour and enable UBSAN

2025-04-16 Thread Thomas Weißschuh
: 7c73c10b906778384843b9d3ac6c2224727bbf5c change-id: 20250416-nolibc-ubsan-028401698654 Best regards, -- Thomas Weißschuh

[PATCH 4/6] tools/nolibc: fix integer overflow in i{64,}toa_r() and

2025-04-16 Thread Thomas Weißschuh
In twos complement the most negative number can not be negated. Fixes: b1c21e7d99cd ("tools/nolibc/stdlib: add i64toa() and u64toa()") Fixes: 66c397c4d2e1 ("tools/nolibc/stdlib: replace the ltoa() function with more efficient ones") Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/stdli

[PATCH 2/6] tools/nolibc: disable function sanitizer for _start_c()

2025-04-16 Thread Thomas Weißschuh
Both constructors and main() may be executed with different function signatures than they are actually using. This is intentional but trips up UBSAN. Disable the function sanitizer of UBSAN in _start_c(). Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/crt.h | 5 + 1 file changed,

Re: [PATCH] arm64: dts: qcom: sdm660-xiaomi-lavender: Add missing SD card detect GPIO

2025-04-16 Thread Bjorn Andersson
On Tue, 15 Apr 2025 16:01:01 +0300, Alexey Minnekhanov wrote: > During initial porting these cd-gpios were missed. Having card detect is > beneficial because driver does not need to do polling every second and it > can just use IRQ. SD card detection in U-Boot is also fixed by this. > > Fixes: c

[PATCH bpf-next v2 0/2] bpf: Allow access to const void pointer arguments in tracing programs

2025-04-16 Thread KaFai Wan
If we try to access argument which is pointer to const void, it's an UNKNOWN type, verifier will fail to load. Use is_void_or_int_ptr to check if type is void or int pointer. And fix selftests. --- KaFai Wan (2): bpf: Allow access to const void pointer arguments in tracing programs selftes

[PATCH bpf-next v2 2/2] selftests/bpf: Add test to access const void pointer argument in tracing program

2025-04-16 Thread KaFai Wan
Adding verifier test for accessing const void pointer argument in tracing programs. The test program loads 1st argument of bpf_fentry_test10 function which is const void pointer and checks that verifier allows that. Signed-off-by: KaFai Wan --- net/bpf/test_run.c

[PATCH bpf-next v2 1/2] bpf: Allow access to const void pointer arguments in tracing programs

2025-04-16 Thread KaFai Wan
Adding support to access arguments with const void pointer arguments in tracing programs. Currently we allow tracing programs to access void pointers. If we try to access argument which is pointer to const void like 2nd argument in kfree, verifier will fail to load the program with; 0: R1=ctx() R

Re: [PATCH net-next v26 00/23] Introducing OpenVPN Data Channel Offload

2025-04-16 Thread Sabrina Dubroca
2025-04-15, 13:17:17 +0200, Antonio Quartulli wrote: > Notable changes since v25: > * removed netdev notifier (was only used for our own devices) > * added .dellink implementation to address what was previously > done in notifier > * removed .ndo_open and moved netif_carrier_off() call to .ndo_in

Re: [RFC PATCH 0/8] Introduce simple hazard pointers for lockdep

2025-04-16 Thread Uladzislau Rezki
On Wed, Apr 16, 2025 at 07:14:04AM -0700, Breno Leitao wrote: > Hi Boqun, > > On Sun, Apr 13, 2025 at 11:00:47PM -0700, Boqun Feng wrote: > > > Overall it looks promising to me, but I would like to see how it > > performs in the environment of Breno. Also as Paul always reminds me: > > buggy code

Re: [RFC PATCH 0/8] Introduce simple hazard pointers for lockdep

2025-04-16 Thread Breno Leitao
Hi Boqun, On Sun, Apr 13, 2025 at 11:00:47PM -0700, Boqun Feng wrote: > Overall it looks promising to me, but I would like to see how it > performs in the environment of Breno. Also as Paul always reminds me: > buggy code usually run faster, so please take a look in case I'm missing > something ;

Re: [PATCH v4 0/4] Properly handle module_kobject creation

2025-04-16 Thread Petr Pavlu
On 2/27/25 19:49, Shyam Saini wrote: > Hi Everyone, > > This patch series fixes handling of module_kobject creation. > A driver expect module_kset list populated with its corresponding > module_kobject to create its /sys/module//drivers > directory. > > Since, > [1] commit 96a1a2412acb ("kernel/p

Re: [PATCH 1/1] virtio_console: fix missing byte order handling for cols and rows

2025-04-16 Thread Amit Shah
On Sat, 2025-03-22 at 01:29 +0100, Halil Pasic wrote: > As per virtio spec the fields cols and rows are specified as little > endian. Although there is no legacy interface requirement that would > state that cols and rows need to be handled as native endian when > legacy > interface is used, unlike

Re: [PATCH net-next 1/2] vsock: Linger on unsent data

2025-04-16 Thread Michal Luczaj
On 4/11/25 12:32, Stefano Garzarella wrote: > On Thu, Apr 10, 2025 at 12:51:48PM +0200, Paolo Abeni wrote: >> On 4/7/25 8:41 PM, Michal Luczaj wrote: >>> Change the behaviour of a lingering close(): instead of waiting for all >>> data to be consumed, block until data is considered sent, i.e. until

RE: [PATCH v3 2/2] x86/sgx: Implement EUPDATESVN and opportunistically call it during first EPC page alloc

2025-04-16 Thread Reshetova, Elena
> On Tue, 2025-04-15 at 14:51 +0300, Elena Reshetova wrote: > > SGX architecture introduced a new instruction called EUPDATESVN > > "a new ENCLS leaf function EUPDATESVN"? Yes, you are right, better wording, will fix. > > > to Ice Lake. It allows updating security SVN version, given that EPC

RE: [PATCH v3 1/2] x86/sgx: Use sgx_nr_used_pages for EPC page count instead of sgx_nr_free_pages

2025-04-16 Thread Reshetova, Elena
> On Tue, 2025-04-15 at 14:51 +0300, Elena Reshetova wrote: > > sgx_nr_free_pages is an atomic that is used to keep track of > > free EPC pages and detect whenever page reclaiming should start. > > Since successful execution of ENCLS[EUPDATESVN] requires empty > > The mentioning of ENCLS[EUPDATE

Re: [PATCH v3 1/2] rcutorture: Perform more frequent testing of ->gpwrap

2025-04-16 Thread Joel Fernandes
> On Apr 15, 2025, at 8:19 PM, Paul E. McKenney wrote: > > On Mon, Apr 14, 2025 at 11:05:45AM -0400, Joel Fernandes wrote: >> On 4/10/2025 2:29 PM, Paul E. McKenney wrote: +static int rcu_gpwrap_lag_init(void) +{ +if (gpwrap_lag_cycle_mins <= 0 || gpwrap_lag_active_mins <= 0

Re: [PATCH v3 1/2] x86/sgx: Use sgx_nr_used_pages for EPC page count instead of sgx_nr_free_pages

2025-04-16 Thread Huang, Kai
On Tue, 2025-04-15 at 14:51 +0300, Elena Reshetova wrote: > sgx_nr_free_pages is an atomic that is used to keep track of > free EPC pages and detect whenever page reclaiming should start. > Since successful execution of ENCLS[EUPDATESVN] requires empty The mentioning of ENCLS[EUPDATESVN] is kinda

Re: [PATCH] vhost/net: remove zerocopy support

2025-04-16 Thread Eugenio Perez Martin
On Tue, Apr 8, 2025 at 8:28 AM Jason Wang wrote: > > On Tue, Apr 8, 2025 at 9:18 AM Jon Kohler wrote: > > > > > > > > > On Apr 6, 2025, at 7:14 PM, Jason Wang wrote: > > > > > > !---| > > > CAUTION: External Email > > > > > > |

Re: [PATCH] kunit: qemu_configs: Disable faulting tests on 32-bit SPARC

2025-04-16 Thread Thomas Weißschuh
On Wed, Apr 16, 2025 at 05:38:25PM +0800, David Gow wrote: > The 32-bit sparc configuration (--arch sparc) crashes on > the kunit_fault_test. It's known that some architectures don't handle > deliberate segfaults in kernel mode well, so there's a config switch to > disable tests which rely upon it

[PATCH] kunit: qemu_configs: Disable faulting tests on 32-bit SPARC

2025-04-16 Thread David Gow
The 32-bit sparc configuration (--arch sparc) crashes on the kunit_fault_test. It's known that some architectures don't handle deliberate segfaults in kernel mode well, so there's a config switch to disable tests which rely upon it by default. Use this for the sparc config, making sure the default

Re: [PATCH 2/2] kunit: qemu_configs: Add 64-bit SPARC configuration

2025-04-16 Thread David Gow
On Tue, 15 Apr 2025 at 21:38, Thomas Weißschuh wrote: > > Add a basic config to run kunit tests on 64-bit SPARC. > > Signed-off-by: Thomas Weißschuh > --- Thanks! Reviewed-by: David Gow Cheers, -- David > tools/testing/kunit/qemu_configs/sparc64.py | 16 > 1 file changed,

Re: [PATCH 1/2] kunit: qemu_configs: sparc: Explicitly enable CONFIG_SPARC32=y

2025-04-16 Thread David Gow
On Tue, 15 Apr 2025 at 21:38, Thomas Weißschuh wrote: > > The configuration generated by kunit ends up with a 32bit configuration. > A new kunit configuration for 64bit is to be added. > To make the difference clearer spell out the variant in the kunit > reference config. > > Signed-off-by: Thomas

Re: [PATCH v7 1/2] selftests: memcg: Allow low event with no memory.low and memory_recursiveprot on

2025-04-16 Thread Michal Koutný
On Tue, Apr 15, 2025 at 05:04:14PM -0400, Waiman Long wrote: > + /* > + * Child 2 has memory.low=0, but some low protection is still being > + * distributed down from its parent with memory.low=50M if cgroup2 > + * memory_recursiveprot mount option is enabled. So the low event

Re: [PATCH v3 3/3] selftests: net: add a virtio_net deadlock selftest

2025-04-16 Thread Bui Quang Minh
On 4/16/25 14:46, Jason Wang wrote: On Wed, Apr 16, 2025 at 2:54 PM Bui Quang Minh wrote: On 4/16/25 11:27, Jakub Kicinski wrote: On Tue, 15 Apr 2025 14:43:41 +0700 Bui Quang Minh wrote: +def setup_xsk(cfg, xdp_queue_id = 0) -> bkg: +# Probe for support +xdp = cmd(f'{cfg.net_lib_dir /

Re: [PATCH v3 4/9] vhost: modify vhost_log_write() for broader users

2025-04-16 Thread Dongli Zhang
Hi Jason, Would you mind helping confirm if it resolves your concern in v2? Thank you very much! Dongli Zhang On 4/2/25 11:29 PM, Dongli Zhang wrote: > Currently, the only user of vhost_log_write() is vhost-net. The 'len' > argument prevents logging of pages that are not tainted by the RX path.

[PATCH v5] remoteproc: imx_dsp_rproc: Add support for DSP-specific features

2025-04-16 Thread Iuliana Prodan (OSS)
From: Iuliana Prodan Some DSP firmware requires a FW_READY signal before proceeding, while others do not. Therefore, add support to handle i.MX DSP-specific features. Implement handle_rsc callback to handle resource table parsing and to process DSP-specific resource, to determine if waiting is n

Re: [PATCH v3 3/3] selftests: net: add a virtio_net deadlock selftest

2025-04-16 Thread Jason Wang
On Wed, Apr 16, 2025 at 2:54 PM Bui Quang Minh wrote: > > On 4/16/25 11:27, Jakub Kicinski wrote: > > On Tue, 15 Apr 2025 14:43:41 +0700 Bui Quang Minh wrote: > >> +def setup_xsk(cfg, xdp_queue_id = 0) -> bkg: > >> +# Probe for support > >> +xdp = cmd(f'{cfg.net_lib_dir / "xdp_helper"} - -

Re: [PATCH v3 2/2] x86/sgx: Implement EUPDATESVN and opportunistically call it during first EPC page alloc

2025-04-16 Thread Huang, Kai
On Tue, 2025-04-15 at 14:51 +0300, Elena Reshetova wrote: > SGX architecture introduced a new instruction called EUPDATESVN "a new ENCLS leaf function EUPDATESVN"? > to Ice Lake. It allows updating security SVN version, given that EPC > is completely empty. The latter is required for security rea

Re: [PATCH 1/2] mm: move mmap/vma locking logic into specific files

2025-04-16 Thread Lorenzo Stoakes
On Tue, Apr 15, 2025 at 10:58:41AM -0700, Paul E. McKenney wrote: > On Tue, Apr 15, 2025 at 09:06:46AM -0700, Suren Baghdasaryan wrote: > > On Tue, Apr 15, 2025 at 6:11 AM Lorenzo Stoakes > > wrote: > > > > > > Currently the VMA and mmap locking logic is entangled in two of the most > > > overwrou

Re: [PATCH v4 00/38] Mediated vPMU 4.0 for x86

2025-04-16 Thread Mi, Dapeng
Kindly ping... Any comments on this patch series? Thanks. On 3/25/2025 1:30 AM, Mingwei Zhang wrote: > With joint effort from the upstream KVM community, we come up with the > 4th version of mediated vPMU for x86. We have made the following changes > on top of the previous RFC v3. > > v3 -> v4 >