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: <20250520045922.34528-1-kuniyu@amazon.com>
Date: Mon, 19 May 2025 21:58:58 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <jiang.kun2@....com.cn>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <fan.yu9@....com.cn>,
	<gnaaman@...venets.com>, <he.peilin@....com.cn>, <horms@...nel.org>,
	<kuba@...nel.org>, <kuniyu@...zon.com>, <leitao@...ian.org>,
	<linux-kernel@...r.kernel.org>, <lizetao1@...wei.com>,
	<netdev@...r.kernel.org>, <pabeni@...hat.com>, <qiu.yutan@....com.cn>,
	<tu.qiang35@....com.cn>, <wang.yaxin@....com.cn>, <xu.xin16@....com.cn>,
	<yang.yang29@....com.cn>, <ye.xingchen@....com.cn>, <zhang.yunkai@....com.cn>
Subject: Re: [PATCH linux next] net: neigh: use kfree_skb_reason() in neigh_resolve_output()

From: <jiang.kun2@....com.cn>
Date: Tue, 20 May 2025 10:44:13 +0800 (CST)
> From: Qiu Yutan <qiu.yutan@....com.cn>
> 
> Replace kfree_skb() used in neigh_resolve_output() with kfree_skb_reason().
> 
> Following new skb drop reason is added:
> /* failed to fill the device hard header */
> SKB_DROP_REASON_NEIGH_HH_FILLFAIL
> 
> Signed-off-by: Qiu Yutan <qiu.yutan@....com.cn>
> Signed-off-by: Jiang Kun <jiang.kun2@....com.cn>
> ---
>  include/net/dropreason-core.h | 3 +++
>  net/core/neighbour.c          | 2 +-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/include/net/dropreason-core.h b/include/net/dropreason-core.h
> index bea77934a235..bcf9d7467e1a 100644
> --- a/include/net/dropreason-core.h
> +++ b/include/net/dropreason-core.h
> @@ -62,6 +62,7 @@
>  	FN(NEIGH_FAILED)		\
>  	FN(NEIGH_QUEUEFULL)		\
>  	FN(NEIGH_DEAD)			\
> +	FN(NEIGH_HH_FILLFAIL)		\
>  	FN(TC_EGRESS)			\
>  	FN(SECURITY_HOOK)		\
>  	FN(QDISC_DROP)			\
> @@ -348,6 +349,8 @@ enum skb_drop_reason {
>  	SKB_DROP_REASON_NEIGH_QUEUEFULL,
>  	/** @SKB_DROP_REASON_NEIGH_DEAD: neigh entry is dead */
>  	SKB_DROP_REASON_NEIGH_DEAD,
> +	/** @SKB_DROP_REASON_NEIGH_HH_FILLFAIL: failed to fill the device hard header */
> +	SKB_DROP_REASON_NEIGH_HH_FILLFAIL,
>  	/** @SKB_DROP_REASON_TC_EGRESS: dropped in TC egress HOOK */
>  	SKB_DROP_REASON_TC_EGRESS,
>  	/** @SKB_DROP_REASON_SECURITY_HOOK: dropped due to security HOOK */
> diff --git a/net/core/neighbour.c b/net/core/neighbour.c
> index 254067b719da..f297296c1a43 100644
> --- a/net/core/neighbour.c
> +++ b/net/core/neighbour.c
> @@ -1517,7 +1517,7 @@ int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb)
>  	return rc;
>  out_kfree_skb:
>  	rc = -EINVAL;
> -	kfree_skb(skb);
> +	kfree_skb_reason(skb, SKB_DROP_REASON_NEIGH_HH_FILLFAIL);

Is there any reason you don't change neigh_connected_output() ?


If you respin, please specify net-next and the patch version in

Subject: [PATCH v2 net-next] net: neighbour: ...


>  	goto out;
>  }
>  EXPORT_SYMBOL(neigh_resolve_output);
> -- 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ