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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 18, 2019 at 8:36 AM Toke Høiland-Jørgensen <toke@xxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx>

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.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux