diff mbox series

[mptcp-next,1/2] Squash to "bpf: Add bpf_mptcp_sched_ops"

Message ID 48a40bc2bfb3a428092d7fe7385e236a32232398.1725546472.git.tanggeliang@kylinos.cn (mailing list archive)
State Superseded, archived
Delegated to: Geliang Tang
Headers show
Series cleanups for bpf schedulers | expand

Checks

Context Check Description
matttbe/build success Build and static analysis OK
matttbe/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
matttbe/shellcheck success MPTCP selftests files have not been modified
matttbe/KVM_Validation__normal success Success! ✅
matttbe/KVM_Validation__debug success Success! ✅
matttbe/KVM_Validation__btf__only_bpftest_all_ success Success! ✅

Commit Message

Geliang Tang Sept. 5, 2024, 2:28 p.m. UTC
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 mbox series

Patch

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;