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] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 22 Apr 2018 21:41:50 -1000
From:   Joey Pabalinas <joeypabalinas@...il.com>
To:     Luciano Coelho <luciano.coelho@...el.com>
Cc:     Kalle Valo <kvalo@...eaurora.org>,
        Joey Pabalinas <joeypabalinas@...il.com>,
        Kees Cook <keescook@...omium.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org
Subject: Re: New sparse warning from min_t(): expression using sizeof(void)

On Mon, Apr 23, 2018 at 09:20:14AM +0300, Luciano Coelho wrote:
> Thanks, this solves the problem for me, but I'm still getting a lot of
> this:
> 
> ./include/linux/mm.h:533:24: warning: constant 0xffffc90000000000 is so big it is unsigned long
> 
> Is there a patch in sparse to solve this one as well? Or is this an
> actual error that must be fixed in mm.h?

This is definitely a valid warning in the general case (integer promotion
rules can cause *incredibly* difficult to find bugs if you overlook them,
so it's very useful to get a warning when a promotion occurs implicitly to
integer constants).

In this case though, you are comparing it against `unsigned long addr`
which is exactly the same type, so there's no bug.

It could possibly be argued that in:

> arch/x86/include/asm/pgtable_64_types.h:122: # define VMALLOC_START __VMALLOC_BASE_L4
> arch/x86/include/asm/pgtable_64_types.h:108: #define __VMALLOC_BASE_L4 0xffffc90000000000

__VMALLOC_BASE_L4 would be better written as 0xffffc90000000000UL, which would
indeed shut up sparse.

-- 
Cheers,
Joey Pabalinas

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ