linux-2.6-microblaze.git
5 weeks agosmb: client: make use of smbdirect_socket.send_io.pending.{count,{dec,zero}_wait_queue}
Stefan Metzmacher [Mon, 11 Aug 2025 13:19:51 +0000 (15:19 +0200)]
smb: client: make use of smbdirect_socket.send_io.pending.{count,{dec,zero}_wait_queue}

This will be used by the server too and will allow to create
common helper functions.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: client: make use of smbdirect_socket.disconnect_work
Stefan Metzmacher [Fri, 8 Aug 2025 17:06:49 +0000 (19:06 +0200)]
smb: client: make use of smbdirect_socket.disconnect_work

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: client: make use of smbdirect_socket_init()
Stefan Metzmacher [Fri, 8 Aug 2025 13:10:52 +0000 (15:10 +0200)]
smb: client: make use of smbdirect_socket_init()

It's much safer to initialize the whole structure at
the beginning than doing it all over the place
and then miss to move it if code changes.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: client: make only use of wake_up[_all]() in smbdirect.c
Stefan Metzmacher [Thu, 14 Aug 2025 08:06:50 +0000 (10:06 +0200)]
smb: client: make only use of wake_up[_all]() in smbdirect.c

wake_up_interruptible[_all]() doesn't wake up tasks waiting
with wait_event().

So we better wake_up[_all]() in order to wake up all tasks in order
to simplify the logic.

As we currently don't use any wait_event_*_exclusive() it
doesn't really matter if we use wake_up() or wake_up_all().
But in this patch I try to use wake_up() for expected situations
and wake_up_all() for situations of a broken connection.
So don't need to adjust things in future when we
may use wait_event_*_exclusive() in order to wake up
only one process that should make progress.

Changing the wait_event_*() code in order to keep
wait_event(), wait_event_interruptible() and
wait_event_interruptible_timeout() or
changing them to wait_event_killable(),
wait_event_killable_timeout(),
wait_event_killable_exclusive()
is something to think about in a future patch.

The goal here is to avoid that some tasks are not
woken and freeze forever.

Also note that this patch only changes the existing
wake_up*() calls. Adding more wake_up*() calls for
other wait queues is also deferred to a future patch.

Link: https://lore.kernel.org/linux-cifs/13851363-0dc9-465c-9ced-3ede4904eef0@samba.org/T/#t
Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: client: make use of smbdirect_socket.status_wait
Stefan Metzmacher [Fri, 8 Aug 2025 16:48:17 +0000 (18:48 +0200)]
smb: client: make use of smbdirect_socket.status_wait

This will allow us to have common helper functions soon.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: client: use status_wait and SMBDIRECT_SOCKET_RESOLVE_{ADDR,ROUTE}_RUNNING for...
Stefan Metzmacher [Fri, 8 Aug 2025 16:48:15 +0000 (18:48 +0200)]
smb: client: use status_wait and SMBDIRECT_SOCKET_RESOLVE_{ADDR,ROUTE}_RUNNING for completion

We can use the state change from
SMBDIRECT_SOCKET_RESOLVE_{ADDR,ROUTE}_RUNNING
to the next state in order to wake the caller to do the next step.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: client: use status_wait and SMBDIRECT_SOCKET_NEGOTIATE_RUNNING for completion
Stefan Metzmacher [Fri, 8 Aug 2025 16:48:14 +0000 (18:48 +0200)]
smb: client: use status_wait and SMBDIRECT_SOCKET_NEGOTIATE_RUNNING for completion

We can use the state change from SMBDIRECT_SOCKET_NEGOTIATE_RUNNING to
SMBDIRECT_SOCKET_CONNECTED or SMBDIRECT_SOCKET_NEGOTIATE_FAILED in order
to notify the caller if the negotiation is over.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: client: adjust smbdirect related output of cifs_debug_data_proc_show()
Stefan Metzmacher [Mon, 8 Sep 2025 10:14:43 +0000 (12:14 +0200)]
smb: client: adjust smbdirect related output of cifs_debug_data_proc_show()

For the reader it is not obvious that the counter values are displayed
in hex as there's no leading '0x' before '%x'.

So changed them to %u instead and added '0x' for non-counter values
and also a string for the status.

Note this generates some checkpatch warnings like this:

 WARNING: quoted string split across lines
 #45: FILE: fs/smb/client/cifs_debug.c:460:
 +               seq_printf(m, "\nSMBDirect protocol version: 0x%x "
 +                       "transport status: %s (%u)",

But I'll leave this is the current style in the
related code...

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket.first_error
Stefan Metzmacher [Thu, 28 Aug 2025 10:11:02 +0000 (12:11 +0200)]
smb: smbdirect: introduce smbdirect_socket.first_error

This will be used when a connected conection gets the first error.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: client/smbdirect: introduce SMBDIRECT_SOCKET_ERROR
Stefan Metzmacher [Thu, 28 Aug 2025 08:39:56 +0000 (10:39 +0200)]
smb: client/smbdirect: introduce SMBDIRECT_SOCKET_ERROR

This will be used to turn SMBDIRECT_SOCKET_CONNECTED into an
error within smbd_disconnect_rdma_connection() on the client
and smb_direct_disconnect_rdma_connection() on the server.

We do this in a single commit with the client as otherwise it
won't build because the enum value is not handled in the
switch statement.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: client/smbdirect: replace SMBDIRECT_SOCKET_CONNECTING with more detailed states
Stefan Metzmacher [Fri, 8 Aug 2025 16:48:13 +0000 (18:48 +0200)]
smb: client/smbdirect: replace SMBDIRECT_SOCKET_CONNECTING with more detailed states

The process of reaching a functional connection represented by
SMBDIRECT_SOCKET_CONNECTED, is more complex than using a single
SMBDIRECT_SOCKET_CONNECTING state.

This will allow us to remove a lot of special variables and
completions in the following commits.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: client: fix sending the iwrap custom IRD/ORD negotiation messages
Stefan Metzmacher [Wed, 20 Aug 2025 09:25:06 +0000 (11:25 +0200)]
smb: client: fix sending the iwrap custom IRD/ORD negotiation messages

Do a real negotiation and check the servers initiator_depth and
responder_resources.

This should use big endian in order to be useful.
I have captures of windows clients showing this.

The fact that we used little endian up to now
means that we sent very large numbers and the
negotiation with the server truncated them to the
server limits.

Note the reason why this uses u8 for
initiator_depth and responder_resources is
that the rdma layer also uses it.

The inconsitency regarding the initiator_depth
and responder_resources values being reversed
for iwarp devices in RDMA_CM_EVENT_ESTABLISHED
should also be fixed later, but for now we should
fix it.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Cc: linux-rdma@vger.kernel.org
Fixes: c7398583340a ("CIFS: SMBD: Implement RDMA memory registration")
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: let smbdirect_socket_init() initialize all [delayed_]work_structs...
Stefan Metzmacher [Tue, 26 Aug 2025 14:30:32 +0000 (16:30 +0200)]
smb: smbdirect: let smbdirect_socket_init() initialize all [delayed_]work_structs as disabled

This safer to start with and allows common code not care about if the
caller uses these or not. E.g. sc->mr_io.recovery_work is only used
on the client...

Note disable_[delayed_]work_sync() requires a valid function pointer
in INIT_[DELAYED_]WORK(). The non _sync() version don't require it,
but as we need to use the _sync() version on cleanup we better use
it here too, it won't block anyway here...

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket.mr_io.*
Stefan Metzmacher [Tue, 19 Aug 2025 07:34:27 +0000 (09:34 +0200)]
smb: smbdirect: introduce smbdirect_socket.mr_io.*

This will be used by the client and will allow us to move to
common code...

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket_parameters.max_frmr_depth
Stefan Metzmacher [Thu, 21 Aug 2025 21:50:42 +0000 (23:50 +0200)]
smb: smbdirect: introduce smbdirect_socket_parameters.max_frmr_depth

This will be used by the client...

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce struct smbdirect_mr_io
Stefan Metzmacher [Thu, 21 Aug 2025 14:16:47 +0000 (16:16 +0200)]
smb: smbdirect: introduce struct smbdirect_mr_io

This will be used by the client in order to maintain
memory registrations.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket.workqueue
Stefan Metzmacher [Fri, 22 Aug 2025 10:22:24 +0000 (12:22 +0200)]
smb: smbdirect: introduce smbdirect_socket.workqueue

The client currently used a per socket workqueue
because it can block in a work function
waiting for credits.

So we use a per socket pointer in order to prepare
common code.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket.statistics
Stefan Metzmacher [Tue, 19 Aug 2025 11:52:29 +0000 (13:52 +0200)]
smb: smbdirect: introduce smbdirect_socket.statistics

These will be used by the client and maybe shared code in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket.idle.{keepalive,immediate_work,timer_work}
Stefan Metzmacher [Fri, 15 Aug 2025 15:47:58 +0000 (17:47 +0200)]
smb: smbdirect: introduce smbdirect_socket.idle.{keepalive,immediate_work,timer_work}

This will allow client and server to use the common structures in order
to share common functions later.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket.rdma.legacy_iwarp
Stefan Metzmacher [Thu, 21 Aug 2025 10:13:16 +0000 (12:13 +0200)]
smb: smbdirect: introduce smbdirect_socket.rdma.legacy_iwarp

This will be used by client and server soon.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket_parameters.{initiator_depth,responder_reso...
Stefan Metzmacher [Tue, 19 Aug 2025 21:18:21 +0000 (23:18 +0200)]
smb: smbdirect: introduce smbdirect_socket_parameters.{initiator_depth,responder_resources}

This will make it easier to specify these from the outside of the core
code later.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket_parameters.{resolve_{addr,route},rdma_conn...
Stefan Metzmacher [Thu, 14 Aug 2025 17:12:38 +0000 (19:12 +0200)]
smb: smbdirect: introduce smbdirect_socket_parameters.{resolve_{addr,route},rdma_connect,negotiate}_timeout_msec

These will be used instead of hardcoded values in client and server.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket.recv_io.{posted,credits}
Stefan Metzmacher [Mon, 11 Aug 2025 13:57:04 +0000 (15:57 +0200)]
smb: smbdirect: introduce smbdirect_socket.recv_io.{posted,credits}

This will be used by client and server soon in order to maintain
the state of posted recv_io messages and granted credits.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce struct smbdirect_rw_io
Stefan Metzmacher [Mon, 18 Aug 2025 19:04:14 +0000 (21:04 +0200)]
smb: smbdirect: introduce struct smbdirect_rw_io

This will be used by the server in order to manage
RDMA reads and writes.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket.rw_io.credits
Stefan Metzmacher [Thu, 14 Aug 2025 09:41:59 +0000 (11:41 +0200)]
smb: smbdirect: introduce smbdirect_socket.rw_io.credits

This will be used by the server to manage the state
for RDMA read/write requests.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce struct smbdirect_send_batch
Stefan Metzmacher [Mon, 18 Aug 2025 19:13:03 +0000 (21:13 +0200)]
smb: smbdirect: introduce struct smbdirect_send_batch

This will replace struct smb_direct_send_ctx in the server
and allow us move code to the common smbdirect layer soon.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket.send_io.credits.{count,wait_queue}
Stefan Metzmacher [Mon, 11 Aug 2025 14:03:00 +0000 (16:03 +0200)]
smb: smbdirect: introduce smbdirect_socket.send_io.credits.{count,wait_queue}

This will be shared between client and server soon.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket.send_io.pending.{count,{dec,zero}_wait_queue}
Stefan Metzmacher [Mon, 11 Aug 2025 13:19:51 +0000 (15:19 +0200)]
smb: smbdirect: introduce smbdirect_socket.send_io.pending.{count,{dec,zero}_wait_queue}

This will be shared between client and server soon.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket.disconnect_work
Stefan Metzmacher [Fri, 8 Aug 2025 17:05:39 +0000 (19:05 +0200)]
smb: smbdirect: introduce smbdirect_socket.disconnect_work

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket_init()
Stefan Metzmacher [Fri, 8 Aug 2025 13:08:33 +0000 (15:08 +0200)]
smb: smbdirect: introduce smbdirect_socket_init()

This will make it easier to keep the initialization
in a single place.

For now it's an __always_inline function as we only
share the header files. Once move to common functions
we'll have a dedicated smbdirect.ko that exports functions...

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket.status_wait
Stefan Metzmacher [Fri, 8 Aug 2025 16:48:16 +0000 (18:48 +0200)]
smb: smbdirect: introduce smbdirect_socket.status_wait

This will be used by server and client soon.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agosmb: smbdirect: introduce smbdirect_socket_status_string()
Stefan Metzmacher [Mon, 8 Sep 2025 10:06:18 +0000 (12:06 +0200)]
smb: smbdirect: introduce smbdirect_socket_status_string()

This will be used for more useful debug messages.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
5 weeks agoi3c: fix big-endian FIFO transfers
Arnd Bergmann [Wed, 24 Sep 2025 20:18:33 +0000 (22:18 +0200)]
i3c: fix big-endian FIFO transfers

Short MMIO transfers that are not a multiple of four bytes in size need
a special case for the final bytes, however the existing implementation
is not endian-safe and introduces an incorrect byteswap on big-endian
kernels.

This usually does not cause problems because most systems are
little-endian and most transfers are multiple of four bytes long, but
still needs to be fixed to avoid the extra byteswap.

Change the special case for both i3c_writel_fifo() and i3c_readl_fifo()
to use non-byteswapping writesl() and readsl() with a single element
instead of the byteswapping writel()/readl() that are meant for individual
MMIO registers. As data is copied between a FIFO and a memory buffer,
the writesl()/readsl() loops are typically based on __raw_readl()/
__raw_writel(), resulting in the order of bytes in the FIFO to match
the order in the buffer, regardless of the CPU endianess.

The earlier versions in the dw-i3c and i3c-master-cdns had a correct
implementation, but the generic version that was recently added broke it.

Fixes: 733b439375b4 ("i3c: master: Add inline i3c_readl_fifo() and i3c_writel_fifo()")
Cc: Manikanta Guntupalli <manikanta.guntupalli@amd.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jorge Marques <jorge.marques@analog.com>
Link: https://lore.kernel.org/r/20250924201837.3691486-1-arnd@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
5 weeks agoi3c: master: adi: fix number of bytes written to fifo
Alexandre Belloni [Wed, 24 Sep 2025 19:56:00 +0000 (21:56 +0200)]
i3c: master: adi: fix number of bytes written to fifo

adi_i3c_master_wr_to_tx_fifo computes the maximum number of bytes that can be
sent to the fifo but never makes use of it, actually limit the number of bytes
sent.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202509190505.fKGvEJRa-lkp@intel.com/
Reviewed-by: Jorge Marques <jorge.marques@analog.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20250924195600.122142-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
5 weeks agoLinux 6.17
Linus Torvalds [Sun, 28 Sep 2025 21:39:22 +0000 (14:39 -0700)]
Linux 6.17

5 weeks agoMAINTAINERS: add myself and Barry to dma_map_benchmark maintainers
Qinxin Xia [Thu, 14 Aug 2025 13:35:27 +0000 (21:35 +0800)]
MAINTAINERS: add myself and Barry to dma_map_benchmark maintainers

Since Chenxiang has left HiSilicon, Barry and I will jointly
maintain this module.

Cc: Barry Song <baohua@kernel.org>
Signed-off-by: Qinxin Xia <xiaqinxin@huawei.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
5 weeks agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux
Linus Torvalds [Sun, 28 Sep 2025 20:24:43 +0000 (13:24 -0700)]
Merge tag 'for-linus' of git://git./linux/kernel/git/rmk/linux

Pull ARM fix from Russell King:
 "Just one fix to the module freeing function that was declared __weak
  when it should not have been. Thanks to Petr Pavlu for spotting this"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux:
  ARM: 9458/1: module: Ensure the override of module_arch_freeing_init()

5 weeks agoMerge tag 'i2c-for-6.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sun, 28 Sep 2025 20:19:23 +0000 (13:19 -0700)]
Merge tag 'i2c-for-6.17-rc8' of git://git./linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:

 - various MAINTAINERS updates

 - fix an off-by-one error in riic

 - fix k1 DT schema to allow validation

 - rtl9300: fix faulty merge conflict resolution

* tag 'i2c-for-6.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: rtl9300: Drop unsupported I2C_FUNC_SMBUS_I2C_BLOCK
  MAINTAINERS: add entry for SpacemiT K1 I2C driver
  MAINTAINERS: Add me as maintainer of Synopsys DesignWare I2C driver
  MAINTAINERS: delete email for Tharun Kumar P
  dt-bindings: i2c: spacemit: extend and validate all properties
  i2c: riic: Allow setting frequencies lower than 50KHz
  MAINTAINERS: Remove myself as Synopsys DesignWare I2C maintainer
  MAINTAINERS: Update email address for Qualcomm's I2C GENI maintainers

5 weeks agoMerge tag 'trace-v6.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
Linus Torvalds [Sun, 28 Sep 2025 17:26:35 +0000 (10:26 -0700)]
Merge tag 'trace-v6.17-rc7' of git://git./linux/kernel/git/trace/linux-trace

Pull tracing fixes from Steven Rostedt:

 - Fix buffer overflow in osnoise_cpu_write()

   The allocated buffer to read user space did not add a nul terminating
   byte after copying from user the string. It then reads the string,
   and if user space did not add a nul byte, the read will continue
   beyond the string.

   Add a nul terminating byte after reading the string.

 - Fix missing check for lockdown on tracing

   There's a path from kprobe events or uprobe events that can update
   the tracing system even if lockdown on tracing is activate. Add a
   check in the dynamic event path.

 - Add a recursion check for the function graph return path

   Now that fprobes can hook to the function graph tracer and call
   different code between the entry and the exit, the exit code may now
   call functions that are not called in entry. This means that the exit
   handler can possibly trigger recursion that is not caught and cause
   the system to crash.

   Add the same recursion checks in the function exit handler as exists
   in the entry handler path.

* tag 'trace-v6.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tracing: fgraph: Protect return handler from recursion loop
  tracing: dynevent: Add a missing lockdown check on dynevent
  tracing/osnoise: Fix slab-out-of-bounds in _parse_integer_limit()

5 weeks agoMerge tag 'spi-fix-v6.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brooni...
Linus Torvalds [Sun, 28 Sep 2025 16:56:05 +0000 (09:56 -0700)]
Merge tag 'spi-fix-v6.17-rc7' of git://git./linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A few final driver specific fixes that have been sitting in -next for
  a bit.

  The OMAP issue is likely to come up very infrequently since mixed
  configuration SPI buses are rare and the Cadence issue is specific to
  SoCFPGA systems"

* tag 'spi-fix-v6.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: omap2-mcspi: drive SPI_CLK on transfer_setup()
  spi: cadence-qspi: defer runtime support on socfpga if reset bit is enabled

5 weeks agoMerge tag 'mm-hotfixes-stable-2025-09-27-22-35' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sun, 28 Sep 2025 16:32:00 +0000 (09:32 -0700)]
Merge tag 'mm-hotfixes-stable-2025-09-27-22-35' of git://git./linux/kernel/git/akpm/mm

Pull misc fixes from Andrew Morton:
 "7 hotfixes. 4 are cc:stable and the remainder address post-6.16 issues
  or aren't considered necessary for -stable kernels. 6 of these fixes
  are for MM.

  All singletons, please see the changelogs for details"

* tag 'mm-hotfixes-stable-2025-09-27-22-35' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  include/linux/pgtable.h: convert arch_enter_lazy_mmu_mode() and friends to static inlines
  mm/damon/sysfs: do not ignore callback's return value in damon_sysfs_damon_call()
  mailmap: add entry for Bence Csókás
  fs/proc/task_mmu: check p->vec_buf for NULL
  kmsan: fix out-of-bounds access to shadow memory
  mm/hugetlb: fix copy_hugetlb_page_range() to use ->pt_share_count
  mm/hugetlb: fix folio is still mapped when deleted

5 weeks agomodpost: Initialize builtin_modname to stop SIGSEGVs
Hugh Dickins [Sun, 28 Sep 2025 04:28:06 +0000 (21:28 -0700)]
modpost: Initialize builtin_modname to stop SIGSEGVs

Segmentation fault ./scripts/mod/modpost -o vmlinux.symvers vmlinux.o
stops the kernel build.  It comes when write_vmlinux_export_c_file()
tries to buf_printf alias->builtin_modname.  malloc'ed memory is not
necessarily zeroed.  NULL new->builtin_modname before adding to aliases.

Fixes: 5ab23c7923a1 ("modpost: Create modalias for builtin modules")
Signed-off-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Link: https://patch.msgid.link/4590a243-0a7e-b7e6-e2d3-cd1b41a12237@google.com
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
5 weeks agolibbpf: Replace AF_ALG with open coded SHA-256
Eric Biggers [Sun, 28 Sep 2025 00:38:33 +0000 (17:38 -0700)]
libbpf: Replace AF_ALG with open coded SHA-256

Reimplement libbpf_sha256() using some basic SHA-256 C code.  This
eliminates the newly-added dependency on AF_ALG, which is a problematic
UAPI that is not supported by all kernels.

Make libbpf_sha256() return void, since it can no longer fail.  This
simplifies some callers.  Also drop the unnecessary 'sha_out_sz'
parameter.  Finally, also fix the typo in "compute_sha_udpate_offsets".

Fixes: c297fe3e9f99 ("libbpf: Implement SHA256 internal helper")
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Link: https://lore.kernel.org/r/20250928003833.138407-1-ebiggers@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
5 weeks agoselftests/bpf: Add stress test for rqspinlock in NMI
Kumar Kartikeya Dwivedi [Sat, 27 Sep 2025 20:53:04 +0000 (20:53 +0000)]
selftests/bpf: Add stress test for rqspinlock in NMI

Introduce a kernel module that will exercise lock acquisition in the NMI
path, and bias toward creating contention such that NMI waiters end up
being non-head waiters. Prior to the rqspinlock fix made in the commit
0d80e7f951be ("rqspinlock: Choose trylock fallback for NMI waiters"), it
was possible for the queueing path of non-head waiters to get stuck in
NMI, which this stress test reproduces fairly easily with just 3 CPUs.

Both AA and ABBA flavors are supported, and it will serve as a test case
for future fixes that address this corner case. More information about
the problem in question is available in the commit cited above. When the
fix is reverted, this stress test will lock up the system.

To enable this test automatically through the test_progs infrastructure,
add a load_module_params API to exercise both AA and ABBA cases when
running the test.

Note that the test runs for at most 5 seconds, and becomes a noop after
that, in order to allow the system to make forward progress. In
addition, CPU 0 is always kept untouched by the created threads and
NMIs. The test will automatically scale to the number of available
online CPUs.

Note that at least 3 CPUs are necessary to run this test, hence skip the
selftest in case the environment has less than 3 CPUs available.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20250927205304.199760-1-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
5 weeks agoMerge tag 'thermal-v6.18-rc1-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel...
Rafael J. Wysocki [Sun, 28 Sep 2025 10:01:58 +0000 (12:01 +0200)]
Merge tag 'thermal-v6.18-rc1-2' of ssh://gitolite./linux/kernel/git/thermal/linux

Merge a thermal driver fix for 6.18 from Daniel Lezcano:

"- Add missing file when importing conflicting change for the Renesas
   RZ/G3E thermal driver (Daniel Lezcano)"

* tag 'thermal-v6.18-rc1-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux:
  thermal/drivers/renesas/rzg3e: Fix add thermal driver for the Renesas RZ/G3E SoC

5 weeks agofirewire: core: fix undefined reference error in ARM EABI
Takashi Sakamoto [Sun, 28 Sep 2025 01:19:10 +0000 (10:19 +0900)]
firewire: core: fix undefined reference error in ARM EABI

For ARM EABI, GCC generates a reference to __aeabi_uldivmod when compiling
a division of 64-bit integer with 32-bit integer. This function is not
available in Linux kernel. In such cases, helper macros are defined in
include/linux/math64.h.

This commit replaces the division with div_u64().

Fixes: 8ec6a8ec23b9 ("firewire: core: suppress overflow warning when computing jiffies from isochronous cycle")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202509270428.FZaO2PPq-lkp@intel.com/
Link: https://lore.kernel.org/r/20250928011910.581475-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 weeks agoi2c: i801: Add support for Intel Wildcat Lake-U
Jarkko Nikula [Fri, 8 Aug 2025 13:09:56 +0000 (16:09 +0300)]
i2c: i801: Add support for Intel Wildcat Lake-U

Add SMBus IDs on Intel Wildcat Lake-U.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
5 weeks agodt-bindings: i2c: i2c-mt65xx: Add MediaTek MT8196/6991 compatibles
AngeloGioacchino Del Regno [Wed, 11 Jun 2025 11:08:00 +0000 (13:08 +0200)]
dt-bindings: i2c: i2c-mt65xx: Add MediaTek MT8196/6991 compatibles

Add support for the MediaTek MT8196 Chromebook SoC and for its
close relative, the MediaTek Dimensity 9400 MT6991 SoC.

Those chips' multiple I2C controller instances are compatible with
the ones found in the MT8188 SoC.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[wsa: rebased]
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
5 weeks agoi2c: rtl9300: Drop unsupported I2C_FUNC_SMBUS_I2C_BLOCK
Sven Eckelmann [Sat, 27 Sep 2025 09:52:16 +0000 (11:52 +0200)]
i2c: rtl9300: Drop unsupported I2C_FUNC_SMBUS_I2C_BLOCK

While applying the patch for commit ede965fd555a ("i2c: rtl9300: remove
broken SMBus Quick operation support"), a conflict was incorrectly solved
by adding the I2C_FUNC_SMBUS_I2C_BLOCK feature flag. But the code to handle
I2C_SMBUS_I2C_BLOCK_DATA requests will be added by a separate commit.

Fixes: ede965fd555a ("i2c: rtl9300: remove broken SMBus Quick operation support")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
5 weeks agothermal/drivers/renesas/rzg3e: Fix add thermal driver for the Renesas RZ/G3E SoC
John Madieu [Sat, 27 Sep 2025 21:08:24 +0000 (23:08 +0200)]
thermal/drivers/renesas/rzg3e: Fix add thermal driver for the Renesas RZ/G3E SoC

When applied the change commit 19d3a401a617, a conflict appeared
resulting into a manual fix. However the new file rzg3e_thermal.c was
not added but stayed locally in source tree and miss to be merged with
the entire change.

Fix this by adding the file back.

Fixes: 19d3a401a617 ("Add thermal driver for the Renesas RZ/G3E SoC")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202509272225.sARVqv2G-lkp@intel.com
Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
5 weeks agoMAINTAINERS: add entry for SpacemiT K1 I2C driver
Troy Mitchell [Fri, 26 Sep 2025 14:51:52 +0000 (22:51 +0800)]
MAINTAINERS: add entry for SpacemiT K1 I2C driver

Add a MAINTAINERS entry for the SpacemiT K1 I2C driver and its DT binding.

Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
5 weeks agoMAINTAINERS: Add me as maintainer of Synopsys DesignWare I2C driver
Mika Westerberg [Fri, 26 Sep 2025 11:50:57 +0000 (13:50 +0200)]
MAINTAINERS: Add me as maintainer of Synopsys DesignWare I2C driver

I volunteered as maintainer of the DesignWare I2C driver, so update my
entry from reviewer to maintainer.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
5 weeks agoMAINTAINERS: delete email for Tharun Kumar P
Wolfram Sang [Thu, 25 Sep 2025 20:39:44 +0000 (22:39 +0200)]
MAINTAINERS: delete email for Tharun Kumar P

The email address bounced. I couldn't find a newer one in recent git history,
so delete this email entry.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
5 weeks agoMerge tag 'i2c-host-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti...
Wolfram Sang [Sat, 27 Sep 2025 22:10:34 +0000 (00:10 +0200)]
Merge tag 'i2c-host-6.18' of git://git./linux/kernel/git/andi.shyti/linux into i2c/for-mergewindow

i2c-host for v6.18

 - Add support for MediaTek MT6878 I2C
 - Drop support for S3C2410

5 weeks agoMerge tag 'trace-tools-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 27 Sep 2025 16:50:46 +0000 (09:50 -0700)]
Merge tag 'trace-tools-v6.17-rc5' of git://git./linux/kernel/git/trace/linux-trace

Pull rtla tool fixes from Steven Rostedt:

 - Fix a buffer overflow in actions_parse()

   The "trigger_c" variable did not account for the nul byte when
   determining its size

 - Fix a compare that had the values reversed

   actions_destroy() is supposed to reallocate when len is greater than
   the current size, but the compare was testing if size is greater than
   the new length

* tag 'trace-tools-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  rtla/actions: Fix condition for buffer reallocation
  rtla: Fix buffer overflow in actions_parse

5 weeks agoselftests/bpf: Add test case for different expected_attach_type
Daniel Borkmann [Fri, 26 Sep 2025 17:12:01 +0000 (19:12 +0200)]
selftests/bpf: Add test case for different expected_attach_type

Add a small test case which adds two programs - one calling the other
through a tailcall - and check that BPF rejects them in case of different
expected_attach_type values:

  # ./vmtest.sh -- ./test_progs -t xdp_devmap
  [...]
  #641/1   xdp_devmap_attach/DEVMAP with programs in entries:OK
  #641/2   xdp_devmap_attach/DEVMAP with frags programs in entries:OK
  #641/3   xdp_devmap_attach/Verifier check of DEVMAP programs:OK
  #641/4   xdp_devmap_attach/DEVMAP with programs in entries on veth:OK
  #641     xdp_devmap_attach:OK
  Summary: 2/4 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20250926171201.188490-2-daniel@iogearbox.net
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
5 weeks agobpf: Enforce expected_attach_type for tailcall compatibility
Daniel Borkmann [Fri, 26 Sep 2025 17:12:00 +0000 (19:12 +0200)]
bpf: Enforce expected_attach_type for tailcall compatibility

Yinhao et al. recently reported:

  Our fuzzer tool discovered an uninitialized pointer issue in the
  bpf_prog_test_run_xdp() function within the Linux kernel's BPF subsystem.
  This leads to a NULL pointer dereference when a BPF program attempts to
  deference the txq member of struct xdp_buff object.

The test initializes two programs of BPF_PROG_TYPE_XDP: progA acts as the
entry point for bpf_prog_test_run_xdp() and its expected_attach_type can
neither be of be BPF_XDP_DEVMAP nor BPF_XDP_CPUMAP. progA calls into a slot
of a tailcall map it owns. progB's expected_attach_type must be BPF_XDP_DEVMAP
to pass xdp_is_valid_access() validation. The program returns struct xdp_md's
egress_ifindex, and the latter is only allowed to be accessed under mentioned
expected_attach_type. progB is then inserted into the tailcall which progA
calls.

The underlying issue goes beyond XDP though. Another example are programs
of type BPF_PROG_TYPE_CGROUP_SOCK_ADDR. sock_addr_is_valid_access() as well
as sock_addr_func_proto() have different logic depending on the programs'
expected_attach_type. Similarly, a program attached to BPF_CGROUP_INET4_GETPEERNAME
should not be allowed doing a tailcall into a program which calls bpf_bind()
out of BPF which is only enabled for BPF_CGROUP_INET4_CONNECT.

In short, specifying expected_attach_type allows to open up additional
functionality or restrictions beyond what the basic bpf_prog_type enables.
The use of tailcalls must not violate these constraints. Fix it by enforcing
expected_attach_type in __bpf_prog_map_compatible().

Note that we only enforce this for tailcall maps, but not for BPF devmaps or
cpumaps: There, the programs are invoked through dev_map_bpf_prog_run*() and
cpu_map_bpf_prog_run*() which set up a new environment / context and therefore
these situations are not prone to this issue.

Fixes: 5e43f899b03a ("bpf: Check attach type at prog load time")
Reported-by: Yinhao Hu <dddddd@hust.edu.cn>
Reported-by: Kaiyan Mei <M202472210@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20250926171201.188490-1-daniel@iogearbox.net
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
5 weeks agotracing: fgraph: Protect return handler from recursion loop
Masami Hiramatsu (Google) [Mon, 22 Sep 2025 06:35:22 +0000 (15:35 +0900)]
tracing: fgraph: Protect return handler from recursion loop

function_graph_enter_regs() prevents itself from recursion by
ftrace_test_recursion_trylock(), but __ftrace_return_to_handler(),
which is called at the exit, does not prevent such recursion.
Therefore, while it can prevent recursive calls from
fgraph_ops::entryfunc(), it is not able to prevent recursive calls
to fgraph from fgraph_ops::retfunc(), resulting in a recursive loop.
This can lead an unexpected recursion bug reported by Menglong.

 is_endbr() is called in __ftrace_return_to_handler -> fprobe_return
  -> kprobe_multi_link_exit_handler -> is_endbr.

To fix this issue, acquire ftrace_test_recursion_trylock() in the
__ftrace_return_to_handler() after unwind the shadow stack to mark
this section must prevent recursive call of fgraph inside user-defined
fgraph_ops::retfunc().

This is essentially a fix to commit 4346ba160409 ("fprobe: Rewrite
fprobe on function-graph tracer"), because before that fgraph was
only used from the function graph tracer. Fprobe allowed user to run
any callbacks from fgraph after that commit.

Reported-by: Menglong Dong <menglong8.dong@gmail.com>
Closes: https://lore.kernel.org/all/20250918120939.1706585-1-dongml2@chinatelecom.cn/
Fixes: 4346ba160409 ("fprobe: Rewrite fprobe on function-graph tracer")
Cc: stable@vger.kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/175852292275.307379.9040117316112640553.stgit@devnote2
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Menglong Dong <menglong8.dong@gmail.com>
Acked-by: Menglong Dong <menglong8.dong@gmail.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
5 weeks agobpftool: Remove duplicate string.h header
Jiapeng Chong [Fri, 26 Sep 2025 09:52:40 +0000 (17:52 +0800)]
bpftool: Remove duplicate string.h header

./tools/bpf/bpftool/sign.c: string.h is included more than once.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=25502
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Acked-by: Quentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/r/20250926095240.3397539-2-jiapeng.chong@linux.alibaba.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
5 weeks agobpf: Remove duplicate crypto/sha2.h header
Jiapeng Chong [Fri, 26 Sep 2025 09:52:39 +0000 (17:52 +0800)]
bpf: Remove duplicate crypto/sha2.h header

./include/linux/bpf.h: crypto/sha2.h is included more than once.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=25501
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Acked-by: Quentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/r/20250926095240.3397539-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
5 weeks agortla/actions: Fix condition for buffer reallocation
Wander Lairson Costa [Mon, 15 Sep 2025 18:10:56 +0000 (15:10 -0300)]
rtla/actions: Fix condition for buffer reallocation

The condition to check if the actions buffer needs to be resized was
incorrect. The check `self->size >= self->len` would evaluate to
true on almost every call to `actions_new()`, causing the buffer to
be reallocated unnecessarily each time an action was added.

Fix the condition to `self->len >= self.size`, ensuring
that the buffer is only resized when it is actually full.

Cc: John Kacur <jkacur@redhat.com>
Cc: Luis Goncalves <lgoncalv@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Chang Yin <cyin@redhat.com>
Cc: Costa Shulyupin <costa.shul@redhat.com>
Cc: Crystal Wood <crwood@redhat.com>
Cc: Gabriele Monaco <gmonaco@redhat.com>
Link: https://lore.kernel.org/20250915181101.52513-1-wander@redhat.com
Fixes: 6ea082b171e00 ("rtla/timerlat: Add action on threshold feature")
Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Reviewed-by: Tomas Glozar <tglozar@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
5 weeks agortla: Fix buffer overflow in actions_parse
Ivan Pravdin [Mon, 8 Sep 2025 02:05:57 +0000 (22:05 -0400)]
rtla: Fix buffer overflow in actions_parse

Currently, tests 3 and 13-22 in tests/timerlat.t fail with error:

    *** buffer overflow detected ***: terminated
    timeout: the monitored command dumped core

The result of running `sudo make check` is

    tests/timerlat.t (Wstat: 0 Tests: 22 Failed: 11)
      Failed tests:  3, 13-22
    Files=3, Tests=34, 140 wallclock secs ( 0.07 usr  0.01 sys + 27.63 cusr
    27.96 csys = 55.67 CPU)
    Result: FAIL

Fix buffer overflow in actions_parse to avoid this error. After this
change, the tests results are

    tests/hwnoise.t ... ok
    tests/osnoise.t ... ok
    tests/timerlat.t .. ok
    All tests successful.
    Files=3, Tests=34, 186 wallclock secs ( 0.06 usr  0.01 sys + 41.10 cusr
    44.38 csys = 85.55 CPU)
    Result: PASS

Link: https://lore.kernel.org/164ffc2ec8edacaf1295789dad82a07817b6263d.1757034919.git.ipravdin.official@gmail.com
Fixes: 6ea082b171e0 ("rtla/timerlat: Add action on threshold feature")
Signed-off-by: Ivan Pravdin <ipravdin.official@gmail.com>
Reviewed-by: Tomas Glozar <tglozar@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
5 weeks agoMerge tag 'riscv-for-linus-v6.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 26 Sep 2025 21:39:12 +0000 (14:39 -0700)]
Merge tag 'riscv-for-linus-v6.17-rc8' of git://git./linux/kernel/git/riscv/linux

Pull RISC-V fixes from Paul Walmsley:

 - A race-free implementation of pudp_huge_get_and_clear() (based on the
   x86 code)

 - A MAINTAINERS update to my E-mail address

* tag 'riscv-for-linus-v6.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  MAINTAINERS: Update Paul Walmsley's E-mail address
  riscv: Use an atomic xchg in pudp_huge_get_and_clear()

5 weeks agodt-bindings: gpu: Convert nvidia,gk20a to DT schema
Rob Herring (Arm) [Wed, 24 Sep 2025 22:35:49 +0000 (17:35 -0500)]
dt-bindings: gpu: Convert nvidia,gk20a to DT schema

Convert the NVIDIA GPU binding to DT schema format.

Add undocumented "interconnects" and "interconnect-names" properties for
gp10b and gv11b. Drop all but one example.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: rng: sparc_sun_oracle_rng: convert to DT schema
Kael D'Alcamo [Wed, 24 Sep 2025 14:09:20 +0000 (16:09 +0200)]
dt-bindings: rng: sparc_sun_oracle_rng: convert to DT schema

Convert the Devicetree binding documentation for:
* SUNW,n2-rng
* SUNW,vf-rng
* SUNW,kt-rng
* ORCL,m4-rng
* ORCL,m7-rng
from plain text to YAML.

Signed-off-by: Kael D'Alcamo <dev@kael-k.io>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: vendor-prefixes: update regex for properties without a prefix
Kael D'Alcamo [Wed, 24 Sep 2025 14:09:22 +0000 (16:09 +0200)]
dt-bindings: vendor-prefixes: update regex for properties without a prefix

Update vendor-prefixes.yaml to allow property names without a prefix
to contain '#' character in all positions

Signed-off-by: Kael D'Alcamo <dev@kael-k.io>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: display: bridge: convert megachips-stdpxxxx-ge-b850v3-fw.txt to yaml
Frank Li [Tue, 23 Sep 2025 20:55:48 +0000 (16:55 -0400)]
dt-bindings: display: bridge: convert megachips-stdpxxxx-ge-b850v3-fw.txt to yaml

Convert megachips-stdpxxxx-ge-b850v3-fw.txt to yaml format.

Additional changes:
- Only keep one example.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agoscripts: dt_to_config: fix grammar and a typo in --help text
Markus Heidelberg [Fri, 26 Sep 2025 10:57:49 +0000 (12:57 +0200)]
scripts: dt_to_config: fix grammar and a typo in --help text

- grammar: singular/plural inconsistency
- typo: "of" -> "or"

Signed-off-by: Markus Heidelberg <m.heidelberg@cab.de>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: fix spelling, typos, grammar, duplicated words
Markus Heidelberg [Fri, 26 Sep 2025 10:57:48 +0000 (12:57 +0200)]
dt-bindings: fix spelling, typos, grammar, duplicated words

Signed-off-by: Markus Heidelberg <m.heidelberg@cab.de>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodocs: dt: fix grammar and spelling
Markus Heidelberg [Fri, 26 Sep 2025 10:57:47 +0000 (12:57 +0200)]
docs: dt: fix grammar and spelling

Signed-off-by: Markus Heidelberg <m.heidelberg@cab.de>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agoMerge tag 'x86-urgent-2025-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 26 Sep 2025 20:44:21 +0000 (13:44 -0700)]
Merge tag 'x86-urgent-2025-09-26' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Fix a CPU topology code regression that caused the mishandling of
  certain boot command line options, and re-enable CONFIG_PTDUMP on i386
  that was mistakenly turned off in the Kconfig"

* tag 'x86-urgent-2025-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/topology: Implement topology_is_core_online() to address SMT regression
  x86/Kconfig: Reenable PTDUMP on i386

5 weeks agolibbpf: Fix error when st-prefix_ops and ops from differ btf
D. Wythe [Fri, 26 Sep 2025 07:17:51 +0000 (15:17 +0800)]
libbpf: Fix error when st-prefix_ops and ops from differ btf

When a module registers a struct_ops, the struct_ops type and its
corresponding map_value type ("bpf_struct_ops_") may reside in different
btf objects, here are four possible case:

+--------+---------------+-------------+---------------------------------+
|        |bpf_struct_ops_| xxx_ops     |                                 |
+--------+---------------+-------------+---------------------------------+
| case 0 | btf_vmlinux   | btf_vmlinux | be used and reg only in vmlinux |
+--------+---------------+-------------+---------------------------------+
| case 1 | btf_vmlinux   | mod_btf     | INVALID                         |
+--------+---------------+-------------+---------------------------------+
| case 2 | mod_btf       | btf_vmlinux | reg in mod but be used both in  |
|        |               |             | vmlinux and mod.                |
+--------+---------------+-------------+---------------------------------+
| case 3 | mod_btf       | mod_btf     | be used and reg only in mod     |
+--------+---------------+-------------+---------------------------------+

Currently we figure out the mod_btf by searching with the struct_ops type,
which makes it impossible to figure out the mod_btf when the struct_ops
type is in btf_vmlinux while it's corresponding map_value type is in
mod_btf (case 2).

The fix is to use the corresponding map_value type ("bpf_struct_ops_")
as the lookup anchor instead of the struct_ops type to figure out the
`btf` and `mod_btf` via find_ksym_btf_id(), and then we can locate
the kern_type_id via btf__find_by_name_kind() with the `btf` we just
obtained from find_ksym_btf_id().

With this change the lookup obtains the correct btf and mod_btf for case 2,
preserves correct behavior for other valid cases, and still fails as
expected for the invalid scenario (case 1).

Fixes: 590a00888250 ("bpf: libbpf: Add STRUCT_OPS support")
Signed-off-by: D. Wythe <alibuda@linux.alibaba.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/bpf/20250926071751.108293-1-alibuda@linux.alibaba.com
5 weeks agoMerge tag 'thermal-v6.18-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git...
Rafael J. Wysocki [Fri, 26 Sep 2025 20:01:13 +0000 (22:01 +0200)]
Merge tag 'thermal-v6.18-rc1' of ssh://gitolite./linux/kernel/git/thermal/linux

Merge updates of thermal drivers for 6.18-rc1 from Daniel Lezcano:

"- Add the QCS615 compatible DT bindings for QCom platforms (Gaurav
   Kohli)

 - Support fallback trimming values when the fuse is empty in the R-Car
   driver (Marek Vasut)

 - Remove unneeded semicolon in the Mediatek LVTS driver (Jiapeng
   Chong)

 - Fix the LMH Kconfig option by selecting QCOM_SCM and take the
   opportunity to add the COMPILE_TEST option for the QCom's LMH
   feature (Dmitry Baryshkov)

 - Fix the missing includes and incorrect error message in the Qcom's
   LMH driver (Dmitry Baryshkov)

 - Fix comment typo and add the documentation in the Kconfig for the
   R-Car Gen3 and Gen4 (Marek Vasut)

 - Add Tegra114 SOCTHERM support (Svyatoslav Ryhel)

 - Rename the functions name in the driver to be consistent and generic
   with the different R-Car platform variants (Wolfram Sang)

 - Register the TI K3 J72xx bandgap sensor as a hwmon sensor too
   (Michael Walle)

 - Add and document the thermal sensor unit reporting the junction
   temperature of the RZ/G3S SoC (Claudiu Beznea)

 - Support the GRF in the Rockchip driver (Sebastian Reichel)

 - Add a temperature IIO sensor channel in the generic thermal ADC
   driver (Svyatoslav Ryhel)

 - Document the temperature sensor on the QCOM's Glymur platform (Manaf
   Meethalavalappu)

 - Add and document the thermal sensor unit reporting the junction
   temperature of the RZ/G3E SoC (John Madieu)"

* tag 'thermal-v6.18-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (24 commits)
  dt-bindings: thermal: qcom-tsens: Document the Glymur temperature Sensor
  thermal/drivers/renesas/rzg3e: Add thermal driver for the Renesas RZ/G3E SoC
  dt-bindings: thermal: r9a09g047-tsu: Document the TSU unit
  thermal/drivers/thermal-generic-adc: Add temperature sensor channel
  dt-bindings: thermal: rockchip: Tighten grf requirements
  thermal/drivers/rockchip: Shut up GRF warning
  thermal/drivers/rockchip: Unify struct rockchip_tsadc_chip format
  thermal/drivers/renesas/rzg3s: Add thermal driver for the Renesas RZ/G3S SoC
  dt-bindings: thermal: r9a08g045-tsu: Document the TSU unit
  thermal/drivers/k3_j72xx_bandgap: Register sensors with hwmon
  thermal/drivers/rcar_gen3: Fix mapping SoCs to generic Gen4 entry
  thermal/drivers/tegra: Add Tegra114 specific SOCTHERM driver
  dt-bindings: thermal: add Tegra114 soctherm header
  thermal/drivers/tegra/soctherm-fuse: Prepare calibration for Tegra114 support
  dt-bindings: thermal: Document Tegra114 SOCTHERM Thermal Management System
  thermal/drivers/rcar_gen3: Document Gen4 support in Kconfig entry
  thermal/drivers/rcar_gen3: Fix comment typo
  drivers/thermal/qcom/lmh: Fix incorrect error message
  thermal/drivers/qcom/lmh: Add missing IRQ includes
  thermal/drivers/qcom: Make LMH select QCOM_SCM
  ...

5 weeks agoof: base: Add of_get_next_child_with_prefix() stub
Bjorn Helgaas [Thu, 25 Sep 2025 19:56:30 +0000 (14:56 -0500)]
of: base: Add of_get_next_child_with_prefix() stub

1fcc67e3a354 ("of: base: Add for_each_child_of_node_with_prefix()") added
of_get_next_child_with_prefix() but did not add a stub for the !CONFIG_OF
case.

Add a of_get_next_child_with_prefix() stub so users of
for_each_child_of_node_with_prefix() can be built for compile testing even
when !CONFIG_OF.

Fixes: 1fcc67e3a354 ("of: base: Add for_each_child_of_node_with_prefix()")
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: trivial-devices: Add compatible string synaptics,synaptics_i2c
Frank Li [Tue, 23 Sep 2025 20:41:18 +0000 (16:41 -0400)]
dt-bindings: trivial-devices: Add compatible string synaptics,synaptics_i2c

Add compatible string synaptics,synaptics_i2c for synaptics touch pad. It
match existed driver drivers/input/mouse/synaptics_i2c.c.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: soc: mediatek: pwrap: Add power-domains property
Ariel D'Alessandro [Thu, 11 Sep 2025 15:10:00 +0000 (12:10 -0300)]
dt-bindings: soc: mediatek: pwrap: Add power-domains property

Currently, the DT bindings for Mediatek PMIC Wrapper is missing the
power-domains property, which is used in the MT8173 E1 evaluation board as
it needs USB power domain.

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: pinctrl: mt65xx: Allow gpio-line-names
Ariel D'Alessandro [Thu, 11 Sep 2025 15:09:57 +0000 (12:09 -0300)]
dt-bindings: pinctrl: mt65xx: Allow gpio-line-names

Current, the DT bindings for MediaTek's MT65xx Pin controller is missing
the gpio-line-names property, add it to the associated schema.

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: media: Convert MediaTek mt8173-vpu bindings to DT schema
Ariel D'Alessandro [Thu, 11 Sep 2025 15:09:51 +0000 (12:09 -0300)]
dt-bindings: media: Convert MediaTek mt8173-vpu bindings to DT schema

Convert the existing text-based DT bindings for Mediatek MT8173 Video
Processor Unit to a DT schema.

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
[robh: update MAINTAINERS and mediatek-mdp.txt references]
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: arm: mediatek: Support mt8183-audiosys variant
Julien Massot [Tue, 26 Aug 2025 07:39:36 +0000 (09:39 +0200)]
dt-bindings: arm: mediatek: Support mt8183-audiosys variant

Update the mediatek,audsys binding to support the mt8183-audiosys
compatible, which uses a different audio controller
(mediatek,mt8183-audio.yaml) compared to the legacy mt2701-audio
controller.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Julien Massot <julien.massot@collabora.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: mailbox: mediatek,gce-mailbox: Make clock-names optional
AngeloGioacchino Del Regno [Thu, 24 Jul 2025 08:38:39 +0000 (10:38 +0200)]
dt-bindings: mailbox: mediatek,gce-mailbox: Make clock-names optional

The GCE Mailbox needs only one clock and the clock-names can be
used only by the driver (which, for instance, does not use it),
and this is true for all of the currently supported MediaTek SoCs.

Stop requiring to specify clock-names on all non-MT8195 GCEs.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: regulator: mediatek,mt6331: Add missing compatible
AngeloGioacchino Del Regno [Thu, 24 Jul 2025 08:38:48 +0000 (10:38 +0200)]
dt-bindings: regulator: mediatek,mt6331: Add missing compatible

This binding had no compatible and for this reason would not be
applied to anything: add the missing "mediatek,mt6331-regulator"
comaptible.

Fixes: 6385e21692bb ("regulator: Add bindings for MT6331 regulator")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: regulator: mediatek,mt6331: Fix various regulator names
AngeloGioacchino Del Regno [Thu, 24 Jul 2025 08:38:47 +0000 (10:38 +0200)]
dt-bindings: regulator: mediatek,mt6331: Fix various regulator names

This binding was never applied to anything because it misses the
compatible, hence any mistake in it got unnoticed.

Before adding the compatible to let it apply, fix the names and
the node names of various regulators.

Fixes: 6385e21692bb ("regulator: Add bindings for MT6331 regulator")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: regulator: mediatek,mt6332-regulator: Add missing compatible
AngeloGioacchino Del Regno [Thu, 24 Jul 2025 08:38:46 +0000 (10:38 +0200)]
dt-bindings: regulator: mediatek,mt6332-regulator: Add missing compatible

This binding had no compatible and for this reason would not be
applied to anything: add the missing "mediatek,mt6332-regulator"
compatible.

Fixes: e22943e32e1f regulator: ("Add bindings for MT6332 regulator")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: pinctrl: mediatek,mt7622-pinctrl: Add missing base reg
AngeloGioacchino Del Regno [Thu, 24 Jul 2025 08:38:44 +0000 (10:38 +0200)]
dt-bindings: pinctrl: mediatek,mt7622-pinctrl: Add missing base reg

The pin controller for both MT7622 and MT7629 need both a "base"
and an "eint" MMIO like the ones found on other MediaTek SoCs:
while devicetrees have always been correct, the binding is not,
as it only allows an "eint" reg.

Add "base" to reg-names and increment maxItems for reg to two.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: pinctrl: mediatek,mt7622-pinctrl: Add missing pwm_ch7_2
AngeloGioacchino Del Regno [Thu, 24 Jul 2025 08:38:43 +0000 (10:38 +0200)]
dt-bindings: pinctrl: mediatek,mt7622-pinctrl: Add missing pwm_ch7_2

The MT7622 SoC has a PWM channel 7-2 group for the pwm7 IP: add
the missing pwm_ch7_2 group.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: timer: mediatek: Add compatible for MT6795 GP Timer
AngeloGioacchino Del Regno [Thu, 24 Jul 2025 08:38:42 +0000 (10:38 +0200)]
dt-bindings: timer: mediatek: Add compatible for MT6795 GP Timer

Add a compatible for the General Purpose Timer (GPT) found on the
MediaTek Helio X10 MT6795 SoC which is fully compatible with the
one found in MT6577.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: display: mediatek: dpi: Allow specifying resets
AngeloGioacchino Del Regno [Thu, 24 Jul 2025 08:38:37 +0000 (10:38 +0200)]
dt-bindings: display: mediatek: dpi: Allow specifying resets

Even though the DPI IP has a reset bit on all MediaTek SoCs, it
is optional, and has always been unused until MT8195; specifically:
on older SoCs, like MT8173, the reset bit is located in MMSYS, and
on newer SoCs, like MT8195, it is located in VDOSYS.

For this reason, allow specifying the resets and reset-names on
all MediaTek SoCs.

Those properties are optional because there are multiple ways to
reset this IP and the reset lines in MM/VDO are used only if the
IP cannot perform warm-reset.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: interrupt-controller: qcom,pdc: Document Glymur PDC
Pankaj Patil [Thu, 18 Sep 2025 14:02:49 +0000 (19:32 +0530)]
dt-bindings: interrupt-controller: qcom,pdc: Document Glymur PDC

Document compatible for the Power Domain Controller(PDC)
block on Glymur.PDC acts as interrupt controller in
SoC states where GIC is non-operational.

Signed-off-by: Pankaj Patil <pankaj.patil@oss.qualcomm.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: interrupt-controller: arm,gic: Add tegra264-agic
sheetal [Thu, 18 Sep 2025 10:20:08 +0000 (15:50 +0530)]
dt-bindings: interrupt-controller: arm,gic: Add tegra264-agic

Add nvidia,tegra264-agic to the arm,gic binding for tegra264 audio
interrupt controller support.

Signed-off-by: sheetal <sheetal@nvidia.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: display: simple: Add innolux,n133hse-ea1 and nlt,nl12880bc20-spwg-24
Frank Li [Mon, 15 Sep 2025 15:51:23 +0000 (11:51 -0400)]
dt-bindings: display: simple: Add innolux,n133hse-ea1 and nlt,nl12880bc20-spwg-24

Add innolux,n133hse-ea1 13.3" TFT LCD panel and nlt,nl12880bc20-spwg-24
12.1" WXGA (1280 x 800) LVDS TFT LCD panel.

Fix below CHECK_DTBS warnings:
arch/arm/boot/dts/nxp/imx/imx6q-novena.dtb: /panel: failed to match any schema with compatible: ['innolux,n133hse-ea1']
arch/arm/boot/dts/nxp/imx/imx6dl-tx6u-811x.dtb: /lvds0-panel: failed to match any schema with compatible: ['nlt,nl12880bc20-spwg-24']

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: gpu: arm,mali-midgard: add exynos8890-mali compatible
Ivaylo Ivanov [Sun, 14 Sep 2025 13:14:52 +0000 (16:14 +0300)]
dt-bindings: gpu: arm,mali-midgard: add exynos8890-mali compatible

The exynos8890 uses the ARM Mali T880 GPU, document its compatible
string with the appropriate fallback.

Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agodt-bindings: edac: Convert aspeed,ast2400-sdram-edac to DT schema
Rob Herring (Arm) [Wed, 30 Apr 2025 18:27:35 +0000 (13:27 -0500)]
dt-bindings: edac: Convert aspeed,ast2400-sdram-edac to DT schema

Convert the ASpeed SDRAM EDAC binding to DT schema. It's a
straight-forward conversion.

Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Reviewed-by: Stefan Schaeckeler <sschaeck@cisco.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
5 weeks agoMerge branch 'thermal-intel'
Rafael J. Wysocki [Fri, 26 Sep 2025 19:49:58 +0000 (21:49 +0200)]
Merge branch 'thermal-intel'

Merge an adjustment of the new Power Slider interface in the int340x
thermal driver.

* thermal-intel:
  thermal: intel: int340x: Power Slider: Validate slider_balance range

5 weeks agoMerge tag 'sched-urgent-2025-09-26' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 26 Sep 2025 19:30:23 +0000 (12:30 -0700)]
Merge tag 'sched-urgent-2025-09-26' of git://git./linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:
 "Fix two dl_server regressions: a race that can end up leaving the
  dl_server stuck, and a dl_server throttling bug causing lag to fair
  tasks"

* tag 'sched-urgent-2025-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/deadline: Fix dl_server behaviour
  sched/deadline: Fix dl_server getting stuck

5 weeks agoMerge tag 'locking-urgent-2025-09-26' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 26 Sep 2025 19:28:32 +0000 (12:28 -0700)]
Merge tag 'locking-urgent-2025-09-26' of git://git./linux/kernel/git/tip/tip

Pull locking fixes from Ingo Molnar:
 "Fix a PI-futexes race, and fix a copy_process() futex cleanup bug"

* tag 'locking-urgent-2025-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  futex: Use correct exit on failure from futex_hash_allocate_default()
  futex: Prevent use-after-free during requeue-PI

5 weeks agoMerge tag 'core-urgent-2025-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 26 Sep 2025 19:27:17 +0000 (12:27 -0700)]
Merge tag 'core-urgent-2025-09-26' of git://git./linux/kernel/git/tip/tip

Pull core fix from Ingo Molnar:
 "Fix a CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y bug on older Clang versions"

* tag 'core-urgent-2025-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  kbuild: Disable CC_HAS_ASM_GOTO_OUTPUT on clang < 17

5 weeks agoPM: hibernate: Combine return paths in power_down()
Rafael J. Wysocki [Fri, 26 Sep 2025 16:41:21 +0000 (18:41 +0200)]
PM: hibernate: Combine return paths in power_down()

To avoid code duplication and improve clarity, combine the code
paths in power_down() leading to a return from that function.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/3571055.QJadu78ljV@rafael.j.wysocki
[ rjw: Changed the new label name to "exit" ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
5 weeks agoMerge tag 'v6.17rc7-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Fri, 26 Sep 2025 18:05:06 +0000 (11:05 -0700)]
Merge tag 'v6.17rc7-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - Fix unlink bug

 - Fix potential out of bounds access in processing compound requests

* tag 'v6.17rc7-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  smb: client: fix wrong index reference in smb2_compound_op()
  smb: client: handle unlink(2) of files open by different clients

5 weeks agoMerge tag 'vfs-6.17-rc8.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Linus Torvalds [Fri, 26 Sep 2025 17:57:25 +0000 (10:57 -0700)]
Merge tag 'vfs-6.17-rc8.fixes' of git://git./linux/kernel/git/vfs/vfs

Pull vfs fixes from Christian Brauner:

 - Prevent double unlock in netfs

 - Fix a NULL pointer dereference in afs_put_server()

 - Fix a reference leak in netfs

* tag 'vfs-6.17-rc8.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  netfs: fix reference leak
  afs: Fix potential null pointer dereference in afs_put_server
  netfs: Prevent duplicate unlocking

5 weeks agoselftests/bpf: Test changing packet data from kfunc
Amery Hung [Fri, 26 Sep 2025 16:41:42 +0000 (09:41 -0700)]
selftests/bpf: Test changing packet data from kfunc

bpf_xdp_pull_data() is the first kfunc that changes packet data. Make
sure the verifier clear all packet pointers after calling packet data
changing kfunc.

Signed-off-by: Amery Hung <ameryhung@gmail.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20250926164142.1850176-1-ameryhung@gmail.com