Next version of Harry's tcp_zerocopy_receive series. It aims to enable purecap applications to utilise tcp_zerocopy_receive to map packets directly from a network interface card into a shared space with the process and kernel.
v3..v4: - Remove function tcp_zerocopy_receive_size() as it's used in only one spot - Change form compat to compat64 in the commit messages. - Make initialisation of compat_zc more compact in set_compat64_tcp_zerocopy_receive() - Split copy_{from,to}_sockptr_with_ptr() into a separate commit - Leave address tcp_zerocopy_vm_insert_batch() as just an address, not a pointer - Change the check_user_ptr_read() to a check for CHERI_PERM_SW_VMEM
v2..v3: - Fix the split between compat enablement and capability support - Reorganise comments in struct tcp_zerocopy_receive - Fix the order of arguments for the *_to_sockptr functions - Change a few variables to user_uintptr_t as they were originally unsigned long - Remove unnecessary checks - Fix cast warnings - Add compat handling for offsetofend - Move a check_user_ptr closer to where its metadata is dropped - Format misc nits
Gitlab Issue: https://git.morello-project.org/morello/kernel/linux/-/issues/46
Review branch: https://git.morello-project.org/tudcre01/linux/-/commits/morello/tcp_v4
Cc: Harry Ramsey harry.ramsey@arm.com
Harry Ramsey (3): sockptr: Preserve capability tags with copy_{from,to}_sockptr_with_ptr tcp: Implement compat64 handling for struct tcp_zerocopy_receive tcp: Support capabilities in tcp_zerocopy_receive
include/linux/sockptr.h | 28 ++++++++ include/uapi/linux/tcp.h | 10 +-- net/ipv4/tcp.c | 148 +++++++++++++++++++++++++++++++-------- 3 files changed, 151 insertions(+), 35 deletions(-)