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]
Date:   Tue, 21 Dec 2021 16:10:31 +0100
From:   Marco Elver <elver@...gle.com>
To:     Carel Si <beibei.si@...el.com>
Cc:     Borislav Petkov <bp@...e.de>,
        "Yin, Fengwei" <fengwei.yin@...el.com>,
        Joerg Roedel <jroedel@...e.de>,
        LKML <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "lkp@...ts.01.org" <lkp@...ts.01.org>, lkp <lkp@...el.com>,
        "bfields@...ldses.org" <bfields@...ldses.org>,
        "llvm@...ts.linux.dev" <llvm@...ts.linux.dev>
Subject: Re: [LKP] Re: [x86/mm/64] f154f29085: BUG:kernel_reboot-without-warning_in_boot_stage
 - clang KCOV?

On Tue, 21 Dec 2021 at 15:34, Carel Si <beibei.si@...el.com> wrote:
>
> Hi Boris,
>
> On Fri, Dec 17, 2021 at 08:52:53PM +0800, Borislav Petkov wrote:
> > ---
> > diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> > index 0083464de5e3..79b3d67addcc 100644
> > --- a/arch/x86/kernel/cpu/common.c
> > +++ b/arch/x86/kernel/cpu/common.c
> > @@ -384,7 +384,7 @@ void native_write_cr0(unsigned long val)
> >  }
> >  EXPORT_SYMBOL(native_write_cr0);
> >
> > -void native_write_cr4(unsigned long val)
> > +void __no_profile native_write_cr4(unsigned long val)
> >  {
> >       unsigned long bits_changed = 0;
> >
> > diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
> > index 75acb6027a87..68d2b7f9a913 100644
> > --- a/arch/x86/kernel/head64.c
> > +++ b/arch/x86/kernel/head64.c
> > @@ -483,7 +483,7 @@ asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data)
> >       /* Kill off the identity-map trampoline */
> >       reset_early_page_tables();
> >
> > -     __native_tlb_flush_global(native_read_cr4());
> > +     __native_tlb_flush_global(this_cpu_read(cpu_tlbstate.cr4));
> >
> >       clear_bss();

Also double-check the Makefile-based solution: the Makefiles in both
directories already contain various KCOV_INSTRUMENT/K*SAN_SANITIZE :=
n, so perhaps adding GCOV_PROFILE or GCOV_PROFILE_whicheverfile.o := n
may be more appropriate should the functions that should not be
instrumented be a moving target, and prone to breakage again in
future.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ