[LSF/MM/BPF TOPIC] BPF: Verifier limits, malloc and encryption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I would be interested to participate in the BPF track. The following topics
would be especially interesting to cover,

- Having spent the last several months writing increasingly complex BPF
code we have managed to stumble into a handful of instances where the
verifier, compiler and user appear to be fighting each other to generate
code that is both enjoyable C to the user, able to be compiled and
optimized by LLVM without throwing errors and warnings, and finally is
verifiable from the kernel side. At times the only workaround we have
found so far is to create hand written asm blocks of code. Fortunately,
LLVM supports asm goto now!

Some of the work to improve this is already in flight and should be in
BPF trees by the workshop but some items we suspect will still be open
by April. I think it would be an interesting session to collect a set
of use cases (C code samples) that can not be compiled and loaded
to understand where the pain points in LLVM and kernel verifier are today
so we can improve them going forward. Of course, we could compile a list
of just our examples but ideally (assuming others find the topic
interesting) we could try to collect a bigger set of examples from the
community.

- A related item is lack of alloc/realloc in BPF keeps causing rather
odd hacks in our use cases. For example, one common item that continues
to pop up is we over allocate map entries to account for worst case
scenarios. Even when smaller entries would work the majority of the time.
Or when doing probe_read_str() parsing we have no way to realloc buffers
if the string is longer than expected. Here we would like to propose
a scheme for supporting malloc/realloc/free APIs from BPF programs.

- Finally, changing topics a bit Cilium has implemented an encryption
layer using the stacks IPsec layer. However, this results in passing
packets into the stack and out of the stack complicating both the datapath
and control plane. Additionally, wireguard has recently been added. A
native solution for encryption in BPF for both IPsec and wireguard would
greatly simplify integrating encryption with BPF including at the XDP
layer.

Also it looks like a session on sockmap and related socket based BPF
hooks would be useful based on other proposals. I would like to attend
to provide input here as well.

Thanks,
John



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux