From 3e716b1ee2bded06135b5eadf2793ec970866c3e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 7 Mar 2025 08:07:05 +0000 Subject: [PATCH] Revert "bpf: tcp: Mark bpf_load_hdr_opt() arg2 as read-write" This reverts commit 8f7cc7c7633833f9fa0c4ef267257eeec108a472 which is commit 8ac412a3361173e3000b16167af3d1f6f90af613 upstream. It breaks the Android kernel build and can be brought back in the future in an build-safe way if it is really needed. Bug: 161946584 Change-Id: I150a126d974ab67537cdb11d1348441834b154c5 Signed-off-by: Greg Kroah-Hartman --- net/core/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/filter.c b/net/core/filter.c index b3219af0d7fb..38a5f43e7ab3 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -7526,7 +7526,7 @@ static const struct bpf_func_proto bpf_sock_ops_load_hdr_opt_proto = { .gpl_only = false, .ret_type = RET_INTEGER, .arg1_type = ARG_PTR_TO_CTX, - .arg2_type = ARG_PTR_TO_MEM | MEM_WRITE, + .arg2_type = ARG_PTR_TO_MEM, .arg3_type = ARG_CONST_SIZE, .arg4_type = ARG_ANYTHING, };