On 12/08/2025 4:06 pm, Roger Pau Monne wrote:
> Signed-off-by: Roger Pau Monné <roger....@citrix.com>

Not this patch, but this is probably the best place to report it.

https://scan5.scan.coverity.com/#/project-view/30554/10426?selectedIssue=1662707

Something you did in the series made enough changes in
pfn_pdx_compression_setup() for Coverity to start reporting an issue in
some decade-old code.

The complaint is on line:

277    ma_va_bottom_mask   = (PAGE_SIZE << bottom_shift) - 1;
CID 1662707: (#1 of 1): Bad bit shift operation (BAD_SHIFT)

34. large_shift: In expression 0x1000 << bottom_shift, left shifting by more 
than 31 bits
has undefined behavior. The shift amount, bottom_shift, is as much as 63.


The relevant part of earlier analysis seems to be the "i >=
BITS_PER_LONG" check in the order loop, causing Coverity to think that i
can be up to 63.

~Andrew

Reply via email to