Skip to content

tcp/md5: Generic tcp_sig_pool

Dmitry Safonov linux-crypto lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5tcp/md5: Don't BUG_ON() failed kmemdup()include/net/tcp.h net/ipv4/tcp.c net/ipv4/tcp_minisocks.c+9 -23 replies
2/5tcp/md5: Don't leak ahash in OOMnet/ipv4/tcp.c+12 -41 reply
3/5tcp/md5: Alloc tcp_md5sig_pool only in setsockopt()net/ipv4/tcp_ipv4.c net/ipv6/tcp_ipv6.c+7 -10 replies
4/5tcp/md5: Use tcp_md5sig_pool_* naming schemeinclude/net/tcp.h net/ipv4/tcp.c net/ipv4/tcp_ipv4.c +1 more+26 -260 replies
5/5tcp/md5: Make more generic tcp_sig_poolinclude/net/tcp.h net/ipv4/tcp.c net/ipv4/tcp_ipv4.c +2 more+197 -1134 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] tcp/md5: Generic tcp_sig_pool

3 small fixes for unlikely issues.

The last patch adds tcp_sig_pool, which can be used to manage ahashes besides md5 algorythm. It reuses tcp_md5sig_pool code and in my view is a better alternative to [1] proposal, which uses shash for hasing segments and frags. This also doesn't need introduction of an enum with supported algorythms, which makes it possible to supply any crypto-supported hashing algorythm from socket option syscall (like struct xfrm_algo does in ipsec), reducing needless kernel code.

[1]: https://lore.kernel.org/all/5245f35901015acc6a41d1da92deb96f3e593b7c.1635784253.git.cdleonard@gmail.com/T/#u

Cc Andy Lutomirski <[email protected]>
Cc David Ahern <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Eric Dumazet <[email protected]>
Cc Francesco Ruggeri <[email protected]>
Cc Jakub Kicinski <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Hideaki YOSHIFUJI <[email protected]>
Cc Leonard Crestez <[email protected]>

Dmitry Safonov (5):
tcp/md5: Don't BUG_ON() failed kmemdup() tcp/md5: Don't leak ahash in OOM
tcp/md5: Alloc tcp_md5sig_pool only in setsockopt() tcp/md5: Use tcp_md5sig_pool_* naming scheme tcp/md5: Make more generic tcp_sig_pool

 include/net/tcp.h        |  23 +++--
 net/ipv4/tcp.c           | 193 ++++++++++++++++++++++++++++-----------
 net/ipv4/tcp_ipv4.c      |  45 ++++-----
 net/ipv4/tcp_minisocks.c |   5 +-
 net/ipv6/tcp_ipv6.c      |  43 +++++----
 5 files changed, 207 insertions(+), 102 deletions(-)

base-commit: 8a796a1dfca2780321755033a74bca2bbe651680

Signature · 1 line
2.33.1