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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250130082532.mvfz5v2ikqixtesc@jpoimboe>
Date: Thu, 30 Jan 2025 00:25:32 -0800
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Yonghong Song <yonghong.song@...ux.dev>
Cc: Peter Zijlstra <peterz@...radead.org>, Song Liu <song@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Kernel Team <kernel-team@...com>
Subject: Re: objtool failure caused some kernel functionality not working

On Wed, Jan 29, 2025 at 11:10:14PM -0800, Yonghong Song wrote:
> The llvm18 does not have issues. I tried to bisect what changed in llvm19 and
> found the following llvm patch is responsible:
> 
> https://github.com/llvm/llvm-project/pull/96089
> 
> Basically, the compiler might be able to create a jump target which actually
> not possible at runtime. For example, in one of examples in the above llvm patch, something
> like
>    if i >= 3 goto out;  /* i unsigned */
>    switch i, label default_unreachable:
>      case 0:  goto label1;
>      case 1:  goto label2;
>      case 2:  goto label3;
>    label1: ...; return;
>    label2: ...; return;
>    label3: ...; return;
>    default_unreachable:
> 
> I think that this should be a valid code from compiler perspective.
> 
> Can we fix objtool to handle jump target which is immediately after the func body?Thanks, Yonghong

I actually have a fix for that, can you try this?

  https://git.kernel.org/pub/scm/linux/kernel/git/jpoimboe/linux.git/commit/?h=objtool/core&id=fbb454b7bb39955c324693e73a5cf7e448632553

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ