Thread (6 messages) 6 messages, 4 authors, 2023-09-29

Re: [PATCH][next] net: sched: cls_u32: Fix allocation in u32_init()

From: Jakub Kicinski <kuba@kernel.org>
Date: 2023-08-21 18:58:16
Also in: linux-hardening, lkml

On Mon, 21 Aug 2023 10:35:29 -0400 Jamal Hadi Salim wrote:
quoted
Sure, but why are you doing this? And how do you know the change is
correct?

There are 2 other instances where we allocate 1 entry or +1 entry.
Are they not all wrong?

Also some walking code seems to walk <= divisor, divisor IIUC being
the array bound - 1?

Jamal acked so changes are this is right, but I'd really like to
understand what's going on, and I shouldn't have to ask you all
these questions :S  
This is a "bug fix" given that the structure had no zero array
construct as was implied by d61491a51f7e . I didnt want to call it out
as a bug fix (for -net) because existing code was not harmful but
allocated extra memory which this patch gives back.
The other instances have a legit need for "flexible array".
Based on the link provided it seems like the Fixes comes in because
someone reported compilation issues. But from the thread it seems
like the problem only appears when sizeof_struct() is modified.
In which case - you're right, Fixes and Reported-by tags should go.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help