]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Support PTR_TO_MEM{,_OR_NULL} register spilling
authorGilad Reti <gilad.reti@gmail.com>
Wed, 13 Jan 2021 05:38:07 +0000 (07:38 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 14 Jan 2021 03:47:43 +0000 (19:47 -0800)
commit81500e2d2f574b88b9f2b1525dedb4c614e91502
treeaaf2aacc822e6ac3257dfa2931aa9cf9ba6ace23
parentdeb17f5869ae11d915d068f3b3ec74604453d499
bpf: Support PTR_TO_MEM{,_OR_NULL} register spilling

Add support for pointer to mem register spilling, to allow the verifier
to track pointers to valid memory addresses. Such pointers are returned
for example by a successful call of the bpf_ringbuf_reserve helper.

The patch was partially contributed by CyberArk Software, Inc.

Fixes: 8d560509c598 ("bpf: Implement BPF ring buffer and verifier support for it")
Suggested-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Gilad Reti <gilad.reti@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: KP Singh <kpsingh@kernel.org>
Link: https://lore.kernel.org/bpf/20210113053810.13518-1-gilad.reti@gmail.com
kernel/bpf/verifier.c