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:   Thu, 31 May 2018 01:06:53 +0200
From:   Luc Van Oostenryck <luc.vanoostenryck@...il.com>
To:     Andreas Färber <afaerber@...e.de>
Cc:     Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Michal Marek <michal.lkml@...kovi.net>,
        Richard Henderson <rth@...ddle.net>,
        Ivan Kokshaysky <ink@...assic.park.msu.ru>,
        Matt Turner <mattst88@...il.com>,
        Russell King <linux@...linux.org.uk>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will.deacon@....com>,
        Tony Luck <tony.luck@...el.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Ralf Baechle <ralf@...ux-mips.org>,
        James Hogan <jhogan@...nel.org>,
        "James E . J . Bottomley" <jejb@...isc-linux.org>,
        Helge Deller <deller@....de>,
        "David S . Miller" <davem@...emloft.net>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H . Peter Anvin" <hpa@...or.com>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Brendan Higgins <brendanhiggins@...gle.com>,
        Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
        Cao jin <caoj.fnst@...fujitsu.com>,
        Nicolas Pitre <nicolas.pitre@...aro.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>, linux-alpha@...r.kernel.org,
        "moderated list:ARM/Allwinner sunXi SoC support" 
        <linux-arm-kernel@...ts.infradead.org>, linux-ia64@...r.kernel.org,
        linux-mips@...ux-mips.org, linux-parisc@...r.kernel.org,
        sparclinux@...r.kernel.org, Randy Dunlap <rdunlap@...radead.org>,
        Christoph Hellwig <hch@...radead.org>,
        Rob Landley <rob@...dley.net>
Subject: Re: [PATCH] kbuild: add machine size to CHEKCFLAGS

On Thu, May 31, 2018 at 12:00 AM, Andreas Färber <afaerber@...e.de> wrote:
> Hi Luc,
>
> The typo in the subject made me curious...
>
> Am 30.05.2018 um 22:48 schrieb Luc Van Oostenryck:
>> By default, sparse assumes a 64bit machine when compiled on x86-64
>> and 32bit when compiled on anything else.
>>
>> This can of course create all sort of problems for the other archs, like
>> issuing false warnings ('shift too big (32) for type unsigned long'), or
>> worse, failing to emit legitimate warnings.
>>
>> Fix this by adding the -m32/-m64 flag, depending on CONFIG_64BIT,
>> to CHECKFLAGS in the main Makefile (and so for all archs).
>> Also, remove the now unneeded -m32/-m64 in arch specific Makefiles.
>>
>> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
>> ---
>>  Makefile             | 3 +++
>>  arch/alpha/Makefile  | 2 +-
>>  arch/arm/Makefile    | 2 +-
>>  arch/arm64/Makefile  | 2 +-
>>  arch/ia64/Makefile   | 2 +-
>>  arch/mips/Makefile   | 3 ---
>>  arch/parisc/Makefile | 2 +-
>>  arch/sparc/Makefile  | 2 +-
>>  arch/x86/Makefile    | 2 +-
>>  9 files changed, 10 insertions(+), 10 deletions(-)
>
> What about the architectures not touched by your patch that previously
> had no -m32/-m64? (arc, c6x, h8300, hexagon, m68k, microblaze, nds32,
> nios2, openrisc, powerpc, riscv, s390, sh, unicore32, xtensa)

As explained in the patch, by default sparse uses -m64 if compiled on x86-64
and 32bit on everything else (well, more recent versions use -m64 if
compiled on any 64 bit machine). I think that most ppc devs use a ppc
machine and so ppc was most probably fine (at least ppc64) but I suspect
that most of these others archs either had never sparse used on them
or had a lot of wrong warnings. IOW, it was maybe OK but most probably
incorrect for them and now it is OK.

> You forgot to CC them on this patch.

I didn't thought/knew  it was needed and the CC list is already
quite long but, if needed, no problem for me.

> Have you really checked that all their toolchains support the -m32/-m64
> flags you newly introduce for them? Apart from non-biarch architectures,
> I'm thinking of 31-bit s390 as a corner case where !64 != 32.

Hmm, there is no change to anything I call 'toolchain related', like
compiler and linker. The only change is sparse (or any other checker)
receiving now a correct and explicit -m32 or -m64.

For s390, as far as I know:
1) it has CONFIG_64BIT unconditionally definee (because the old 31bit
   is no more supported, now everything is s390x only).
2) even if the *address space* was only 31 bit, I'm very sure
   that sizeof(long) and sizeof(void*) was 4 on these machine
   hence -m32 would have been correct.

Best regards,
-- Luc

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ