From: David Howells <dhowells@redhat.com>
To: netdev@vger.kernel.org
Cc: David Howells <dhowells@redhat.com>,
Marc Dionne <marc.dionne@auristor.com>,
Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH net v9 00/14] rxrpc: Miscellaneous fixes
Date: Mon, 7 Sep 2026 12:37:27 +0100 [thread overview]
Message-ID: <20260907113743.1453210-1-dhowells@redhat.com> (raw)
(This has been split from "rxrpc: Fix CHALLENGE packet handling")
Here's a set of miscellaneous patches, mostly found by sashiko:
(1) In AFS, fix various callers of rxrpc_kernel_send_data() to wrap those
calls in loops to handle short sends.
(2) In AFS, fix various callers of rxrpc_kernel_send_data() to abort the
call on send error.
(3) Do (1) and (2) but for the rxperf test server.
(4) Fix rxrpc_sendmsg so that it doesn't return an error if it queued the
last packet of a call. After that point, the error will be returned
by recvmsg() and returned it twice in two different places may
complicate userspace cleaning up its own structures.
(5) Fix the use of len vs msg->msg_iter.count in rxrpc_send_data().
(6) Fix error handling in rxrpc_send_data() for if ->secure_packet()
returns an error.
(7) Fix the update of call->pending in rxrpc_send_data() in paths when the
call lock has been dropped.
(8) Fix double IRQ enablement in __rxrpc_notify_socket() when called
indirectly from rxrpc_end_rx_phase().
(9) Fix the generation of notifications from rxrpc after call completion.
(10) Fix the rxrpc key parser to check that the enctype is supported in an
RxGK key.
(11) Fix AFS to correctly size the YFS CM token.
(12) Fix AFS to set call->server when making a call, in particular
FS.InlineBulkStatus.
(13) Fix rxrpc_poke_conn() to only queue the conn if the refcount hasn't
yet hit 0.
(14) Take write lock when setting the initial RxGK transport key to avoid a
data race.
David
The patches can be found here also:
http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-fixes
Changes
=======
ver #9)
- Rebased on latest net/main.
- Fixed more Sashiko-reported bugs[9]:
- Changed Fixes line for "rxrpc: Fix sendmsg to not return an error if
last packet queued".
- Split the change to call rxrpc_kernel_send_data() in a loop in afs into
its own patch and put that first.
- In AFS, always abort a call if rxrpc_kernel_send_data() gives an error.
- Added a patch to make the rxperf server loop around when sending the
magic cookie.
- Fix rxrpc_send_data() to only return -EPROTO or -EIO only in the case
that no data was copied if TX_NO_MORE or TX_ERROR are set.
- Fix commit message to say call->user_mutex, not call->lock.
- Removed comment on rxrpc_notify_socket() about putting recvmsg_link on
a dummy queue.
- Added a patch to check that the RxGK enctype is supported in an rxrpc
key.
- Move the check for net->fs_cm_token_key being valid from
afs_create_yfs_rxgk_cm_appdata() to its caller and just return okay if
it is NULL (it should've been created during module load).
- Added a patch to fix the calculation of the RxGK CM token in AFS, even
though the code is then deleted by a later patch.
- Made rxrpc_kernel_query_key() pick the first token with a supported
security index, rather than just picking the first token.
- Fix the docs for RXRPC_RESPONSE_APPDATA.
- Split the setting of call->server in afs_make_op_call() out into its
own patch as a separate fix.
- Split the OOB-Challenge fixes out for the moment.
- Imported a patch to fix rxrpc_poke_con() to avoid queuing a dead conn.
- Imported a patch to fix a data race when initialising an RxGK conn.
ver #8)
- Rebased on latest net/main.
- Fixed more Sashiko-reported bugs[8]:
- Fixed the kerneldoc on rxrpc_kernel_send_data() as this returns the
number of bytes buffered on success.
- Fixed rxrpc_send_data() to break out of the loop if either len or
msg_iter's count becomes 0 and to limit the amount per copy to the
msg_iter count also.
- Fixed the docs for rxrpc_kernel_send_data()'s return value.
- In afs_make_call(), remove duplicate error check and make sure the
afs_sent_data tracepoint gets called on the error path.
- In rxrpc_send_data() remove setting of the already-NULL txb and
tx_pending to NULL.
- Added a patch to fix __rxrpc_notify_socket() to save the old IRQ state
when disabling it as the call chain may have it disabled.
- Removed comment on __rxrpc_notify_socket() about putting recvmsg_link
on a dummy queue.
- Moved rxrpc_notify_socket()'s declaration to the right file section in
ar-internal.h.
- Updated the comment on the user_key_payload struct.
- Updated the comment on put_user_key_payload().
- In afs_open_socket(), fixed a missing ref cleanup on error.
- Updated the docs for rxrpc_kernel_begin_call().
- Added docs for RXRPC_RESPONSE_APPDATA cmsg.
- Fixed rxrpc_sendmsg_cmsg() to require that the appdata key have its
description prefixed by "rxrpc-appdata:" to prevent the reading out of
arbitrary keys through a fake filemanager.
- Dropped the use of logon keys for appdata.
- Removed rxrpc_abort_response_sendmsg.
- Removed struct rxrpc_challenge and struct rxgk_challenge.
- Removed the RXRPC_MANAGE_RESPONSE constant and its rxrpc_setsockopt()
stub.
ver #7)
- Rebased on latest net/main.
- Added a patch to change rxrpc_send_data() to use len rather than msg_iter
count to be consistent about the amount to send so as to do the LAST flag
determination correctly.
- Fixed more Sashiko-reported bugs[7]:
- Made the loops in afs_make_call() that call rxrpc_kernel_send_data()
pass the amount left in the iterator rather than an unreducing size.
- Made the second loop in afs_make_call() check to see if
rxrpc_kernel_send_data() returned an error.
- Removed yet more OOB references, two in linux/af_rxrpc.h and one in
rxrpc.rst.
ver #6)
- Rebased on latest net/main.
- Fixed more Sashiko-reported bugs[6]:
- Fixed rxrpc_send_data() to redo the RXRPC_CALL_TX_ERROR and the
RXRPC_CALL_TX_NO_MORE checks after having dropped the call mutex.
- Altered rxrpc_send_data(), as discussed with Paulo Abeni, to rewind as
much as possible on retryable crypto error (e.g. ENOMEM) rather than
rewinding just one byte.
- Fixed afs_make_call() to keep trying rxrpc_kernel_send_data() until the
iterator is drained unless an error occurs.
- Fixed afs_create_yfs_rxgk_cm_appdata() to use kfree_sensitive().
- Removed remaining OOB trace constants.
ver #5)
- Rebased on latest net/main.
- Fixed more Sashiko-reported bugs[5]:
- Removed dropped_lock from rxrpc_do_sendmsg() as it's now always false.
- Fix rxrpc_send_data() to not leak a txbuf from the "maybe_error:" path
by reattaching it to call->tx_pending.
- Increased the size of the rxrpc_abort_reason enum value by removing the
__mode(byte) specifier.
ver #4)
- Rebased on latest net/main.
- Split out non-relevant AFS patches.
- Allow logon-type key as well as user-type key as they're basically the
same thing internally.
- Fixed more Sashiko-reported bugs[4]:
- Fixed rxrpc_send_data() to wind the transmitted data back by 1 byte if
ENOMEM is hit when encrypting the final packet so that the caller can
retry.
- Fixed afs_create_yfs_rxgk_cm_appdata() to add the 4 bytes for the level
into toksize.
- Changed bundle code to include the appdata key as part of the client
connection bundle lookup criteria (don't share connections with
different appdata keys).
- Fixed rxrpc_sendmsg_cmsg() to allow only, not disallow user-type keys
for RXRPC_RESPONSE_APPDATA.
- Reversed the removal of the rejection of MSG_OOB passed to
rxrpc_recvmsg().
- Fixed rxgk_construct_response() to use xdr_object_len() to calculate
the space needed for the appdata and also the space needed for the
token and the authenticator.
- Added a check into rxgk_respond_to_challenge() to make sure the key
type is user or login before we access its payload.
- Remove ->sendmsg_respond_to_challenge() too.
ver #3)
- Rebased on latest net/main.
- Removed two obsoleted patches.
ver #2)
- Split the CHALLENGE/RESPONSE fix into smaller patches.
- Fixed more Sashiko-reported bugs[2][3]:
- Added some more patches to fix some more bugs.
- Get rid of the AFS_SERVER_FL_APPDATA flag and check the pointer to the
appdata instead.
- Rename the appdata key pointer in the AFS_SERVER to reflect this one is
only for the YFS-RxGK security class.
- Use barriers when reading or writing the server appdata key pointer.
- Ignore the appdata for RxNULL, RxKAD and OpenAFS's RxGK for now.
- Check that sendmsg() with RXRPC_RESPONSE_APPDATA is passed a user key.
- Check that the appdata key's payload isn't NULL, for instance if it
gets revoked.
- Add some error path key_put()s in rxrpc_do_sendmsg().
[1] https://sashiko.dev/#/patchset/20260624163819.3017002-1-dhowells%40redhat.com
[2] https://sashiko.dev/#/patchset/20260702144919.172295-1-dhowells%40redhat.com
[3] https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260702144919.172295-1-dhowells%40redhat.com
[4] https://sashiko.dev/#/patchset/20260713081022.2186481-1-dhowells%40redhat.com
[5] https://sashiko.dev/#/patchset/20260723100309.530157-1-dhowells%40redhat.com
[6] https://sashiko.dev/#/patchset/20260729160108.2031453-1-dhowells%40redhat.com
[7] https://sashiko.dev/#/patchset/20260804172639.2844491-1-dhowells%40redhat.com
[8] https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260812110129.979970-6-dhowells@redhat.com
[9] https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260824091645.415423-1-dhowells%40redhat.com
Chengfeng Ye (1):
rxrpc: Take write lock when publishing the initial RxGK key
David Howells (12):
afs: Fix lack of loop around sendmsg() to rxrpc
afs: Fix afs to abort the rxrpc call on send error
rxrpc: Fix lack of loop around reply send in rxperf server
rxrpc: Fix sendmsg to not return an error if last packet queued
rxrpc: Fix sendmsg length
rxrpc: Fix packet encryption error handling
rxrpc: Fix update of call->tx_pending without holding lock
rxrpc: Fix double IRQ enablement
rxrpc: Fix generation of notifications after call completion
rxrpc: Fix RxGK key parser to check enctype is supported
afs: Fix creation of RxGK CM channel token to have right size
afs: Fix lack of setting call->server when doing FS.InlineBulkStatus
Seungwon Bae (1):
rxrpc: fix use-after-free in rxrpc_poke_conn()
Documentation/networking/rxrpc.rst | 11 ++-
fs/afs/cm_security.c | 2 +-
fs/afs/internal.h | 33 +++----
fs/afs/rxrpc.c | 73 +++++++--------
include/trace/events/afs.h | 1 +
include/trace/events/rxrpc.h | 6 +-
net/rxrpc/ar-internal.h | 3 +-
net/rxrpc/call_state.c | 56 ++++++++++-
net/rxrpc/conn_object.c | 5 +-
net/rxrpc/key.c | 8 +-
net/rxrpc/recvmsg.c | 42 +++------
net/rxrpc/rxgk.c | 2 +
net/rxrpc/rxperf.c | 15 +--
net/rxrpc/sendmsg.c | 145 +++++++++++++++++++----------
14 files changed, 257 insertions(+), 145 deletions(-)
next reply other threads:[~2026-09-07 11:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 11:37 David Howells [this message]
2026-09-07 11:37 ` [PATCH net v9 01/14] afs: Fix lack of loop around sendmsg() to rxrpc David Howells
2026-09-07 13:06 ` David Laight
2026-09-10 10:18 ` David Howells
2026-09-07 11:37 ` [PATCH net v9 02/14] afs: Fix afs to abort the rxrpc call on send error David Howells
2026-09-08 20:49 ` netdev-bot+sashiko
2026-09-07 11:37 ` [PATCH net v9 03/14] rxrpc: Fix lack of loop around reply send in rxperf server David Howells
2026-09-08 20:49 ` netdev-bot+sashiko
2026-09-07 11:37 ` [PATCH net v9 04/14] rxrpc: Fix sendmsg to not return an error if last packet queued David Howells
2026-09-08 20:49 ` netdev-bot+sashiko
2026-09-07 11:37 ` [PATCH net v9 05/14] rxrpc: Fix sendmsg length David Howells
2026-09-08 20:49 ` netdev-bot+sashiko
2026-09-07 11:37 ` [PATCH net v9 06/14] rxrpc: Fix packet encryption error handling David Howells
2026-09-08 20:49 ` netdev-bot+sashiko
2026-09-07 11:37 ` [PATCH net v9 07/14] rxrpc: Fix update of call->tx_pending without holding lock David Howells
2026-09-08 20:49 ` netdev-bot+sashiko
2026-09-07 11:37 ` [PATCH net v9 08/14] rxrpc: Fix double IRQ enablement David Howells
2026-09-07 11:37 ` [PATCH net v9 09/14] rxrpc: Fix generation of notifications after call completion David Howells
2026-09-08 20:49 ` netdev-bot+sashiko
2026-09-07 11:37 ` [PATCH net v9 10/14] rxrpc: Fix RxGK key parser to check enctype is supported David Howells
2026-09-08 20:49 ` netdev-bot+sashiko
2026-09-07 11:37 ` [PATCH net v9 11/14] afs: Fix creation of RxGK CM channel token to have right size David Howells
2026-09-08 20:49 ` netdev-bot+sashiko
2026-09-07 11:37 ` [PATCH net v9 12/14] afs: Fix lack of setting call->server when doing FS.InlineBulkStatus David Howells
2026-09-08 20:49 ` netdev-bot+sashiko
2026-09-07 11:37 ` [PATCH net v9 13/14] rxrpc: fix use-after-free in rxrpc_poke_conn() David Howells
2026-09-08 20:49 ` netdev-bot+sashiko
2026-09-07 11:37 ` [PATCH net v9 14/14] rxrpc: Take write lock when publishing the initial RxGK key David Howells
2026-09-08 20:49 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260907113743.1453210-1-dhowells@redhat.com \
--to=dhowells@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.dionne@auristor.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®