net-test: packetdrill: add PSP encryption #82
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add packetdrill support for the PSP encryption protocol, both in tunnel and transport mode.
For more information on PSP, see the architecture spec at https://github.com/google/psp/blob/main/doc/PSP_Arch_Spec.pdf
Implementation by to Dimitris Michailidis [email protected]
This implementation is against the upstream draft PSP protocol as published at https://github.com/wdebruij/psp/tree/linux-v5.15-psp-v1.1 This is for demonstration purposes only: an upstream Linux ABI is expected to look significantly different.
Tested:
Test psp scripts with a psp-capable tuntap device in qemu
step 1: build kernel with psp support
git clone https://github.com/wdebruij/psp.git
cd psp
git checkout origin/linux-v5.15-psp-v1.1
make defconfig
make kvm_guest.config
sed -i 's/#\ CONFIG_TUN\ is\ not\ set/CONFIG_TUN=y/' .config
make -j $(nproc) bzImage
step 2 inside qemu, build and run packetdrill
git clone github.com/google/packetdrill
cd gtests/net/packetdrill
make && make tests
PDIR=${PWD}
cd ../tcp
$PDIR/in_netns.sh $PDIR/packetdrill --ip_version=ipv6 --mtu=1520 psp/psp_client_sockopt.pkt
$PDIR/in_netns.sh $PDIR/packetdrill --ip_version=ipv6 --mtu=1520 psp/psp_server_sockopt.pkt