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  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, 17 Oct 2021 12:17:32 -0700
From:   Randy Dunlap <>
To:     Arnd Bergmann <>
Cc:     Linux Kernel Mailing List <>,
        linux-arch <>,
        Geert Uytterhoeven <>,
        linux-m68k <>
Subject: Re: [PATCH] asm-generic: bug.h: add unreachable() in BUG() for
 CONFIG_BUG not set

On 10/17/21 12:09 PM, Arnd Bergmann wrote:
> On Sun, Oct 17, 2021 at 7:49 PM Randy Dunlap <> wrote:
>> When CONFIG_BUG is not set/enabled, there is a warning
>> on ARCH=m68k, gcc version 11.1.0-nolibc from Arnd's crosstools:
>> ../fs/afs/dir.c: In function 'afs_dir_set_page_dirty':
>> ../fs/afs/dir.c:51:1: error: no return statement in function returning non-void [-Werror=return-type]
>> Adding "unreachable()" in the BUG() macro silences the warning.
> No, I don't think this is the right solution:
>> -#define BUG() do {} while (1)
>> +#define BUG() do {unreachable();} while (1)
> Marking this code unreachable() means the compiler is free
> to assume any code path leading here will never be entered,
> which leads to additional undefined behavior and other warnings
> rather than just hanging reproducibly.
> The endless loop here should normally be sufficient to tell the
> compiler that the function never returns, so it sounds like a
> problem in gcc for m68k.

Sounds likely.

> Did you see any other issues like this one on m68k, or the
> same one on another architecture?

No and no.


Powered by blists - more mailing lists