All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nf-next] netfilter: nf_tables: fix debug splat when dumping pipapo avx2 set
@ 2025-04-23 15:16 Florian Westphal
  2025-04-23 20:55 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2025-04-23 15:16 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Florian Westphal

debug kernel gives:
 ------------[ cut here ]------------
 WARNING: CPU: 3 PID: 265 at net/netfilter/nf_tables_api.c:4780 nf_tables_fill_set_info+0x1c8/0x210 [nf_tables]
 Modules linked in: nf_tables
 CPU: 3 UID: 0 PID: 265 Comm: nft Not tainted 6.15.0-rc2-virtme #1 PREEMPT(full)
 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
 RIP: 0010:nf_tables_fill_set_info+0x1c8/0x210 [nf_tables]

... because '%ps' includes the module name, so the output
string is truncated.

Fixes: 2cbe307c6046 ("netfilter: nf_tables: export set count and backend name to userspace")
Signed-off-by: Florian Westphal <fw@strlen.de>
---
 You can squash merge this if you prefer.

 net/netfilter/nf_tables_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 90e73462fb69..b28f6730e26d 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -4769,7 +4769,7 @@ static noinline_for_stack int
 nf_tables_fill_set_info(struct sk_buff *skb, const struct nft_set *set)
 {
 	unsigned int nelems;
-	char str[32];
+	char str[40];
 	int ret;
 
 	ret = snprintf(str, sizeof(str), "%ps", set->ops);
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH nf-next] netfilter: nf_tables: fix debug splat when dumping pipapo avx2 set
  2025-04-23 15:16 [PATCH nf-next] netfilter: nf_tables: fix debug splat when dumping pipapo avx2 set Florian Westphal
@ 2025-04-23 20:55 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2025-04-23 20:55 UTC (permalink / raw)
  To: Florian Westphal; +Cc: netfilter-devel

On Wed, Apr 23, 2025 at 05:16:59PM +0200, Florian Westphal wrote:
> debug kernel gives:
>  ------------[ cut here ]------------
>  WARNING: CPU: 3 PID: 265 at net/netfilter/nf_tables_api.c:4780 nf_tables_fill_set_info+0x1c8/0x210 [nf_tables]
>  Modules linked in: nf_tables
>  CPU: 3 UID: 0 PID: 265 Comm: nft Not tainted 6.15.0-rc2-virtme #1 PREEMPT(full)
>  Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
>  RIP: 0010:nf_tables_fill_set_info+0x1c8/0x210 [nf_tables]
> 
> ... because '%ps' includes the module name, so the output
> string is truncated.

I will squash this, thanks.

> Fixes: 2cbe307c6046 ("netfilter: nf_tables: export set count and backend name to userspace")
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---
>  You can squash merge this if you prefer.
> 
>  net/netfilter/nf_tables_api.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
> index 90e73462fb69..b28f6730e26d 100644
> --- a/net/netfilter/nf_tables_api.c
> +++ b/net/netfilter/nf_tables_api.c
> @@ -4769,7 +4769,7 @@ static noinline_for_stack int
>  nf_tables_fill_set_info(struct sk_buff *skb, const struct nft_set *set)
>  {
>  	unsigned int nelems;
> -	char str[32];
> +	char str[40];
>  	int ret;
>  
>  	ret = snprintf(str, sizeof(str), "%ps", set->ops);
> -- 
> 2.49.0
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-23 20:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-23 15:16 [PATCH nf-next] netfilter: nf_tables: fix debug splat when dumping pipapo avx2 set Florian Westphal
2025-04-23 20:55 ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.