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: <20211215233517.4cpiqqvlvxgd3qek@black.fi.intel.com>
Date:   Thu, 16 Dec 2021 02:35:17 +0300
From:   "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
        dave.hansen@...el.com, luto@...nel.org, peterz@...radead.org,
        sathyanarayanan.kuppuswamy@...ux.intel.com, aarcange@...hat.com,
        ak@...ux.intel.com, dan.j.williams@...el.com, david@...hat.com,
        hpa@...or.com, jgross@...e.com, jmattson@...gle.com,
        joro@...tes.org, knsathya@...nel.org, pbonzini@...hat.com,
        sdeep@...are.com, seanjc@...gle.com, tony.luck@...el.com,
        vkuznets@...hat.com, wanpengli@...cent.com, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 02/26] x86/tdx: Extend the cc_platform_has() API to
 support TDX guests

On Wed, Dec 15, 2021 at 03:19:04PM -0800, Josh Poimboeuf wrote:
> On Tue, Dec 14, 2021 at 06:02:40PM +0300, Kirill A. Shutemov wrote:
> > --- a/arch/x86/kernel/Makefile
> > +++ b/arch/x86/kernel/Makefile
> > @@ -22,6 +22,7 @@ CFLAGS_REMOVE_early_printk.o = -pg
> >  CFLAGS_REMOVE_head64.o = -pg
> >  CFLAGS_REMOVE_sev.o = -pg
> >  CFLAGS_REMOVE_cc_platform.o = -pg
> > +CFLAGS_REMOVE_tdx.o = -pg
> >  endif
> >  
> >  KASAN_SANITIZE_head$(BITS).o				:= n
> > @@ -31,6 +32,7 @@ KASAN_SANITIZE_stacktrace.o				:= n
> >  KASAN_SANITIZE_paravirt.o				:= n
> >  KASAN_SANITIZE_sev.o					:= n
> >  KASAN_SANITIZE_cc_platform.o				:= n
> > +KASAN_SANITIZE_tdx.o					:= n
> >  
> >  # With some compiler versions the generated code results in boot hangs, caused
> >  # by several compilation units. To be safe, disable all instrumentation.
> > @@ -50,6 +52,7 @@ KCOV_INSTRUMENT		:= n
> >  
> >  CFLAGS_head$(BITS).o	+= -fno-stack-protector
> >  CFLAGS_cc_platform.o	+= -fno-stack-protector
> > +CFLAGS_tdx.o		+= -fno-stack-protector
> >  
> >  CFLAGS_irq.o := -I $(srctree)/$(src)/../include/asm/trace
> 
> Don't these Makefile changes belong in patch 1, which adds tdx.c?

Removing of the instrumentation is required because is_tdx_guest() is
called from cc_platform_has().

Commit message tries to communicate this:

	Since is_tdx_guest() function (through cc_platform_has() API) is used in
	the early boot code, disable the instrumentation flags and function
	tracer. This is similar to AMD SEV and cc_platform.c.

-- 
 Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ