All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Stephen Hemminger <stephen@networkplumber.org>,
	David Ahern <dsahern@kernel.org>
Cc: linux-crypto@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
	netdev@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH iproute2-next v2] lib/bpf_legacy: Use userspace SHA-1 code instead of AF_ALG
Date: Wed, 12 Nov 2025 04:07:19 +0000	[thread overview]
Message-ID: <20251112040719.GB2832160@google.com> (raw)
In-Reply-To: <20250929194648.145585-1-ebiggers@kernel.org>

[Adding David Ahern.  I overlooked that iproute2 has separate
maintainers for the main tree and the next tree.]

On Mon, Sep 29, 2025 at 12:46:48PM -0700, Eric Biggers wrote:
> Add a basic SHA-1 implementation to lib/, and make lib/bpf_legacy.c use
> it to calculate SHA-1 digests instead of the previous AF_ALG-based code.
> 
> This eliminates the dependency on AF_ALG, specifically the kernel config
> options CONFIG_CRYPTO_USER_API_HASH and CONFIG_CRYPTO_SHA1.
> 
> Over the years AF_ALG has been very problematic, and it is also not
> supported on all kernels.  Escalating to the kernel's privileged
> execution context merely to calculate software algorithms, which can be
> done in userspace instead, is not something that should have ever been
> supported.  Even on kernels that support it, the syscall overhead of
> AF_ALG means that it is often slower than userspace code.
> 
> Let's do the right thing here, and allow people to disable AF_ALG
> support (or not enable it) on systems where iproute2 is the only user.
> 
> Acked-by: Ard Biesheuvel <ardb@kernel.org>
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>

Stephen and David, any interest in applying this patch?

- Eric

  parent reply	other threads:[~2025-11-12  4:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-29 19:46 [PATCH iproute2-next v2] lib/bpf_legacy: Use userspace SHA-1 code instead of AF_ALG Eric Biggers
2025-10-01 22:59 ` Alexei Starovoitov
2025-10-01 23:33   ` Eric Biggers
2025-10-02 17:12     ` Alexei Starovoitov
2025-10-02 17:36       ` Eric Biggers
2025-10-02 17:53         ` Alexei Starovoitov
2025-11-12  4:07 ` Eric Biggers [this message]
2025-11-16 17:45   ` David Ahern
2025-12-17 23:44     ` Eric Biggers
2025-12-18 19:58       ` David Ahern
2025-11-12 20:12 ` Stephen Hemminger
2025-11-12 20:22   ` Eric Biggers
2025-11-13  7:25   ` Ard Biesheuvel
2025-11-13  8:51     ` Simon Richter
2025-11-13 15:35       ` Ard Biesheuvel

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=20251112040719.GB2832160@google.com \
    --to=ebiggers@kernel.org \
    --cc=ardb@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=dsahern@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /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.