Thread (8 messages) 8 messages, 5 authors, 2019-10-19

Re: [PATCH bpf] xdp: Prevent overflow in devmap_hash cost calculation for 32-bit builds

From: Alexei Starovoitov <hidden>
Date: 2019-10-18 23:25:38
Also in: bpf

On Fri, Oct 18, 2019 at 8:36 AM Toke Høiland-Jørgensen [off-list ref] wrote:
Tetsuo pointed out that without an explicit cast, the cost calculation for
devmap_hash type maps could overflow on 32-bit builds. This adds the
missing cast.

Fixes: 6f9d451ab1a3 ("xdp: Add devmap_hash map type for looking up devices by hashed index")
Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Toke Høiland-Jørgensen <redacted>
gmail delivery lags by a day :(
I applied this patch along with Yonghong's ack to bpf tree
(though I don't have it in my mail box, but it's there in patchworks).

I'm not sure that cleanup Jakub is proposing is possible or better.
Not everything is array_size here and in other places
where cost is computed. u64 is imo much cleaner.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help