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: <20241123030915.GA1020125@thelio-3990X>
Date: Fri, 22 Nov 2024 20:09:15 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Wentao Zhang <wentaoz5@...inois.edu>, Matt.Kelly2@...ing.com,
	akpm@...ux-foundation.org, andrew.j.oppelt@...ing.com,
	anton.ivanov@...bridgegreys.com, ardb@...nel.org, arnd@...db.de,
	bhelgaas@...gle.com, bp@...en8.de, chuck.wolber@...ing.com,
	dave.hansen@...ux.intel.com, dvyukov@...gle.com, hpa@...or.com,
	jinghao7@...inois.edu, johannes@...solutions.net,
	jpoimboe@...nel.org, justinstitt@...gle.com, kees@...nel.org,
	kent.overstreet@...ux.dev, linux-arch@...r.kernel.org,
	linux-efi@...r.kernel.org, linux-kbuild@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
	linux-um@...ts.infradead.org, llvm@...ts.linux.dev, luto@...nel.org,
	marinov@...inois.edu, masahiroy@...nel.org, maskray@...gle.com,
	mathieu.desnoyers@...icios.com, matthew.l.weber3@...ing.com,
	mhiramat@...nel.org, mingo@...hat.com, morbo@...gle.com,
	ndesaulniers@...gle.com, oberpar@...ux.ibm.com, paulmck@...nel.org,
	richard@....at, rostedt@...dmis.org, samitolvanen@...gle.com,
	samuel.sarkisian@...ing.com, steven.h.vanderleest@...ing.com,
	tglx@...utronix.de, tingxur@...inois.edu, tyxu@...inois.edu,
	x86@...nel.org
Subject: Re: [PATCH v2 0/4] Enable measuring the kernel's Source-based Code
 Coverage and MC/DC with Clang

On Fri, Nov 22, 2024 at 01:27:03PM +0100, Peter Zijlstra wrote:
> On Thu, Oct 03, 2024 at 04:29:38PM -0700, Nathan Chancellor wrote:
> 
> > $ /usr/bin/time -v make -skj"$(nproc)" ARCH=x86_64 LLVM=1 mrproper {def,amd_mem_encrypt.,fortify_source.,llvm_cov.}config bzImage
> > ...
> > vmlinux.o: warning: objtool: __sev_es_nmi_complete+0x6e: call to kasan_check_write() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: do_syscall_64+0x141: call to lockdep_hardirqs_off() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: do_int80_emulation+0x138: call to lockdep_hardirqs_off() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: handle_bug+0x5: call to kmsan_unpoison_entry_regs() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: syscall_enter_from_user_mode_prepare+0x105: call to lockdep_hardirqs_off() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: syscall_exit_to_user_mode+0x73: call to user_enter_irqoff() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: irqentry_enter_from_user_mode+0x105: call to lockdep_hardirqs_off() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: irqentry_exit_to_user_mode+0x62: call to user_enter_irqoff() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: irqentry_enter+0x45: call to lockdep_hardirqs_off() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: irqentry_exit+0x4a: call to lockdep_hardirqs_on() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: irqentry_nmi_enter+0x4: call to lockdep_off() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: irqentry_nmi_exit+0x67: call to lockdep_on() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: enter_s2idle_proper+0xb5: call to lockdep_hardirqs_off() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: cpuidle_enter_state+0x113: call to lockdep_hardirqs_off() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: default_idle_call+0xad: call to lockdep_hardirqs_on() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: cpu_idle_poll+0x29: call to lockdep_hardirqs_on() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: acpi_idle_enter_bm+0x118: call to lockdep_hardirqs_on() leaves .noinstr.text section
> > vmlinux.o: warning: objtool: acpi_idle_do_entry+0x4: call to perf_lopwr_cb() leaves .noinstr.text section
> 
> Just saw this fly by, that looks like something is buggered bad. Notably
> lockdep_hardirqs_{on,off}() are noinstr.
> 
> Is this patch-set causing this, or what?

These warnings are not present without CONFIG_LLVM_COV_PROFILE_ALL, so
it certainly seems related to this patchset. In this configuration,
CONFIG_KASAN and CONFIG_LOCKDEP are disabled, so these functions are
simple 'static inline' functions. An immediate theory is that because
this instrumentation is applied by the frontend, these functions will
not actually be empty or simple, which may affect the ability to inline
them and eliminate the instrumentation by the __no_profile from noinstr?
It definitely seems like this should probably be investigated...

Cheers,
Nathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ