[PATCH 1/1] selftests/mincore: Allow read-ahead pages to reach the end of the file

2025-03-11 Thread Qiuxu Zhuo
When running the mincore_selftest on a system with an XFS file system, it failed the "check_file_mmap" test case due to the read-ahead pages reaching the end of the file. The failure log is as below: RUN global.check_file_mmap ... mincore_selftest.c:264:check_file_mmap:Expected i (1

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 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

[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 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

[PATCH] selftests/bpf: Fix sockopt selftest failure on powerpc

2025-03-11 Thread Saket Kumar Bhaskar
The SO_RCVLOWAT option is defined as 18 in the selftest header, which matches the generic definition. However, on powerpc, SO_RCVLOWAT is defined as 16. This discrepancy causes sol_socket_sockopt() to fail with the default switch case on powerpc. This commit fixes by defining SO_RCVLOWAT as 16 for

Re: [PATCH] arm64: dts: qcom: qcm6490-fairphone-fp5: Add touchscreen node

2025-03-11 Thread Konrad Dybcio
On 3/11/25 9:23 AM, Luca Weiss wrote: > Add a node for the GT9897 touchscreen found on this smartphone connected > via SPI. > > Signed-off-by: Luca Weiss > --- > The series adding support for this chip (incl. dt-bindings) has been > applied on 2025-03-10 to the input tree: > https://web.git.kerne

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

2025-03-11 Thread Simon Horman
On Thu, Mar 06, 2025 at 02:39:23AM +, Hangbin Liu wrote: > The correct mac address for NS target 2001:db8::254 is 33:33:ff:00:02:54, > not 33:33:00:00:02:54. The same with client maddress. > > Fixes: 86fb6173d11e ("selftests: bonding: add ns multicast group testing") > Acked-by: Jay Vosburgh

[PATCH net-next v22 01/23] net: introduce OpenVPN Data Channel Offload (ovpn)

2025-03-11 Thread Antonio Quartulli
OpenVPN is a userspace software existing since around 2005 that allows users to create secure tunnels. So far OpenVPN has implemented all operations in userspace, which implies several back and forth between kernel and user land in order to process packets (encapsulate/decapsulate, encrypt/decrypt

[PATCH net-next v22 00/23] Introducing OpenVPN Data Channel Offload

2025-03-11 Thread Antonio Quartulli
Notable changes since v21: * accessed crypto_slot->primary_idx via READ/WRITE_ONCE * made ovpn_aead_init() static * converted link tx/rx packet counters from u32 to to uint * ensured all u32 NL attributes are read by nla_get_u32() * ensured all u32 NL attrivutes are written by nla_put_u32() * reset

[PATCH net-next v22 06/23] ovpn: introduce the ovpn_socket object

2025-03-11 Thread Antonio Quartulli
This specific structure is used in the ovpn kernel module to wrap and carry around a standard kernel socket. ovpn takes ownership of passed sockets and therefore an ovpn specific objects is attached to them for status tracking purposes. Initially only UDP support is introduced. TCP will come in a

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

2025-03-11 Thread Antonio Quartulli
Packets received over the socket are forwarded to the user device. Implementation is UDP only. TCP will be added by a later patch. Note: no decryption/decapsulation exists yet, packets are forwarded as they arrive without much processing. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/i

[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

[PATCH net-next v22 03/23] ovpn: add basic interface creation/destruction/management routines

2025-03-11 Thread Antonio Quartulli
Add basic infrastructure for handling ovpn interfaces. Tested-by: Donald Hunter Signed-off-by: Antonio Quartulli --- Documentation/netlink/specs/rt_link.yaml | 16 + drivers/net/ovpn/Makefile| 1 + drivers/net/ovpn/io.c| 22 ++ drivers/net/ovpn/io

[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 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 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 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 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 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: [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

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

2025-03-11 Thread Adrian Hunter
On 10/03/25 16:07, Karel Balej wrote: > 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 So that SoC is from 2015? Is there anythin

[PATCH] arm64: dts: qcom: qcm6490-fairphone-fp5: Add touchscreen node

2025-03-11 Thread Luca Weiss
Add a node for the GT9897 touchscreen found on this smartphone connected via SPI. Signed-off-by: Luca Weiss --- The series adding support for this chip (incl. dt-bindings) has been applied on 2025-03-10 to the input tree: https://web.git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git/log/?h=n

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

2025-03-11 Thread Cyan Yang
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/vm: anon_cow: > > TH

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

2025-03-11 Thread Daniel Baluta
This patch series adds support to control the Run/Stall DSP bits found on i.MX8MP via the reset controller API instead of using the syscon API. DSP found 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

[PATCH v5 1/8] dt-bindings: reset: audiomix: Add reset ids for EARC and DSP

2025-03-11 Thread Daniel Baluta
Add reset ids used for EARC and DSP on i.MX8MP platform. Acked-by: Rob Herring (Arm) Reviewed-by: Frank Li Signed-off-by: Daniel Baluta --- include/dt-bindings/reset/imx8mp-reset-audiomix.h | 13 + 1 file changed, 13 insertions(+) create mode 100644 include/dt-bindings/reset/imx8m

[PATCH v5 3/8] arm64: dts: imx8mp: Use resets property

2025-03-11 Thread Daniel Baluta
Add resets property to dsp node in order to be able to control the dsp run/stall bit from audio block control. Reviewed-by: Peng Fan Reviewed-by: Frank Li Signed-off-by: Daniel Baluta --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm6

[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

[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

Re: [PATCH net-next 4/4] tools/testing/selftests/cgroup: add test for SO_PEERCGROUPID

2025-03-11 Thread Kuniyuki Iwashima
From: Alexander Mikhalitsyn Date: Sun, 9 Mar 2025 14:28:15 +0100 > +static void client(FIXTURE_DATA(so_peercgroupid) *self, > +const FIXTURE_VARIANT(so_peercgroupid) *variant) > +{ > + int cfd, err; > + socklen_t len; > + uint64_t peer_cgroup_id = 0, test_cgroup1_id =

[PATCH v5 7/8] reset: imx8mp-audiomix: Add support for DSP run/stall

2025-03-11 Thread Daniel Baluta
We can Run/Stall the DSP via audio block control bits found in audiomix. Implement this functionality using the reset controller and use assert for Stall and deassert for Run. Reviewed-by: Peng Fan Reviewed-by: Frank Li Signed-off-by: Daniel Baluta --- drivers/reset/reset-imx8mp-audiomix.c | 8

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

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 1/2] bonding: fix incorrect MAC address setting to receive NS messages

2025-03-11 Thread Simon Horman
On Thu, Mar 06, 2025 at 02:39:22AM +, Hangbin Liu wrote: > When validation on the backup slave is enabled, we need to validate the > Neighbor Solicitation (NS) messages received on the backup slave. To > receive these messages, the correct destination MAC address must be added > to the slave. H

[PATCH v5 5/8] reset: imx8mp-audiomix: Prepare the code for more reset bits

2025-03-11 Thread Daniel Baluta
Current code supports EARC PHY Software Reset and EARC Software Reset but it is not easily extensible to more reset bits. So, refactor the code in order to easily allow more reset bits in the future. Reviewed-by: Peng Fan Reviewed-by: Frank Li Signed-off-by: Daniel Baluta --- drivers/reset/re

[PATCH v5 4/8] reset: imx8mp-audiomix: Add prefix for internal macro

2025-03-11 Thread Daniel Baluta
This adds IMX8MP_AUDIOMIX_ prefix to internal macros in order to show that specific macros are related to audiomix. Reviewed-by: Philipp Zabel Reviewed-by: Frank Li Reviewed-by: Peng Fan Signed-off-by: Daniel Baluta --- drivers/reset/reset-imx8mp-audiomix.c | 14 +++--- 1 file changed

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

2025-03-11 Thread Daniel Baluta
On Mon, Mar 10, 2025 at 5:43 PM Mathieu Poirier wrote: > > 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

[PATCH v5 6/8] reset: imx8mp-audiomix: Introduce active_low configuration option

2025-03-11 Thread Daniel Baluta
For EARC and EARC PHY the reset happens when clearing the reset bits. Refactor assert/deassert function in order to take into account the active_low configuration option. Reviewed-by: Philipp Zabel Reviewed-by: Peng Fan Reviewed-by: Frank Li Signed-off-by: Daniel Baluta --- drivers/reset/rese

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

2025-03-11 Thread Karel Balej
Adrian Hunter, 2025-03-11T09:34:28+02:00: > On 10/03/25 16:07, Karel Balej wrote: >> 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 S

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

2025-03-11 Thread Alexei Starovoitov
On Tue, Mar 11, 2025 at 12:07 AM Song Liu wrote: > > + lskel = kfunc_call_test_lskel__open_and_load(); > > + if (!ASSERT_ERR_PTR(lskel, "lskel")) > > + goto close_prog; > > This goto is not necessary. But I don't think we need v8 just for this. I left goto as-is while ap

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

2025-03-11 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Alexei Starovoitov : On Mon, 10 Mar 2025 15:17:10 -0700 you wrote: > Hello, > > While trying to implement an eBPF gatekeeper program, we ran into an > issue whereas the LSM hooks are missing some relevant data. > > Certain subcomman

[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 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 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 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 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 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 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] 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

[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 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 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 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 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 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 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 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 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 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

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 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

[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

[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

[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

[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.

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

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 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

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] 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] 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

[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

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

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?

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

[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: [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; >> + >> +

[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_

[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 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 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 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

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 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

[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] 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

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: [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] 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: [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

[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] 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

  1   2   >