[PATCH] selftests/pidfd: align stack to fix SP alignment exception

2025-03-11 Thread Shuai Xue
The pidfd_test fails on the ARM64 platform with the following error: Bail out! pidfd_poll check for premature notification on child thread exec test: Failed When exception-trace is enabled, the kernel logs the details: #echo 1 > /proc/sys/debug/exception-trace #dmesg | tail -n 20

Re: [PATCH v6 1/2] security: Propagate caller information in bpf hooks

2025-03-11 Thread Paul Moore
On Mar 7, 2025 Blaise Boscaccy wrote: > > Certain bpf syscall subcommands are available for usage from both > userspace and the kernel. LSM modules or eBPF gatekeeper programs may > need to take a different course of action depending on whether or not > a BPF syscall originated from the kernel o

Re: [PATCH v2] selftests/mm/cow: Fix the incorrect error handling

2025-03-11 Thread Dev Jain
On 12/03/25 10:08 am, Cyan Yang wrote: There is an error handling did not check the correct return value. This patch will fix it. Fixes: f4b5fd6946e244cdedc3bbb9a1f24c8133b2077a ("selftests/vm: anon_cow: THP tests") Signed-off-by: Cyan Yang Reviewed-by: Dev Jain

[PATCH v2] selftests/mm/cow: Fix the incorrect error handling

2025-03-11 Thread Cyan Yang
There is an error handling did not check the correct return value. This patch will fix it. Fixes: f4b5fd6946e244cdedc3bbb9a1f24c8133b2077a ("selftests/vm: anon_cow: THP tests") Signed-off-by: Cyan Yang --- tools/testing/selftests/mm/cow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

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

2025-03-11 Thread Borislav Petkov
On Mon, Mar 10, 2025 at 08:12:46AM -0500, Tom Lendacky wrote: > >> + if (sev_status & MSR_AMD64_SEV_SNP_ENABLED && > > > > cpu_feature_enabled(X86_FEATURE_SEV_SNP) > > I think this should really be cc_platform_has(CC_ATTR_GUEST_SEV_SNP). Ah, we wanna check the guest, sure. Thx. -- Regards/Gr

Re: [PATCH 0/2] selftests: livepatch: test if ftrace can trace a livepatched function

2025-03-11 Thread Marcos Paulo de Souza
On Thu, 2025-03-06 at 18:51 -0300, Filipe Xavier wrote: > This patchset add ftrace helpers functions and > add a new test makes sure that ftrace can trace > a function that was introduced by a livepatch. > > Signed-off-by: Filipe Xavier > --- > Filipe Xavier (2): >   selftests: livepatch: add

Re: [PATCH v2 0/2] Fix xdp_adjust_frags_tail_grow selftest on powerpc

2025-03-11 Thread Saket Kumar Bhaskar
On Fri, Mar 07, 2025 at 08:54:00PM +0530, Venkat Rao Bagalkote wrote: > > On 05/03/25 10:43 pm, Saket Kumar Bhaskar wrote: > > For platforms on powerpc architecture with a default page size greater > > than 4096, there was an inconsistency in fragment size calculation. > > This caused the BPF self

Re: [PATCH v6 bpf-next 2/2] selftests/bpf: Add a kernel flag test for LSM bpf hook

2025-03-11 Thread Song Liu
On Fri, Mar 7, 2025 at 5:33 PM Blaise Boscaccy wrote: > > This test exercises the kernel flag added to security_bpf by > effectively blocking light-skeletons from loading while allowing > normal skeletons to function as-is. Since this should work with any > arbitrary BPF program, an existing progr

Re: [PATCH] kunit: tool: Fix bug in parsing test plan

2025-03-11 Thread Rae Moar
On Thu, Mar 6, 2025 at 4:00 AM David Gow wrote: > > On Thu, 6 Mar 2025 at 08:29, Rae Moar wrote: > > > > A bug was identified where the KTAP below caused an infinite loop: > > > > TAP version 13 > > ok 4 test_case > > 1..4 > > > > The infinite loop was caused by the parser not parsing a test p

[PATCH v2 2/3] module: Add a separate function to mark sections as read-only after init

2025-03-11 Thread Petr Pavlu
Move the logic to mark special sections as read-only after module initialization into a separate function, along other related code in strict_rwx.c. Use a table with names of such sections to make it easier to add more. Signed-off-by: Petr Pavlu --- kernel/module/internal.h | 2 ++ kernel/mod

Re: [PATCH v3 2/7] Input: synaptics-rmi4 - handle duplicate/unknown PDT entries

2025-03-11 Thread Dmitry Torokhov
Hi David, On Sat, Mar 08, 2025 at 03:08:38PM +0100, David Heidelberg via B4 Relay wrote: > From: Caleb Connolly > > Some third party rmi4-compatible ICs don't expose their PDT entries > very well. Add a few checks to skip duplicate entries as well as entries > for unsupported functions. > > Thi

Re: [PATCH] virtio_ring: Fix data race when accessing the event_triggered field of vring_virtqueue

2025-03-11 Thread Jason Wang
On Tue, Mar 11, 2025 at 9:18 PM Zhongqiu Han wrote: > > Syzkaller reports a data-race when accessing the event_triggered field of > vring_virtqueue in virtqueue_disable_cb / virtqueue_enable_cb_delayed. > Here is the simplified stack when the issue occurred: > > ===

Re: [PATCHv5 net 1/3] bonding: fix calling sleeping function in spin lock and some race conditions

2025-03-11 Thread Hangbin Liu
On Tue, Mar 11, 2025 at 09:08:49PM +, Cosmin Ratiu wrote: > On Fri, 2025-03-07 at 09:03 -0800, Jakub Kicinski wrote: > > On Fri, 7 Mar 2025 09:42:49 +0200 Nikolay Aleksandrov wrote: > > > TBH, keeping buggy code with a comment doesn't sound good to me. > > > I'd rather remove this > > > support

Re: [PATCH v3 0/7] Subject: [PATCH v3 0/7] Input: synaptics-rmi4: add quirks for third party touchscreen controllers

2025-03-11 Thread Caleb Connolly
Hi David, Please at least give me a heads up if you're going to resend a patch series of mine. I understand it's an old series but I don't think that courtesy is too much to ask. On 3/8/25 14:08, David Heidelberg via B4 Relay wrote: With the growing popularity of running upstream Linux on mo

[PATCH v3 5/5] selftests/nolibc: use O_RDONLY flag instead of 0

2025-03-11 Thread Louis Taylor
This doesn't matter much, but is what the standard says. Signed-off-by: Louis Taylor --- tools/testing/selftests/nolibc/nolibc-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test

Re: [PATCH RESEND 4/4] media: i2c: imx214: Add support for 23.88MHz clock

2025-03-11 Thread Ricardo Ribalda Delgado
On Sat, Mar 8, 2025 at 10:48 PM André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > Qualcomm MSM8916 devices only provide an external clock of 23.88MHz. > Make the sensor usable by those devices by adding support for this > frequency. > Acked-by: Ricardo Ribalda and after this patch

Re: [PATCH RESEND 3/4] media: i2c: imx214: Read clock frequency from device tree

2025-03-11 Thread Ricardo Ribalda Delgado
On Sat, Mar 8, 2025 at 10:48 PM André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > Replace the hard coded external clock frequency by the one read from > device tree. > > Signed-off-by: André Apitzsch > --- > drivers/media/i2c/imx214.c | 99 > --

Re: [PATCH v10 2/8] mm/huge_memory: add two new (not yet used) functions for folio_split()

2025-03-11 Thread Zi Yan
On 10 Mar 2025, at 13:00, Matthew Wilcox wrote: > On Mon, Mar 10, 2025 at 12:42:06PM -0400, Zi Yan wrote: >>> Because of the “Careful” comment. But new_folio->* should be fine, >>> since it is the same as new_head. So I probably can replace all >>> new_head with new_folio except those VM_BUG_ON_PA

Re: [PATCH v4 8/8] imx_dsp_rproc: Use reset controller API to control the DSP

2025-03-11 Thread Mathieu Poirier
Good day, On Wed, Mar 05, 2025 at 12:00:36PM +0200, Daniel Baluta wrote: > DSP on i.MX8MP doesn't have a direct reset line so according to hardware > design team in order to handle assert/deassert/reset functionality we > need to use a combination of control bits from two modules. Audio block > co

Re: [PATCHv5 net 1/3] bonding: fix calling sleeping function in spin lock and some race conditions

2025-03-11 Thread Cosmin Ratiu
On Fri, 2025-03-07 at 09:03 -0800, Jakub Kicinski wrote: > On Fri, 7 Mar 2025 09:42:49 +0200 Nikolay Aleksandrov wrote: > > TBH, keeping buggy code with a comment doesn't sound good to me. > > I'd rather remove this > > support than tell people "good luck, it might crash". It's better > > to be saf

Re: [PATCH RESEND 2/4] media: i2c: imx214: Prepare for variable clock frequency

2025-03-11 Thread Ricardo Ribalda Delgado
On Sat, Mar 8, 2025 at 10:48 PM André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > Move clock frequency related parameters out of the constant register > sequences, such that the hard coded external clock frequency can be > replaced by a variable in the next commit. > Acked-by: Ricar

Re: [PATCH] rust: enable `clippy::ptr_as_ptr` lint

2025-03-11 Thread Miguel Ojeda
On Tue, Mar 11, 2025 at 9:44 PM Tamir Duberstein wrote: > > By the way, it would be great if the email also included the rustc version > used. Yeah, I think I may have mentioned it at some point... For the moment, one can look for it manually in the linked config (i.e. `CONFIG_RUSTC_VERSION_TEXT

Re: [PATCH RESEND 1/4] media: i2c: imx214: Calculate link bit rate from clock frequency

2025-03-11 Thread Ricardo Ribalda Delgado
On Sat, Mar 8, 2025 at 10:48 PM André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > Replace the magic link bit rate number (4800) by its calculation based > on the used parameters and the provided external clock frequency. > > The link bit rate is output bitrate multiplied by the numb

[PATCH v5 8/8] imx_dsp_rproc: Use reset controller API to control the DSP

2025-03-11 Thread Daniel Baluta
DSP on i.MX8MP doesn't have a direct reset line so according to hardware design team in order to handle assert/deassert/reset functionality we need to use a combination of control bits from two modules. Audio block control module for Run/Stall control of the DSP and DAP module in order to do softwa

Re: [RFC PATCH 0/5] KVM: guest_memfd: support for uffd missing

2025-03-11 Thread Nikita Kalyazin
On 05/03/2025 20:29, Peter Xu wrote: On Wed, Mar 05, 2025 at 11:35:27AM -0800, James Houghton wrote: I think it might be useful to implement an fs-generic MINOR mode. The fault handler is already easy enough to do generically (though it would become more difficult to determine if the "MINOR"

[PATCH net-next v22 14/23] ovpn: implement multi-peer support

2025-03-11 Thread Antonio Quartulli
With this change an ovpn instance will be able to stay connected to multiple remote endpoints. This functionality is strictly required when running ovpn on an OpenVPN server. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/main.c | 64 +-- drivers/net/ovpn/ovpnpriv.h | 1

Re: [PATCH 0/9] RCU torture-test changes for v6.16

2025-03-11 Thread Joel Fernandes
On Mon, Mar 10, 2025 at 11:38:02AM -0700, Paul E. McKenney wrote: > Hello! > > The following series improves testing of SRCU-fast and SRCU up/down: > > 1.Make srcu_lockdep.sh check kernel Kconfig. > > 2.Make srcu_lockdep.sh check reader-conflict handling. > > 3.Split out beginning a

Re: [PATCH v3 08/10] selftests/mm: Skip gup_longerm tests on weird filesystems

2025-03-11 Thread David Hildenbrand
On 11.03.25 14:00, Brendan Jackman wrote: On Thu, 6 Mar 2025 at 15:40, David Hildenbrand wrote: Yes, just skip 9pfs early, and mention in the commit message that 9pfs has a history of being probematic with "use-after-unlink", maybe mentioning the discussion I linked above. Maybe something like

Re: [PATCH] selftests/mm/cow: Fix the incorrect error handling

2025-03-11 Thread David Hildenbrand
On 11.03.25 11:38, Cyan Yang wrote: On Tue, Mar 11, 2025 at 10:19:32AM +0100, David Hildenbrand wrote: On 11.03.25 03:37, Cyan Yang wrote: There are two error handlings did not check the correct return value. This patch will fix them. Fixes: f4b5fd6946e244cdedc3bbb9a1f24c8133b2077a ("selftests

Re: [PATCH] selftests/bpf: Move test_lwt_ip_encap to test_progs

2025-03-11 Thread Martin KaFai Lau
On 3/4/25 1:24 AM, Bastien Curutchet (eBPF Foundation) wrote: +int remove_routes_to_gredev(const char *ns1, const char *ns2, const char *vrf) +{ + SYS(fail, "ip -n %s route del %s dev veth5 %s", ns1, IP4_ADDR_GRE, vrf); + SYS(fail, "ip -n %s route del %s dev veth7 %s", ns2, IP4_ADDR_G

[PATCH] rseq/selftests: ensure the rseq abi TLS is actually 1024 bytes

2025-03-11 Thread Michael Jeanson
Adding the aligned(1024) attribute to the definition of __rseq_abi did not increase its size to 1024, for this attribute to impact the size of __rseq_abi it would need to be added to the declaration of 'struct rseq_abi'. We only want to increase the size of the TLS allocation to ensure registration

Re: [PATCH v3 0/7] Subject: [PATCH v3 0/7] Input: synaptics-rmi4: add quirks for third party touchscreen controllers

2025-03-11 Thread David Heidelberg
Hello Caleb, I'm very sorry about that. Next time I include your patches in the series I'll definitely send you heads up. David On 10/03/2025 11:04, Caleb Connolly wrote: Hi David, Please at least give me a heads up if you're going to resend a patch series of mine. I understand it's an old

Re: [PATCH -v3] x86/sgx: Warn explicitly if X86_FEATURE_SGX_LC is not enabled

2025-03-11 Thread Vladis Dronov
Hi, Jarkko, Kai, Thanks a ton for your suggestions and edits! Hi, Ingo, Thank you many tons for your help and attention to this small patch and a TIP submission! I wasn't expecting such an... immediate response to my small suggestion, honestly. Best regards, Vladis

Re: [PATCH v2 net] ipvs: prevent integer overflow in do_ip_vs_get_ctl()

2025-03-11 Thread Julian Anastasov
Hello, On Mon, 10 Mar 2025, Dan Carpenter wrote: > The get->num_services variable is an unsigned int which is controlled by > the user. The struct_size() function ensures that the size calculation > does not overflow an unsigned long, however, we are saving the result to > an int so th

Re: [PATCH v3 01/10] selftests/mm: Report errno when things fail in gup_longterm

2025-03-11 Thread David Hildenbrand
/* * TODO: if the kernel ever supports long-term R/W pinning on @@ -202,7 +204,8 @@ static void do_test(int fd, size_t size, enum test_type type, bool shared) /* Skip on errors, as we might just lack kernel support. */ ret = io_uring_queue_i

Re: [PATCH v10 2/8] mm/huge_memory: add two new (not yet used) functions for folio_split()

2025-03-11 Thread Zi Yan
On 10 Mar 2025, at 12:39, Zi Yan wrote: > On 10 Mar 2025, at 12:30, Matthew Wilcox wrote: > >> On Fri, Mar 07, 2025 at 12:39:55PM -0500, Zi Yan wrote: >>> + for (index = new_nr_pages; index < nr_pages; index += new_nr_pages) { >>> + struct page *head = &folio->page; >>> + str

Re: [PATCH v8 4/4] scanf: break kunit into test cases

2025-03-11 Thread Tamir Duberstein
On Thu, Mar 6, 2025 at 4:38 AM Petr Mladek wrote: > > On Wed 2025-03-05 10:57:47, Tamir Duberstein wrote: > > On Wed, Mar 5, 2025 at 10:55 AM Andy Shevchenko > > wrote: > > > > > > On Wed, Mar 05, 2025 at 10:25:51AM -0500, Tamir Duberstein wrote: > > > > On Wed, Mar 5, 2025 at 10:01 AM Petr Mlade

Re: [PATCH v2 3/3] module: Make .static_call_sites read-only after init

2025-03-11 Thread Christophe Leroy
Le 06/03/2025 à 14:13, Petr Pavlu a écrit : Section .static_call_sites holds data structures that need to be sorted and processed only at module load time. This initial processing happens in static_call_add_module(), which is invoked as a callback to the MODULE_STATE_COMING notification from p

[PATCH 9/9] rcutorture: Check for ->up_read() without matching ->down_read()

2025-03-11 Thread Paul E. McKenney
This commit creates counters in the rcu_torture_one_read_state_updown structure that check for a call to ->up_read() that lacks a matching call to ->down_read(). While in the area, add end-of-run cleanup code that prevents calls to rcu_torture_updown_hrt() from happening after the test has moved o

[RFC] check_imperative: pull requests should use imperative voice

2025-03-11 Thread Sasha Levin
Add a new script that converts pull request descriptions to imperative voice, directly addressing Linus Torvalds' request regarding preferred writing style for pull requests[1]. In that announcement, Linus specifically asked maintainers to use active voice and preferably imperative style in pull re

Re: [PATCH v2 1/5] tools/nolibc: add support for openat(2)

2025-03-11 Thread Louis Taylor
On Thu Mar 6, 2025 at 5:10 PM GMT, Thomas Weißschuh wrote: > On 2025-03-04 07:58:15+, Louis Taylor wrote: > > openat is useful to avoid needing to construct relative paths, so expose > > a wrapper for using it directly. > > > > Signed-off-by: Louis Taylor > > Looks good. I have some tiny nitp

[PATCH 8/9] rcutorture: Complain if an ->up_read() is delayed more than 10 seconds

2025-03-11 Thread Paul E. McKenney
The down/up SRCU reader testing uses an hrtimer handler to exit the SRCU read-side critical section. This might be delayed, and if delayed for too long, it can prevent the rcutorture run from completing. This commit therefore complains if the hrtimer handler is delayed for more than ten seconds.

[PATCH] mm/huge_memory: drop beyond-EOF folios with the right number of refs.

2025-03-11 Thread Zi Yan
When an after-split folio is large and needs to be dropped due to EOF, folio_put_refs(folio, folio_nr_pages(folio)) should be used to drop all page cache refs. Otherwise, the folio will not be freed, causing memory leak. This leak would happen on a filesystem with blocksize > page_size and a trunc

Re: [PATCH v2 0/4] RISC-V KVM PMU fix and selftest improvement

2025-03-11 Thread Anup Patel
On Tue, Mar 4, 2025 at 4:23 AM Atish Patra wrote: > > This series adds a fix for KVM PMU code and improves the pmu selftest > by allowing generating precise number of interrupts. It also provided > another additional option to the overflow test that allows user to > generate custom number of LCOFI

[PATCH 1/9] rcutorture: Make srcu_lockdep.sh check kernel Kconfig

2025-03-11 Thread Paul E. McKenney
The srcu_lockdep.sh currently blindly trusts the rcutorture SRCU-P scenario to build its kernel with lockdep enabled. Of course, this dependency might not be obvious to someone rebalancing SRCU scenarios. This commit therefore adds code to srcu_lockdep.sh that verifies that the .config file has lo

Re: [PATCH bpf-next v2 1/3] bpf, sockmap: avoid using sk_socket after free

2025-03-11 Thread Jiayuan Chen
March 10, 2025 at 9:08 PM, "Michal Luczaj" wrote: > > On 3/10/25 12:36, Jiayuan Chen wrote: > > > > > March 7, 2025 at 5:45 PM, "Michal Luczaj" wrote: > > > > ... > > > > > > > > BTW, lockdep (CONFIG_LOCKDEP=y) complains about calling AF_UNIX's > > > > > > read_skb() under RCU read lo

[PATCH 2/9] rcutorture: Make srcu_lockdep.sh check reader-conflict handling

2025-03-11 Thread Paul E. McKenney
Mixing different flavors of RCU readers is forbidden, for example, you should not use srcu_read_lock() and srcu_read_lock_nmisafe() on the same srcu_struct structure. There are checks for this, but these checks are not tested on a regular basis. This commit therefore adds such tests to srcu_lockd

[PATCH v2 1/3] module: Constify parameters of module_enforce_rwx_sections()

2025-03-11 Thread Petr Pavlu
Minor cleanup, this is a non-functional change. Signed-off-by: Petr Pavlu --- kernel/module/internal.h | 5 +++-- kernel/module/strict_rwx.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/kernel/module/internal.h b/kernel/module/internal.h index d09b46ef032f..18f32e7

Re: [PATCH v3 1/7] dt-bindings: input: syna,rmi4: document syna,pdt-fallback-desc

2025-03-11 Thread Krzysztof Kozlowski
On Sat, Mar 08, 2025 at 03:08:37PM +0100, David Heidelberg wrote: > From: Caleb Connolly > > This new property allows devices to specify some register values which > are missing on units with third party replacement displays. These > displays use unofficial touch ICs which only implement a subset

Re: [PATCH] selftests/mm/cow: Fix the incorrect error handling

2025-03-11 Thread David Hildenbrand
On 11.03.25 03:37, Cyan Yang wrote: There are two error handlings did not check the correct return value. This patch will fix them. Fixes: f4b5fd6946e244cdedc3bbb9a1f24c8133b2077a ("selftests/vm: anon_cow: THP tests") Signed-off-by: Cyan Yang --- tools/testing/selftests/mm/cow.c | 4 ++-- 1

Re: [PATCH v10 2/8] mm/huge_memory: add two new (not yet used) functions for folio_split()

2025-03-11 Thread Matthew Wilcox
On Mon, Mar 10, 2025 at 12:42:06PM -0400, Zi Yan wrote: > > Because of the “Careful” comment. But new_folio->* should be fine, > > since it is the same as new_head. So I probably can replace all > > new_head with new_folio except those VM_BUG_ON_PAGE checks? Why not also the VM_BUG_ON_PAGE check?

[RFC PATCH] mmc: sdhci-pxav3: set NEED_RSP_BUSY capability

2025-03-11 Thread Karel Balej
Set the MMC_CAP_NEED_RSP_BUSY capability for the sdhci-pxav3 host to prevent conversion of R1B responses to R1. Without this, the eMMC card in the samsung,coreprimevelte smartphone using the Marvell PXA1908 SoC with this mmc host doesn't probe with the ETIMEDOUT error originating in __mmc_poll_for_

Re: [PATCH v6 bpf-next 2/2] selftests/bpf: Add a kernel flag test for LSM bpf hook

2025-03-11 Thread Blaise Boscaccy
Song Liu writes: > On Mon, Mar 10, 2025 at 10:43 AM Blaise Boscaccy > wrote: >> >> Song Liu writes: >> >> > On Fri, Mar 7, 2025 at 5:33 PM Blaise Boscaccy >> > wrote: >> >> >> >> This test exercises the kernel flag added to security_bpf by >> >> effectively blocking light-skeletons from loadin

Re: [PATCH v6 bpf-next 2/2] selftests/bpf: Add a kernel flag test for LSM bpf hook

2025-03-11 Thread Song Liu
On Mon, Mar 10, 2025 at 11:11 AM Blaise Boscaccy wrote: [...] > > > > We are blindly blocking all security_bpf() with kernel=true here, so > > any lskel load in parallel with this test may fail. On the other hand, > > existing tests only block some operations under certain conditions. > > For exam

Re: [PATCH] x86/sgx: Warn explicitly if X86_FEATURE_SGX_LC is not enabled

2025-03-11 Thread Jarkko Sakkinen
On Sun, Mar 09, 2025 at 05:58:06PM +0100, Vladis Dronov wrote: > A kernel requires X86_FEATURE_SGX_LC to be able to create SGX enclaves. > There is quite a number of hardware which has X86_FEATURE_SGX but not > X86_FEATURE_SGX_LC. A kernel running on such a hardware does not create > /dev/sgx* devi

Re: [PATCH] selftests/bpf: Convert comma to semicolon

2025-03-11 Thread Anton Protopopov
On 25/03/10 11:20AM, Chen Ni wrote: > Replace comma between expressions with semicolons. > > Using a ',' in place of a ';' can have unintended side effects. > Although that is not the case here, it is seems best to use ';' > unless ',' is intended. This is a typo, of course. Thanks! > Found by i

Re: [PATCH v10 2/8] mm/huge_memory: add two new (not yet used) functions for folio_split()

2025-03-11 Thread Matthew Wilcox
On Fri, Mar 07, 2025 at 12:39:55PM -0500, Zi Yan wrote: > + for (index = new_nr_pages; index < nr_pages; index += new_nr_pages) { > + struct page *head = &folio->page; > + struct page *new_head = head + index; > + > + /* > + * Careful: new_folio

[PATCH v7 bpf-next 0/2] security: Propagate caller information in bpf hooks

2025-03-11 Thread Blaise Boscaccy
Hello, While trying to implement an eBPF gatekeeper program, we ran into an issue whereas the LSM hooks are missing some relevant data. Certain subcommands passed to the bpf() syscall can be invoked from either the kernel or userspace. Additionally, some fields in the bpf_attr struct contain poin

Re: [PATCH v10 2/8] mm/huge_memory: add two new (not yet used) functions for folio_split()

2025-03-11 Thread Zi Yan
On 10 Mar 2025, at 12:30, Matthew Wilcox wrote: > On Fri, Mar 07, 2025 at 12:39:55PM -0500, Zi Yan wrote: >> +for (index = new_nr_pages; index < nr_pages; index += new_nr_pages) { >> +struct page *head = &folio->page; >> +struct page *new_head = head + index; >> + >> +

[PATCH net-next v22 04/23] ovpn: keep carrier always on for MP interfaces

2025-03-11 Thread Antonio Quartulli
An ovpn interface configured in MP mode will keep carrier always on and let the user decide when to bring it administratively up and down. This way a MP node (i.e. a server) will keep its interface always up and running, even when no peer is connected. Signed-off-by: Antonio Quartulli --- drive

[PATCH net-next v22 17/23] ovpn: add support for updating local or remote UDP endpoint

2025-03-11 Thread Antonio Quartulli
In case of UDP links, the local or remote endpoint used to communicate with a given peer may change without a connection restart. Add support for learning the new address in case of change. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/io.c | 8 ++ drivers/net/ovpn/peer.c | 213

Re: [RFC PATCH 0/5] KVM: guest_memfd: support for uffd missing

2025-03-11 Thread Nikita Kalyazin
On 10/03/2025 19:57, Peter Xu wrote: On Mon, Mar 10, 2025 at 06:12:22PM +, Nikita Kalyazin wrote: On 05/03/2025 20:29, Peter Xu wrote: On Wed, Mar 05, 2025 at 11:35:27AM -0800, James Houghton wrote: I think it might be useful to implement an fs-generic MINOR mode. The fault handler is

[PATCH v4 00/12] selftests/mm: Some cleanups from trying to run them

2025-03-11 Thread Brendan Jackman
I never had much luck running mm selftests so I spent a few hours digging into why. Looks like most of the reason is missing SKIP checks, so this series is just adding a bunch of those that I found. I did not do anything like all of them, just the ones I spotted in gup_longterm, gup_test, mmap, us

Re: [PATCH v5 0/8] imx8mp: Add support to Run/Stall DSP via reset API

2025-03-11 Thread Mathieu Poirier
Thanks for the re-spin. I will wait for Shawn and Sascha to review their respective bits before picking up this set. Mathieu On Tue, Mar 11, 2025 at 10:58:03AM +0200, Daniel Baluta wrote: > This patch series adds support to control the Run/Stall DSP bits found on > i.MX8MP via the reset controll

[PATCH v5 2/8] dt-bindings: dsp: fsl,dsp: Add resets property

2025-03-11 Thread Daniel Baluta
Assert and deassert functionality of the DSP found on i.MX8MP is realized by combining control bits from two modules: Audio Block Control and Debug Access Port. Audio block control bits are used to Run/Stall the DSP core while the DAP bits are used for software reset the core. The original plan w

Re: [PATCH v21 18/24] ovpn: add support for peer floating

2025-03-11 Thread Sabrina Dubroca
Note: as I tried to say at the end of my previous reply, feel free to ignore this or save it for later. dst_cache_reset on float and change of remote via netlink peer_modify is the important thing, and I'm not sure the "local address change on float" can or can't happen. 2025-03-10, 13:57:09 +010

[PATCH v4 05/12] selftests/mm: Print some details when uffd-stress gets bad params

2025-03-11 Thread Brendan Jackman
So this can be debugged more easily. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-stress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c index d6b57e5a2e1d7611aa158

[syzbot] Monthly wpan report (Mar 2025)

2025-03-11 Thread syzbot
Hello wpan maintainers/developers, This is a 31-day syzbot report for the wpan subsystem. All related reports/information can be found at: https://syzkaller.appspot.com/upstream/s/wpan During the period, 0 new issues were detected and 0 were fixed. In total, 5 issues are still open and 26 have al

[PATCH net-next v22 23/23] testing/selftests: add test tool and scripts for ovpn module

2025-03-11 Thread Antonio Quartulli
The ovpn-cli tool can be compiled and used as selftest for the ovpn kernel module. [NOTE: it depends on libmedtls for decoding base64-encoded keys] ovpn-cli implements the netlink and RTNL APIs and can thus be integrated in any script for more automated testing. Along with the tool, a bunch of s

[PATCH v4 02/12] selftests/mm: Skip uffd-stress if userfaultfd not available

2025-03-11 Thread Brendan Jackman
It's pretty obvious that the test wouldn't work if you don't have the feature enabled. But, it's still useful to SKIP instead of failing so the reader can immediately tell that this is the reason why. Reviewed-by: Dev Jain Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-stres

[PATCH v4 12/12] selftests/mm/mlock: Print error on failure

2025-03-11 Thread Brendan Jackman
It's not really possible to start diagnosing this without knowing the actual error. Also update the mlock2 helper to behave like libc would by setting errno and returning -1. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/mlock-random-test.c | 4 ++-- tools/testing/selftests/mm/m

[PATCH v4 11/12] selftests/mm: Skip mlock tests if nobody user can't read it

2025-03-11 Thread Brendan Jackman
If running from a directory that can't be read by unprivileged users, executing on-fault-test via the nobody user will fail. The kselftest build does give the file the correct permissions, but after being installed it might be in a directory without global execute permissions. Since the script ca

[PATCH v4 10/12] selftests/mm: Ensure uffd-wp-mremap gets pages of each size

2025-03-11 Thread Brendan Jackman
This test allocates a page of every available size and doesn't have any SKIP logic if the allocation fails. So, ensure it's available and skip the test if we can't do so. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/run_vmtests.sh | 23 ++- 1 file changed, 22

[PATCH v4 09/12] selftests/mm: Drop unnecessary sudo usage

2025-03-11 Thread Brendan Jackman
This script must be run as root anyway (see all the writing to privileged files in /proc etc). Remove the unnecessary use of sudo to avoid breaking on single-user systems that don't have sudo. This also avoids confusing readers. Reviewed-by: Dev Jain Signed-off-by: Brendan Jackman --- tools/te

[PATCH v4 08/12] selftests/mm: Skip gup_longterm tests on weird filesystems

2025-03-11 Thread Brendan Jackman
Some filesystems don't support ftruncate()ing unlinked files. They return ENOENT. In that case, skip the test. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/gup_longterm.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/gup

[PATCH v4 06/12] selftests/mm: Don't fail uffd-stress if too many CPUs

2025-03-11 Thread Brendan Jackman
This calculation divides a fixed parameter by an environment-dependent parameter i.e. the number of CPUs. The simple way to avoid machine-specific failures here is to just put a cap on the max value of the latter. Suggested-by: Mateusz Guzik Signed-off-by: Brendan Jackman --- tools/testing/sel

[PATCH v4 07/12] selftests/mm: Skip map_populate on weird filesystems

2025-03-11 Thread Brendan Jackman
It seems that 9pfs does not allow truncating unlinked files, Mark Brown has noted that NFS may also behave this way. It doesn't seem quite right to call this a "bug" but it's probably a special enough case that it makes sense for the test to just SKIP if it happens. Signed-off-by: Brendan Jackman

[PATCH v4 04/12] selftests/mm/uffd: Rename nr_cpus -> nr_parallel

2025-03-11 Thread Brendan Jackman
A later commit will bound this variable so it no longer necessarily matches the number of CPUs. Rename it appropriately. Reviewed-by: Dev Jain Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-common.c | 8 tools/testing/selftests/mm/uffd-common.h | 2 +- too

[PATCH v4 03/12] selftests/mm: Skip uffd-wp-mremap if userfaultfd not available

2025-03-11 Thread Brendan Jackman
It's obvious that this should fail in that case, but still, save the reader the effort of figuring out that they've run into this by just SKIPping Reviewed-by: Dev Jain Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-wp-mremap.c | 5 - 1 file changed, 4 insertions(+), 1 d

[PATCH v4 01/12] selftests/mm: Report errno when things fail in gup_longterm

2025-03-11 Thread Brendan Jackman
Just reporting failure doesn't tell you what went wrong. This can fail in different ways so report errno to help the reader get started debugging. Reviewed-by: Dev Jain Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/gup_longterm.c | 37 ++- 1 file chan

[PATCH] virtio_ring: Fix data race when accessing the event_triggered field of vring_virtqueue

2025-03-11 Thread Zhongqiu Han
Syzkaller reports a data-race when accessing the event_triggered field of vring_virtqueue in virtqueue_disable_cb / virtqueue_enable_cb_delayed. Here is the simplified stack when the issue occurred: == BUG: KCSAN: data-race in virtque

Re: [PATCH v3 08/10] selftests/mm: Skip gup_longerm tests on weird filesystems

2025-03-11 Thread Brendan Jackman
On Thu, 6 Mar 2025 at 15:40, David Hildenbrand wrote: > Yes, just skip 9pfs early, and mention in the commit message that 9pfs > has a history of being probematic with "use-after-unlink", maybe > mentioning the discussion I linked above. > > Maybe something like this would work? > > diff --git a/t

[PATCH net-next v22 05/23] ovpn: introduce the ovpn_peer object

2025-03-11 Thread Antonio Quartulli
An ovpn_peer object holds the whole status of a remote peer (regardless whether it is a server or a client). This includes status for crypto, tx/rx buffers, napi, etc. Only support for one peer is introduced (P2P mode). Multi peer support is introduced with a later patch. Along with the ovpn_pee

[PATCH net-next v22 15/23] ovpn: implement peer lookup logic

2025-03-11 Thread Antonio Quartulli
In a multi-peer scenario there are a number of situations when a specific peer needs to be looked up. We may want to lookup a peer by: 1. its ID 2. its VPN destination IP 3. its transport IP/port couple For each of the above, there is a specific routing table referencing all peers for fast look u

Re: [PATCH v3 2/7] Input: synaptics-rmi4 - handle duplicate/unknown PDT entries

2025-03-11 Thread Caleb Connolly
Hi Dmitry, On 3/10/25 19:10, Dmitry Torokhov wrote: Hi David, On Sat, Mar 08, 2025 at 03:08:38PM +0100, David Heidelberg via B4 Relay wrote: From: Caleb Connolly Some third party rmi4-compatible ICs don't expose their PDT entries very well. Add a few checks to skip duplicate entries as well

Re: [PATCH v4 3/3] rcu: Use _full() API to debug synchronize_rcu()

2025-03-11 Thread Uladzislau Rezki
Hello, Joel! > Hi Uladzislau, > > On Thu, Feb 27, 2025 at 02:16:13PM +0100, Uladzislau Rezki (Sony) wrote: > > Switch for using of get_state_synchronize_rcu_full() and > > poll_state_synchronize_rcu_full() pair to debug a normal > > synchronize_rcu() call. > > > > Just using "not" full APIs to i

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

2025-03-11 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (main) by Paolo Abeni : On Thu, 6 Mar 2025 02:39:21 + you wrote: > The mac address on backup slave should be convert from Solicited-Node > Multicast address, not from bonding unicast target address. > > v4: no change, just repost. > v3: also

[PATCH net-next v22 16/23] ovpn: implement keepalive mechanism

2025-03-11 Thread Antonio Quartulli
OpenVPN supports configuring a periodic keepalive packet. message to allow the remote endpoint detect link failures. This change implements the keepalive sending and timer expiring logic. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/io.c | 74 drivers/net/ovpn/i

[PATCH net-next v22 22/23] ovpn: add basic ethtool support

2025-03-11 Thread Antonio Quartulli
Implement support for basic ethtool functionality. Note that ovpn is a virtual device driver, therefore various ethtool APIs are just not meaningful and thus not implemented. Signed-off-by: Antonio Quartulli Reviewed-by: Andrew Lunn --- drivers/net/ovpn/main.c | 15 +++ 1 file chan

[PATCH net-next v22 21/23] ovpn: notify userspace when a peer is deleted

2025-03-11 Thread Antonio Quartulli
Whenever a peer is deleted, send a notification to userspace so that it can react accordingly. This is most important when a peer is deleted due to ping timeout, because it all happens in kernelspace and thus userspace has no direct way to learn about it. Signed-off-by: Antonio Quartulli --- dr

[PATCH net-next v22 20/23] ovpn: kill key and notify userspace in case of IV exhaustion

2025-03-11 Thread Antonio Quartulli
IV wrap-around is cryptographically dangerous for a number of ciphers, therefore kill the key and inform userspace (via netlink) should the IV space go exhausted. Userspace has two ways of deciding when the key has to be renewed before exhausting the IV space: 1) time based approach: after X se

[PATCH net-next v22 02/23] ovpn: add basic netlink support

2025-03-11 Thread Antonio Quartulli
This commit introduces basic netlink support with family registration/unregistration functionalities and stub pre/post-doit. More importantly it introduces the YAML uAPI description along with its auto-generated files: - include/uapi/linux/ovpn.h - drivers/net/ovpn/netlink-gen.c - drivers/net/ovpn

[PATCH net-next v22 18/23] ovpn: implement peer add/get/dump/delete via netlink

2025-03-11 Thread Antonio Quartulli
This change introduces the netlink command needed to add, delete and retrieve/dump known peers. Userspace is expected to use these commands to handle known peer lifecycles. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/netlink.c | 677 - driver

[PATCH net-next v22 19/23] ovpn: implement key add/get/del/swap via netlink

2025-03-11 Thread Antonio Quartulli
This change introduces the netlink commands needed to add, get, delete and swap keys for a specific peer. Userspace is expected to use these commands to create, inspect (non sensitive data only), destroy and rotate session keys for a specific peer. Signed-off-by: Antonio Quartulli --- drivers/n

[PATCH net-next v22 10/23] ovpn: store tunnel and transport statistics

2025-03-11 Thread Antonio Quartulli
Byte/packet counters for in-tunnel and transport streams are now initialized and updated as needed. To be exported via netlink. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/Makefile | 1 + drivers/net/ovpn/io.c | 12 +++- drivers/net/ovpn/peer.c | 2 ++ drivers/net/ovpn

[PATCH net-next v22 12/23] skb: implement skb_send_sock_locked_with_flags()

2025-03-11 Thread Antonio Quartulli
When sending an skb over a socket using skb_send_sock_locked(), it is currently not possible to specify any flag to be set in msghdr->msg_flags. However, we may want to pass flags the user may have specified, like MSG_NOSIGNAL. Extend __skb_send_sock() with a new argument 'flags' and add a new in

[PATCH net-next v22 09/23] ovpn: implement packet processing

2025-03-11 Thread Antonio Quartulli
This change implements encryption/decryption and encapsulation/decapsulation of OpenVPN packets. Support for generic crypto state is added along with a wrapper for the AEAD crypto kernel API. Signed-off-by: Antonio Quartulli --- drivers/net/Kconfig| 4 + drivers/net/ovpn/Makefile

[PATCH net-next v22 11/23] ovpn: implement TCP transport

2025-03-11 Thread Antonio Quartulli
With this change ovpn is allowed to communicate to peers also via TCP. Parsing of incoming messages is implemented through the strparser API. Note that ovpn redefines sk_prot and sk_socket->ops for the TCP socket used to communicate with the peer. For this reason it needs to access inet6_stream_op

[PATCH net-next v22 13/23] ovpn: add support for MSG_NOSIGNAL in tcp_sendmsg

2025-03-11 Thread Antonio Quartulli
Userspace may want to pass the MSG_NOSIGNAL flag to tcp_sendmsg() in order to avoid generating a SIGPIPE. To pass this flag down the TCP stack a new skb sending API accepting a flags argument is introduced. Cc: Eric Dumazet Cc: Paolo Abeni Signed-off-by: Antonio Quartulli --- drivers/net/ovpn

[PATCH net-next v22 07/23] ovpn: implement basic TX path (UDP)

2025-03-11 Thread Antonio Quartulli
Packets sent over the ovpn interface are processed and transmitted to the connected peer, if any. Implementation is UDP only. TCP will be added by a later patch. Note: no crypto/encapsulation exists yet. Packets are just captured and sent. Signed-off-by: Antonio Quartulli --- drivers/net/Kconf

  1   2   >