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] [day] [month] [year] [list]
Message-ID: <20211014062049.1cf8e1b5@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Thu, 14 Oct 2021 06:20:49 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Simon Horman <simon.horman@...igine.com>
Cc:     David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
        oss-drivers@...igine.com, Yu Xiao <yu.xiao@...igine.com>,
        Yinjun Zhang <yinjun.zhang@...igine.com>,
        Niklas Soderlund <niklas.soderlund@...igine.com>
Subject: Re: [PATCH net] nfp: bpf: relax prog rejection for mtu check
 through max_pkt_offset

On Thu, 14 Oct 2021 14:09:48 +0200 Simon Horman wrote:
>  nfp_bpf_check_mtu(struct nfp_app *app, struct net_device *netdev, int new_mtu)
>  {
>  	struct nfp_net *nn = netdev_priv(netdev);
> -	unsigned int max_mtu;
>  
>  	if (~nn->dp.ctrl & NFP_NET_CFG_CTRL_BPF)
>  		return 0;

This check only implies BPF is loaded..

> -	max_mtu = nn_readb(nn, NFP_NET_CFG_BPF_INL_MTU) * 64 - 32;
> -	if (new_mtu > max_mtu) {
> -		nn_info(nn, "BPF offload active, MTU over %u not supported\n",
> -			max_mtu);
> +	if (nfp_bpf_offload_check_mtu(nn, nn->xdp_hw.prog, new_mtu)) {

yet here you assume the BPF loaded is XDP. NFP also supports offloading
TC/cls_bpf programs.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ