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>] [day] [month] [year] [list]
Date:   Wed, 8 Mar 2023 09:13:04 +0000
From:   David Binderman <dcb314@...mail.com>
To:     David Miller <davem@...emloft.net>,
        "sparclinux@...r.kernel.org" <sparclinux@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: linux-6.3-rc1/arch/sparc/kernel/pcic.c:768: possible problem with
 shift values ?

Hello there,

The source code is

static inline unsigned long get_irqmask(int irq_nr) 
{
    return 1 << irq_nr;
}

That's only going to work correctly for irq_nr < 32. 
If irq_nr gets >= 32, that will wrap around. 
Perhaps the programmer intended

static inline unsigned long get_irqmask(int irq_nr) 
{
    return 1UL << irq_nr;
}

Regards

David Binderman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ