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]
Message-ID: <rqeb4kmyjdsmkng6aaxcjqkokwlykgunzy35kevpla5hfugglc@rrsjmgex7isg>
Date: Mon, 17 Mar 2025 17:05:22 -0700
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Ingo Molnar <mingo@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-tip-commits@...r.kernel.org, 
	"Peter Zijlstra (Intel)" <peterz@...radead.org>, x86@...nel.org, Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [tip: objtool/core] objtool: Add CONFIG_OBJTOOL_WERROR

On Mon, Mar 17, 2025 at 10:27:12PM +0100, Ingo Molnar wrote:
> > +config OBJTOOL_WERROR
> > +	bool "Upgrade objtool warnings to errors"
> > +	depends on OBJTOOL && !COMPILE_TEST
> > +	help
> > +	  Fail the build on objtool warnings.
> > +
> > +	  Objtool warnings can indicate kernel instability, including boot
> > +	  failures.  This option is highly recommended.
> > +
> > +	  If unsure, say Y.
> 
> My randconfig build tests found this failure of 36 warnings upgraded to 
> a build failure:
> 
>    vmlinux.o: error: objtool: 36 warning(s) upgraded to errors

Hm, I'm actually surprised randconfig doesn't set COMPILE_TEST.

Anyway, the warnings are valid:

  vmlinux.o: error: objtool: do_syscall_64+0x40: call to ftrace_likely_update() leaves .noinstr.text section
  vmlinux.o: error: objtool: do_int80_emulation+0x30: call to ftrace_likely_update() leaves .noinstr.text section
  vmlinux.o: error: objtool: do_fast_syscall_32+0x7b: call to ftrace_likely_update() leaves .noinstr.text section
  ...

Those are triggered by CONFIG_TRACE_BRANCH_PROFILING which adds a
function call to ftrace_likely_update() for every likely() / unlikely().
Which obliterates the noinstr rules.

Steven, do you still want to keep that config option?

If so, I suppose we could make OBJTOOL_WERROR depend on
!TRACE_BRANCH_PROFILING.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ