lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 21 Dec 2021 18:27:37 -0800
From:   Tyler Wear <quic_twear@...cinc.com>
To:     netdev@...r.kernel.org, bpf@...r.kernel.org
Cc:     kafai@...com, maze@...gle.com, yhs@...com,
        Tyler Wear <quic_twear@...cinc.com>
Subject: [PATCH] Add skb_store_bytes() for BPF_PROG_TYPE_CGROUP_SKB

Need to modify the ds field to support upcoming
Wifi QoS Alliance spec. Instead of adding generic
function for just modifying the ds field, add
skb_store_bytes for BPF_PROG_TYPE_CGROUP_SKB. This
allows other fields in the network and transport header
to be modified in the future.

Signed-off-by: Tyler Wear <quic_twear@...cinc.com>
---
 net/core/filter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/core/filter.c b/net/core/filter.c
index 6102f093d59a..0c25aa2212a2 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -7289,6 +7289,8 @@ static const struct bpf_func_proto *
 cg_skb_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
 {
 	switch (func_id) {
+	case BPF_FUNC_skb_store_bytes:
+		return &bpf_skb_store_bytes_proto;
 	case BPF_FUNC_get_local_storage:
 		return &bpf_get_local_storage_proto;
 	case BPF_FUNC_sk_fullsock:
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ