On Fri, Aug 04, 2023 at 11:24:53PM +0800, Pu Lehui wrote:
Luiz Capitulino reported the test_verifier test failed: "precise: ST insn causing spi > allocated_stack". And it was introduced by the following upstream commit: ecdf985d7615 ("bpf: track immediate values written to stack by BPF_ST instruction")
Eduard's investigation [4] shows that test failure is not a bug, but a difference in BPF verifier behavior between upstream, where commits [1,2,3] by Andrii are present, and 5.15, where these commits are absent.
Backporting strategy is consistent with Eduard in kernel version 6.1 [5], but with some conflicts in patch #1, #4 and #6 due to the bpf of 5.15 doesn't support more features.
Commits of Andrii: [1] be2ef8161572 ("bpf: allow precision tracking for programs with subprogs") [2] f63181b6ae79 ("bpf: stop setting precise in current state") [3] 7a830b53c17b ("bpf: aggressively forget precise markings during state checkpointing")
Links: [4] https://lore.kernel.org/stable/c9b10a8a551edafdfec855fbd35757c6238ad258.came... [5] https://lore.kernel.org/all/20230724124223.1176479-2-eddyz87@gmail.com/
This, and the 5.10.y series, now queued up, thanks.
greg k-h