lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 6 Aug 2022 01:26:50 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Chao Gao <chao.gao@...el.com>
Cc:     iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
        hch@...radead.org, m.szyprowski@...sung.com, robin.murphy@....com,
        konrad.wilk@...cle.com, jxgao@...gle.com
Subject: Re: [PATCH] swiotlb: avoid potential left shift overflow

On Fri, Aug 05, 2022 at 07:44:38PM +0800, Chao Gao wrote:
> The second operand passed to slot_addr() is declared as int or unsigned int
> in all call sites. The left-shift to get the offset of a slot can overflow
> if swiotlb size is larger than 4G.
> 
> Fixes: 26a7e094783d ("swiotlb: refactor swiotlb_tbl_map_single")
> Signed-off-by: Chao Gao <chao.gao@...el.com>

Can you just convert it to an inline function?  That will take care
of the typing in a much cleaner way than a cast.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ