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]
Date:   Fri, 8 May 2020 11:11:02 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Christine Caulfield <ccaulfie@...hat.com>,
        David Teigland <teigland@...hat.com>,
        Steve Whitehouse <swhiteho@...hat.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        clang-built-linux <clang-built-linux@...glegroups.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Alexios Zavras <alexios.zavras@...el.com>,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        Richard Fontana <rfontana@...hat.com>,
        cluster-devel@...hat.com, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] dlm: remove BUG() before panic()

On Thu, May 7, 2020 at 2:34 PM Arnd Bergmann <arnd@...db.de> wrote:
>
> Building a kernel with clang sometimes fails with an objtool error in dlm:
>
> fs/dlm/lock.o: warning: objtool: revert_lock_pc()+0xbd: can't find jump dest instruction at .text+0xd7fc
>
> The problem is that BUG() never returns and the compiler knows
> that anything after it is unreachable, however the panic still
> emits some code that does not get fully eliminated.
>
> Having both BUG() and panic() is really pointless as the BUG()
> kills the current process and the subsequent panic() never hits.
> In most cases, we probably don't really want either and should
> replace the DLM_ASSERT() statements with WARN_ON(), as has
> been done for some of them.
>
> Remove the BUG() here so the user at least sees the panic message
> and we can reliably build randconfig kernels.
>
> Fixes: e7fd41792fc0 ("[DLM] The core of the DLM for GFS2/CLVM")
> Cc: Josh Poimboeuf <jpoimboe@...hat.com>
> Cc: clang-built-linux@...glegroups.com
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Thanks for the patch.
Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>

> ---
>  fs/dlm/dlm_internal.h | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
> index 416d9de35679..4311d01b02a8 100644
> --- a/fs/dlm/dlm_internal.h
> +++ b/fs/dlm/dlm_internal.h
> @@ -97,7 +97,6 @@ do { \
>                 __LINE__, __FILE__, #x, jiffies); \
>      {do} \
>      printk("\n"); \
> -    BUG(); \
>      panic("DLM:  Record message above and reboot.\n"); \
>    } \
>  }
> --
> 2.26.0


-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ