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: <d45ccb47-1bd1-8078-04c1-81a6f5f5c062@huawei.com>
Date:   Wed, 28 Sep 2022 09:05:30 +0800
From:   shangxiaojing <shangxiaojing@...wei.com>
To:     <simon.horman@...igine.com>, <kuba@...nel.org>,
        <davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>,
        <ast@...nel.org>, <daniel@...earbox.net>, <hawk@...nel.org>,
        <john.fastabend@...il.com>, <niklas.soderlund@...igine.com>,
        <oss-drivers@...igine.com>, <netdev@...r.kernel.org>
Subject: Re: [PATCH -next v2] nfp: Use skb_put_data() instead of
 skb_put/memcpy pair



On 2022/9/27 22:18, Shang XiaoJing wrote:
> Use skb_put_data() instead of skb_put() and memcpy(), which is clear.
> 
> Signed-off-by: Shang XiaoJing <shangxiaojing@...wei.com>
> ---
> changes in v2:
> - no change
> ---
>   drivers/net/ethernet/netronome/nfp/nfd3/xsk.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/netronome/nfp/nfd3/xsk.c b/drivers/net/ethernet/netronome/nfp/nfd3/xsk.c
> index 65e243168765..5d9db8c2a5b4 100644
> --- a/drivers/net/ethernet/netronome/nfp/nfd3/xsk.c
> +++ b/drivers/net/ethernet/netronome/nfp/nfd3/xsk.c
> @@ -84,7 +84,7 @@ static void nfp_nfd3_xsk_rx_skb(struct nfp_net_rx_ring *rx_ring,
>   		nfp_net_xsk_rx_drop(r_vec, xrxbuf);
>   		return;
>   	}
> -	memcpy(skb_put(skb, pkt_len), xrxbuf->xdp->data, pkt_len);
> +	skb_put_data(skb, xrxbuf->xdp->data, pkt_len);
>   
>   	skb->mark = meta->mark;
>   	skb_set_hash(skb, meta->hash, meta->hash_type);

forgot to add the reviewed tag, sorry.

Reviewed-by: Simon Horman <simon.horman@...igine.com>

Thanks,
Shang XiaoJing

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ