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]
Date:   Wed, 26 Jan 2022 12:30:55 -0800
From:   Martin KaFai Lau <kafai@...com>
To:     Pavel Begunkov <asml.silence@...il.com>
CC:     <netdev@...r.kernel.org>, <bpf@...r.kernel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Andrii Nakryiko <andrii@...nel.org>,
        Song Liu <songliubraving@...com>,
        <linux-kernel@...r.kernel.org>, Stanislav Fomichev <sdf@...gle.com>
Subject: Re: [PATCH for-next v4] cgroup/bpf: fast path skb BPF filtering

On Wed, Jan 26, 2022 at 12:22:13AM +0000, Pavel Begunkov wrote:
>  #define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk, skb)			      \
>  ({									      \
>  	int __ret = 0;							      \
> -	if (cgroup_bpf_enabled(CGROUP_INET_INGRESS))		      \
> +	if (cgroup_bpf_enabled(CGROUP_INET_INGRESS) && sk &&		      \
>From reading sk_filter_trim_cap() where this will be called, sk cannot be NULL.
If yes, the new sk test is not needed.

Others lgtm.

> +	    cgroup_bpf_sock_enabled(sk, CGROUP_INET_INGRESS)) 	      \
>  		__ret = __cgroup_bpf_run_filter_skb(sk, skb,		      \
>  						    CGROUP_INET_INGRESS); \
>  									      \

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ