All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Demi Marie Obenour via B4 Relay"
	<devnull+demiobenour.gmail.com@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 1/3] net: Remove support for AIO on sockets
Date: Sat, 30 May 2026 00:47:18 +0000	[thread overview]
Message-ID: <20260530004719.0DB621F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260523-af-alg-harden-v1-1-c76755c3a5c5@gmail.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] The `outlen` field in `struct af_alg_async_req` is unused.
- [Low] Obsolete error handling and comments for `-EIOCBQUEUED` in `algif_aead.c` and `algif_skcipher.c`.
--

commit 64f74b492ae582ab9df137534f38a66893730e73
Author: Demi Marie Obenour <demiobenour@gmail.com>

net: Remove support for AIO on sockets

This commit removes support for asynchronous I/O on sockets, as the only
user (AF_ALG) is deprecated. This reduces the size of struct msghdr by
removing msg_iocb and makes operations strictly synchronous.

> diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c
> index c6c2ce21895dd..60f06597cb0b1 100644
> --- a/crypto/algif_aead.c
> +++ b/crypto/algif_aead.c
[ ... ]
> @@ -197,37 +197,14 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg,
>  	aead_request_set_ad(&areq->cra_u.aead_req, ctx->aead_assoclen);
>  	aead_request_set_tfm(&areq->cra_u.aead_req, tfm);
>  
> -	if (msg->msg_iocb && !is_sync_kiocb(msg->msg_iocb)) {
[ ... ]
> -		err = ctx->enc ? crypto_aead_encrypt(&areq->cra_u.aead_req) :
> -				 crypto_aead_decrypt(&areq->cra_u.aead_req);
> -
> -		/* AIO operation in progress */
> -		if (err == -EINPROGRESS)
> -			return -EIOCBQUEUED;

[Severity: Low]
Since operations are now strictly synchronous and no longer return
-EIOCBQUEUED here, do the callers like aead_recvmsg() and skcipher_recvmsg()
still need to check for -EIOCBQUEUED? It seems the error handling and
comments explaining AIO request limits in the outer loops might now be
leftover dead code.

> -
> -		sock_put(sk);
> -	} else {
> -		/* Synchronous operation */
[ ... ]
> diff --git a/include/crypto/if_alg.h b/include/crypto/if_alg.h
> index 0cc8fa749f68d..62867daca47d7 100644
> --- a/include/crypto/if_alg.h
> +++ b/include/crypto/if_alg.h
> @@ -80,7 +80,6 @@ struct af_alg_rsgl {
>  
>  /**
>   * struct af_alg_async_req - definition of crypto request
> - * @iocb:		IOCB for AIO operations
>   * @sk:			Socket the request is associated with
>   * @first_rsgl:		First RX SG
>   * @last_rsgl:		Pointer to last RX SG
> @@ -92,7 +91,6 @@ struct af_alg_rsgl {
>   * @cra_u:		Cipher request
>   */
>  struct af_alg_async_req {
> -	struct kiocb *iocb;
>  	struct sock *sk;

[Severity: Low]
Does this struct still need the outlen field?

The patch removes the af_alg_async_cb callback and the areq->outlen
assignments that were used during AIO operations, so it looks like outlen
is now completely unused and could be removed.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260523-af-alg-harden-v1-0-c76755c3a5c5@gmail.com?part=1

  parent reply	other threads:[~2026-05-30  0:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-23 19:43 [PATCH 0/3] AF_ALG: Remove support for AIO and old-style drivers Demi Marie Obenour via B4 Relay
2026-05-23 19:43 ` Demi Marie Obenour
2026-05-23 19:43 ` [PATCH 1/3] net: Remove support for AIO on sockets Demi Marie Obenour via B4 Relay
2026-05-23 19:43   ` Demi Marie Obenour
2026-05-25  8:03   ` Christoph Hellwig
2026-05-26 15:58     ` Jens Axboe
2026-05-27  8:13       ` Christoph Hellwig
2026-05-28 16:56         ` Jens Axboe
2026-05-29 13:59           ` Christoph Hellwig
2026-05-27  1:40   ` Jakub Kicinski
2026-05-30  0:47   ` sashiko-bot [this message]
2026-05-23 19:43 ` [PATCH 2/3] AF_ALG: Drop support for off-CPU cryptography Demi Marie Obenour via B4 Relay
2026-05-23 19:43   ` Demi Marie Obenour
2026-05-30  0:47   ` sashiko-bot
2026-06-03 13:33   ` Harald Freudenberger
2026-05-23 19:43 ` [PATCH 3/3] AF_ALG: Document that it is *always* slower Demi Marie Obenour via B4 Relay
2026-05-23 19:43   ` Demi Marie Obenour
2026-05-30  0:47   ` sashiko-bot
2026-05-29  6:09 ` [PATCH 0/3] AF_ALG: Remove support for AIO and old-style drivers Herbert Xu

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=20260530004719.0DB621F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=devnull+demiobenour.gmail.com@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.