[PATCH bpf-next v5 3/9] sched-ext: Allow sched-ext progs to use private stack

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

 



Allow sched-ext struct_ops bpf progs to use private stack. In later
jit, there will be some recursion checking if private stack is used
such that if the same prog is run again in the same cpu, then
that second prog run will be skipped.

Signed-off-by: Yonghong Song <yonghong.song@xxxxxxxxx>
---
 kernel/sched/ext.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 3cd7c50a51c5..f186cf7cac90 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -5370,10 +5370,16 @@ bpf_scx_get_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
 	}
 }
 
+static bool bpf_scx_priv_stack_allowed(void)
+{
+	return true;
+}
+
 static const struct bpf_verifier_ops bpf_scx_verifier_ops = {
 	.get_func_proto = bpf_scx_get_func_proto,
 	.is_valid_access = bpf_scx_is_valid_access,
 	.btf_struct_access = bpf_scx_btf_struct_access,
+	.priv_stack_allowed = bpf_scx_priv_stack_allowed,
 };
 
 static int bpf_scx_init_member(const struct btf_type *t,
-- 
2.43.5





[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