Re: [PATCH iproute2-next v2] lib/bpf_legacy: Use userspace SHA-1 code instead of AF_ALG

From
Simon Richter <hidden>
Date
2025-11-13 08:51:49
Also in
bpf, linux-crypto
Reply to
Ard Biesheuvel, 2025-11-13
Hi,

On 11/13/25 4:25 PM, Ard Biesheuvel wrote:
Also, I strongly agree with Eric that a syscall interface to perform
crypto s/w arithmetic that could easily execute in user space is
something that should have never been added, and creates portability
concerns for no good reason.
Would it make sense to add crypto (and other transform) operations to the vdso, and make the decision whether the syscall is beneficial from there, depending on request/batch size (speed vs overhead tradeoff), data source/sink and available hardware?

For example, "gzip -d" pulling data from a file and writing to a file will need to transfer the data to userspace first, process it there, then transfer it back to kernelspace so it can be written to a file.

That's a lot of syscall and transfer overhead compared to just a single "decompress this file" call that keeps the data entirely in kernelspace -- so we benefit already even if there is no hardware gzip decompressor, and users that have one (such as myself) would benefit even further.

   Simon
Thread (15 messages) 15 messages, 6 authors, last reply 2025-12-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help