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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <be4d3e00-de84-420b-9979-277ecc9df6ce@linux.dev>
Date: Thu, 15 Aug 2024 18:06:06 -0700
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: Feng zhou <zhoufeng.zf@...edance.com>
Cc: daniel@...earbox.net, john.fastabend@...il.com, ast@...nel.org,
 andrii@...nel.org, eddyz87@...il.com, song@...nel.org,
 yonghong.song@...ux.dev, kpsingh@...nel.org, sdf@...ichev.me,
 haoluo@...gle.com, jolsa@...nel.org, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
 yangzhenze@...edance.com, wangdongdong.6@...edance.com
Subject: Re: [PATCH] bpf: cg_skb add get classid helper

On 8/14/24 2:50 AM, Feng zhou wrote:
> From: Feng Zhou <zhoufeng.zf@...edance.com>
> 
> At cg_skb hook point, can get classid for v1 or v2, allowing
> users to do more functions such as acl.
> 
> Signed-off-by: Feng Zhou <zhoufeng.zf@...edance.com>
> ---
>   net/core/filter.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/net/core/filter.c b/net/core/filter.c
> index 78a6f746ea0b..d69ba589882f 100644
> --- a/net/core/filter.c
> +++ b/net/core/filter.c
> @@ -8111,6 +8111,12 @@ cg_skb_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
>   		return &bpf_get_listener_sock_proto;
>   	case BPF_FUNC_skb_ecn_set_ce:
>   		return &bpf_skb_ecn_set_ce_proto;
> +	case BPF_FUNC_get_cgroup_classid:
> +		return &bpf_get_cgroup_classid_proto;
> +#endif
> +#ifdef CONFIG_CGROUP_NET_CLASSID
> +	case BPF_FUNC_skb_cgroup_classid:
> +		return &bpf_skb_cgroup_classid_proto;

With this bpf_skb_cgroup_classid_proto, is the above 
bpf_get_cgroup_classid_proto necessary?
The cg_skb hook must have a skb->sk.

Please add a selftest and tag the subject with bpf-next.

pw-bot: cr

>   #endif
>   	default:
>   		return sk_filter_func_proto(func_id, prog);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ