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: <20230807125803.94dfb08402939e0080505a5e@linux-foundation.org>
Date:   Mon, 7 Aug 2023 12:58:03 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Pengfei Xu <pengfei.xu@...el.com>
Cc:     dvyukov@...gle.com, nogikh@...gle.com,
        linux-kernel@...r.kernel.org, Heng Su <heng.su@...el.com>,
        syzkaller@...glegroups.com, keescook@...gle.com, mingo@...e.hu,
        Mehta Sohil <sohil.mehta@...el.com>,
        kirill.shutemov@...ux.intel.com
Subject: Re: [PATCH RESEND v1 1/1] x86/kernel: Increase kcov coverage under
 arch/x86/kernel folder

On Mon, 31 Jul 2023 11:04:18 +0800 Pengfei Xu <pengfei.xu@...el.com> wrote:

> Currently kcov instrument is disabled for object files under arch/x86/kernel
> folder.
> For object files under arch/x86/kernel, actually just disabling the kcov
> instrument of files:"head32.o or head64.o and sev.o" could achieve
> successful booting and provide kcov coverage for object files that do not
> disable kcov instrument.
> The additional kcov coverage collected from arch/x86/kernel folder helps
> kernel fuzzing efforts to find bugs.
> 
> Link to related improvement discussion is below:
> https://groups.google.com/g/syzkaller/c/Dsl-RYGCqs8/m/x-tfpTyFBAAJ
> Related ticket is as follow:
> https://bugzilla.kernel.org/show_bug.cgi?id=198443
> 
> ...
>
> --- a/arch/x86/kernel/Makefile
> +++ b/arch/x86/kernel/Makefile
> @@ -33,11 +33,10 @@ KCSAN_SANITIZE := n
>  KMSAN_SANITIZE_head$(BITS).o				:= n
>  KMSAN_SANITIZE_nmi.o					:= n
>  
> -# If instrumentation of this dir is enabled, boot hangs during first second.
> -# Probably could be more selective here, but note that files related to irqs,
> -# boot, dumpstack/stacktrace, etc are either non-interesting or can lead to
> -# non-deterministic coverage.
> -KCOV_INSTRUMENT		:= n
> +# If instrumentation of the following files is enabled, boot hangs during
> +# first second.
> +KCOV_INSTRUMENT_head$(BITS).o				:= n
> +KCOV_INSTRUMENT_sev.o					:= n
>  
>  CFLAGS_irq.o := -I $(srctree)/$(src)/../include/asm/trace

This patch exposes (but probably doesn't cause) an objtool warning:

arch/x86/kernel/traps.o: warning: objtool: ibt_selftest+0x18: sibling call from callable instruction with modified stack frame

gcc-12.2.0, x86_64 allmodconfig.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ