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] [day] [month] [year] [list]
Message-ID: <YmEoLvEX15l0vmam@zn.tnic>
Date:   Thu, 21 Apr 2022 11:47:26 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Michael Roth <michael.roth@....com>
Cc:     linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
        "H . Peter Anvin" <hpa@...or.com>,
        Kees Cook <keescook@...omium.org>,
        "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
        Tony Luck <tony.luck@...el.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Kuppuswamy Sathyanarayanan 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        Tom Lendacky <thomas.lendacky@....com>,
        Venu Busireddy <venu.busireddy@...cle.com>,
        Joerg Roedel <jroedel@...e.de>,
        Tianyu Lan <Tianyu.Lan@...rosoft.com>,
        Brijesh Singh <brijesh.singh@....com>
Subject: Re: [PATCH v2] x86/sev: get the AP jump table address from secrets
 page

On Wed, Apr 20, 2022 at 09:14:45PM -0500, Michael Roth wrote:
> diff --git a/arch/x86/kernel/sev.c b/arch/x86/kernel/sev.c
> index f01f4550e2c6..29b832c3f27f 100644
> --- a/arch/x86/kernel/sev.c
> +++ b/arch/x86/kernel/sev.c
> @@ -558,6 +558,55 @@ void noinstr __sev_es_nmi_complete(void)
>  	__sev_put_ghcb(&state);
>  }
>  
> +static u64 get_secrets_page(void)
> +{
> +	u64 pa_data = boot_params.cc_blob_address;
> +	struct cc_blob_sev_info info;
> +	void *map;
> +
> +	/*
> +	 * The CC blob contains the address of the secrets page, check if the
> +	 * blob is present.
> +	 */
> +	if (!pa_data)
> +		return 0;
> +
> +	map = early_memremap(pa_data, sizeof(info));

WARNING: modpost: vmlinux.o(.text+0x58a1d): Section mismatch in reference from the function get_secrets_page() to the function .init.text:early_memremap()
The function get_secrets_page() references
the function __init early_memremap().
This is often because get_secrets_page lacks a __init 
annotation or the annotation of early_memremap is wrong.

WARNING: modpost: vmlinux.o(.text+0x58a3e): Section mismatch in reference from the function get_secrets_page() to the function .init.text:early_memunmap()
The function get_secrets_page() references
the function __init early_memunmap().
This is often because get_secrets_page lacks a __init 
annotation or the annotation of early_memunmap is wrong.

The previous caller was __init.

Seeing how the call chain starts at setup_real_mode() which is
__init, I'm thinking all those functions down to and including
get_secrets_page() should be __init too. And I'm guessing that should be
a pre-patch and then this one ontop.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ