All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Signed-off-by: giladreti <gilad.reti@gmail.com>
@ 2021-01-11 15:31 giladreti
  2021-01-11 15:51 ` Marek Behún
  2021-01-11 15:55 ` Daniel Borkmann
  0 siblings, 2 replies; 5+ messages in thread
From: giladreti @ 2021-01-11 15:31 UTC (permalink / raw)
  To: bpf, Yonghong Song
  Cc: Alexei Starovoitov, Daniel Borkmann, netdev, linux-kernel

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

This patch was suggested as a solution by Yonghong Song.
---
 kernel/bpf/verifier.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 17270b8404f1..36af69fac591 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -2217,6 +2217,8 @@ static bool is_spillable_regtype(enum bpf_reg_type type)
 	case PTR_TO_RDWR_BUF:
 	case PTR_TO_RDWR_BUF_OR_NULL:
 	case PTR_TO_PERCPU_BTF_ID:
+	case PTR_TO_MEM:
+	case PTR_TO_MEM_OR_NULL:
 		return true;
 	default:
 		return false;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-11 20:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11 15:31 [PATCH] Signed-off-by: giladreti <gilad.reti@gmail.com> giladreti
2021-01-11 15:51 ` Marek Behún
2021-01-11 15:55 ` Daniel Borkmann
2021-01-11 16:03   ` Gilad Reti
2021-01-11 20:39     ` Andrii Nakryiko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.