Revision 2006b4e155d07cec9446b3acfc600c1003ec0880 authored by Maxim Mikityanskiy on 16 March 2024, 01:40:06 UTC, committed by Maxim Mikityanskiy on 18 March 2024, 16:10:25 UTC
Code generation when Clang 17 changed, and it generates some code that is problematic for the verifier, even though it should be correct logically. More specifically, when nodeport_lb6 calls lb6_extract_tuple, which calls ipv6_hdrlen_offset, the latter might return an error, in which case l4_off in nodeport_lb6 remains non-initialized. If that happens, nodeport_lb6 returns early. The error code when it can possibly continue is DROP_UNSUPP_SERVICE_PROTO, but it's only returned by lb6_extract_tuple after l4_off is initialized, so we are safe here. Moreover, is_svc_proto is set to false in this case, which blocks further l4_off access. However, Clang 17 generates code which jumps to a common chunk after lb6_extract_tuple returns, and this chunk starts from spilling R2 to the stack: `*(u32 *)(r10 -176) = r2`. R2 stores l4_off, but only after it has been assigned, otherwise it's not initialized, and this is what the verifier complains for, even though it's not used afterwards on errors. Work around it by always assiging l4_off in lb6_extract_tuple. Signed-off-by: Maxim Mikityanskiy <maxim@isovalent.com>
1 parent 2c03721
File | Mode | Size |
---|---|---|
ISSUE_TEMPLATE | ||
actions | ||
workflows | ||
ariane-config.yaml | -rw-r--r-- | 3.1 KB |
gcp-vm-startup.sh | -rw-r--r-- | 892 bytes |
kind-config-ipv6.yaml | -rw-r--r-- | 523 bytes |
kind-config.yaml | -rw-r--r-- | 500 bytes |
kind-config.yaml.tmpl | -rw-r--r-- | 565 bytes |
maintainers-little-helper.yaml | -rw-r--r-- | 2.1 KB |
pull_request_template.md | -rw-r--r-- | 1.2 KB |
renovate.json5 | -rw-r--r-- | 14.8 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...