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

2019-10-18 Thread David Miller
From: Alexei Starovoitov Date: Fri, 18 Oct 2019 16:25:24 -0700 > gmail delivery lags by a day :( Sorry, I'm working on that.

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

2019-10-18 Thread Jakub Kicinski
On Fri, 18 Oct 2019 16:25:24 -0700, Alexei Starovoitov wrote: > 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. Right, adding multiple components with size_t is going to b

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

2019-10-18 Thread Alexei Starovoitov
On Fri, Oct 18, 2019 at 8:36 AM Toke Høiland-Jørgensen 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

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

2019-10-18 Thread Jakub Kicinski
On Fri, 18 Oct 2019 11:15:39 +0200, Toke Høiland-Jørgensen wrote: > Jakub Kicinski writes: > > > On Thu, 17 Oct 2019 12:57:02 +0200, Toke Høiland-Jørgensen wrote: > >> Tetsuo pointed out that without an explicit cast, the cost calculation for > >> devmap_hash type maps could overflow on 32-bit

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

2019-10-18 Thread Yonghong Song
On 10/17/19 3:57 AM, Toke Høiland-Jørgensen 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

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

2019-10-18 Thread Toke Høiland-Jørgensen
Jakub Kicinski writes: > On Thu, 17 Oct 2019 12:57:02 +0200, Toke Høiland-Jørgensen 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 d

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

2019-10-17 Thread Jakub Kicinski
On Thu, 17 Oct 2019 12:57:02 +0200, Toke Høiland-Jørgensen 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

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

2019-10-17 Thread Toke Høiland-Jørgensen
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 Signed-off-by: Toke