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]
Message-Id: <20181022.193049.377279605490719384.davem@davemloft.net>
Date:   Mon, 22 Oct 2018 19:30:49 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     natechancellor@...il.com
Cc:     isdn@...ux-pingi.de, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mISDN: Fix type of switch control variable in
 ctrl_teimanager

From: Nathan Chancellor <natechancellor@...il.com>
Date: Fri, 19 Oct 2018 11:00:30 -0700

> Clang warns (trimmed for brevity):
> 
> drivers/isdn/mISDN/tei.c:1193:7: warning: overflow converting case value
> to switch condition type (2147764552 to 18446744071562348872) [-Wswitch]
>         case IMHOLD_L1:
>              ^
> drivers/isdn/mISDN/tei.c:1187:7: warning: overflow converting case value
> to switch condition type (2147764550 to 18446744071562348870) [-Wswitch]
>         case IMCLEAR_L2:
>              ^
> 2 warnings generated.
> 
> The root cause is that the _IOC macro can generate really large numbers,
> which don't find into type int. My research into how GCC and Clang are
> handling this at a low level didn't prove fruitful and surveying the
> kernel tree shows that aside from here and a few places in the scsi
> subsystem, everything that uses _IOC is at least of type 'unsigned int'.
> Make that change here because as nothing in this function cares about
> the signedness of the variable and it removes ambiguity, which is never
> good when dealing with compilers.
> 
> While we're here, remove the unnecessary local variable ret (just return
> -EINVAL and 0 directly).
> 
> Link: https://github.com/ClangBuiltLinux/linux/issues/67
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>

Applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ