Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp134122pxx; Wed, 28 Oct 2020 00:08:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrrmerAgw3JTJSEYydjQ5VM0C20bSy9l19ApO42EWpp+T2zbmaG93zXNAGiulAgolQ+EEw X-Received: by 2002:a17:906:4306:: with SMTP id j6mr6427237ejm.523.1603868884308; Wed, 28 Oct 2020 00:08:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603868884; cv=none; d=google.com; s=arc-20160816; b=tBI0yEUbfJkex3Iw5IchOIyBnY2YR7y5hIq53ieFcleao778ojKTZC1sEBeQj3zCdd 14i8+KnhQ3hnG1WtWYLukzXvgwFFSocsTAOjxcQ75rBkBqSos+tf3BZzPWpv0uapT9nw l5w4blxojJ47PwtAj6G5VFF10Pwh6bcV4nv0xTdxzzlgphbfXspjsEymYDEMGqg4vfuc uDLj2juLpBPjRh0FU+iHyxVkR6MECdlVpJuIC3lRP/43LIR56da5i7Q+0+92r4Y5HwNj D1MUcl7kFEbubzEyaDYALDkgpvVsNIRGKXxxCj+7GPGNkSXCRRNmzFMTpIHbW2qxn06d t4kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5YLEMlU2F8JKFCfKj2+E02GhRKUEkIfqvoLDcNUn3MA=; b=I+KMh89cQbdZyLl8gDiy/ORX1mZ02C6z14cxHhZjLu42V2nNR0vs6ujtLDvxDYBjo0 rD4CKyqkl37GXwIFcBCP5u1OIBMOCmFT+fJgJDsqcR+mBgKcgnds+tGPwvBb2rN2bNov IQ9wBOaWfx358eUrVhPwq1fjA8IeQ04ed0ymWi7BKhwk34cj56FC2pRF/7SRuB/+CMF2 kWD+52/5tq+lwiR0/bb1AWkzMPdwefldSEKMR/4SJ83Oj7zox9cVcigzeMazr60m5tXe 1KNLlea9EtUcy08mLDrXh3SDe+1qi1UHyUtHsMA/F5Bz6mRRbHavrwG6kT2u4E+/if5r 3RXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=lqVSS+Bk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id se26si2777072ejb.442.2020.10.28.00.07.42; Wed, 28 Oct 2020 00:08:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=lqVSS+Bk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1418617AbgJ0LUK (ORCPT + 99 others); Tue, 27 Oct 2020 07:20:10 -0400 Received: from mail.skyhub.de ([5.9.137.197]:52416 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2899103AbgJ0LUK (ORCPT ); Tue, 27 Oct 2020 07:20:10 -0400 Received: from zn.tnic (p200300ec2f0dae00bd0b3d5f265e51fe.dip0.t-ipconnect.de [IPv6:2003:ec:2f0d:ae00:bd0b:3d5f:265e:51fe]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 586BB1EC025D; Tue, 27 Oct 2020 12:20:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1603797609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5YLEMlU2F8JKFCfKj2+E02GhRKUEkIfqvoLDcNUn3MA=; b=lqVSS+BkCGJtG3m0XVNSdto5pBZSNXrIBPqXa+4nxntBxWg7Ibl9eYR6k4BM0m7bGedhrG /T4hmH88NTIZG5Uttg0owoRAKpvlkddHGY3L/RwxdUjeGlZarfnb0CCkw1K2z1CWdumHyQ DlgyTSmA9pfsZ+TcdXqFAfwCRPw3HaM= Date: Tue, 27 Oct 2020 12:20:01 +0100 From: Borislav Petkov To: Joerg Roedel Cc: x86@kernel.org, Joerg Roedel , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Kees Cook , Arvind Sankar , Martin Radev , Tom Lendacky , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 4/5] x86/head/64: Check SEV encryption before switching to kernel page-table Message-ID: <20201027112001.GE15580@zn.tnic> References: <20201021123938.3696-1-joro@8bytes.org> <20201021123938.3696-5-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201021123938.3696-5-joro@8bytes.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 21, 2020 at 02:39:37PM +0200, Joerg Roedel wrote: > diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c > index ebb7edc8bc0a..bd9b62af2e3d 100644 > --- a/arch/x86/mm/mem_encrypt.c > +++ b/arch/x86/mm/mem_encrypt.c > @@ -39,6 +39,7 @@ > */ > u64 sme_me_mask __section(.data) = 0; > u64 sev_status __section(.data) = 0; > +u64 sev_check_data __section(.data) = 0; Apparently section names are supposed to be given as strings now: In file included from ././include/linux/compiler_types.h:65, from : arch/x86/mm/mem_encrypt.c:42:30: error: expected expression before ‘.’ token 42 | u64 sev_check_data __section(.data) = 0; | ^ ./include/linux/compiler_attributes.h:257:68: note: in definition of macro ‘__section’ 257 | #define __section(section) __attribute__((__section__(section))) | ^~~~~~~ arch/x86/mm/mem_encrypt.c:42:30: error: section attribute argument not a string constant 42 | u64 sev_check_data __section(.data) = 0; | ^ ./include/linux/compiler_attributes.h:257:68: note: in definition of macro ‘__section’ 257 | #define __section(section) __attribute__((__section__(section))) | ^~~~~~~ make[2]: *** [scripts/Makefile.build:283: arch/x86/mm/mem_encrypt.o] Error 1 make[1]: *** [scripts/Makefile.build:500: arch/x86/mm] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1799: arch/x86] Error 2 make: *** Waiting for unfinished jobs.... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette