[PATCH mptcp-next v2 1/4] Squash to "bpf: Add bpf_mptcp_sched_ops"

Geliang Tang posted 4 patches 8 months, 1 week ago
[PATCH mptcp-next v2 1/4] Squash to "bpf: Add bpf_mptcp_sched_ops"
Posted by Geliang Tang 8 months, 1 week ago
From: Geliang Tang <tanggeliang@kylinos.cn>

The helper mptcp_subflow_set_scheduled() is used to update the scheduled
flags of a subflow. BPF schedulers are not allowed to directly modify
this flags. So the write access permission for this flag shouldn't be
allow.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
 net/mptcp/bpf.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/mptcp/bpf.c b/net/mptcp/bpf.c
index 9672a70c24b0..6414824402e6 100644
--- a/net/mptcp/bpf.c
+++ b/net/mptcp/bpf.c
@@ -60,9 +60,6 @@ static int bpf_mptcp_sched_btf_struct_access(struct bpf_verifier_log *log,
 		}
 	} else if (t == mptcp_subflow_type) {
 		switch (off) {
-		case offsetof(struct mptcp_subflow_context, scheduled):
-			end = offsetofend(struct mptcp_subflow_context, scheduled);
-			break;
 		case offsetof(struct mptcp_subflow_context, avg_pacing_rate):
 			end = offsetofend(struct mptcp_subflow_context, avg_pacing_rate);
 			break;
-- 
2.43.0