netfilter: nf_tables: fix debug splat when dumping pipapo avx2 set
Subsystems (2)
Florian Westphal
maintainerPATCH 1/1 netfilter: nf_tables: fix debug splat when dumping pipapo avx2 set
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 <[email protected]>
---
You can squash merge this if you prefer.
net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_tables_api.c +1 -1
@@ -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);
Signature · 1 line
2.49.0
Pablo Neira Ayuso
maintainerQuoted 10 lines · 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.
I will squash this, thanks.
Quoted 25 lines
Fixes 2cbe307c6046 ("netfilter: nf_tables: export set count and backend name to userspace")Signed-off-by Florian Westphal <[email protected]>---
You can squash merge this if you prefer.net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/netfilter/nf_tables_api.c +1
-1@@ -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);Signature · 1 line
2.49.0