Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3580841ybi; Tue, 18 Jun 2019 03:12:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4UsUQJa4Ybm2UwXZ3RL+xoQI9P/Jzrdzi1zktxJjJxc4I4uba2hyEBo6jPjimRJ5P0Mh6 X-Received: by 2002:a62:6341:: with SMTP id x62mr121001360pfb.63.1560852741005; Tue, 18 Jun 2019 03:12:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560852740; cv=none; d=google.com; s=arc-20160816; b=ZTvrlGO9sUKDve+DxN2/aLdadAMj9aeD2/f3oBv0QUlhNeIlmMYdybuDStcP6dbEuj vwMNjojsd+6D7xcby0BPPYq30dNDmqCesnvoSAZ9k09P6cNQoX3ICGTRN3De6yLiSUpG 0Yv8V7ZPKWkY2dbrXZ9lR20qikNQfjp3+cAFaxnAMvdkXWwtzTE1LXst2kpT0Krh50Mn QD90xsLjdjq8Y5mi+OzhyRWjitoteWPfuGUvXvbINWBWvUpqnDzY52gaOrhs6Oq26U12 hAAxC+feRBoR32/AerBzcCC4e7WZ2MOXOL/lGyuTOTP8div+uvo52srPZ0KweSkUFO+U +wEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=MoWVPmpMAbs1bfVejPZhyhsg72fZJLKwwn2XNif5WfM=; b=ZQwah+rCRkKJYcyX4n97XcGBg0+sftOIhgKYrf99n7bXnLwR3CWwWeDF65EYk/NYHM GCF07z8PA5Zkwjplj5FiPl7+zFhTvcaKldcPU59vKo4eiUJaweBF87sJVKHfs2OD2gAS x4fLgqasA0aDsQexa19knJkUGpP3QTeEfsgjSbhy47HGx6Kn4RaXRbKhhxorB6vddEt8 Lgt4gJSACwjga5uU7sZm2FB/oKqOsQhBB5SKDyQZbQh6yFsQ9kD06w3I5WTM+ZqIua6N WM8ZbpH65fHQ8uP7/64JKJbYfAaGtYbN1ggscFd3ORK4XyaVVkxnsgKJaH6zRkBsIfB8 pv0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Q5GnsCpQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id 33si12664825pll.254.2019.06.18.03.12.04; Tue, 18 Jun 2019 03:12:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Q5GnsCpQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728945AbfFRKMA (ORCPT + 99 others); Tue, 18 Jun 2019 06:12:00 -0400 Received: from mail.skyhub.de ([5.9.137.197]:42254 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725988AbfFRKL7 (ORCPT ); Tue, 18 Jun 2019 06:11:59 -0400 Received: from zn.tnic (p200300EC2F07D6004142CF2FAC564D4B.dip0.t-ipconnect.de [IPv6:2003:ec:2f07:d600:4142:cf2f:ac56:4d4b]) (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 CEF0D1EC09E2; Tue, 18 Jun 2019 12:11:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1560852717; 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:in-reply-to:in-reply-to: references:references; bh=MoWVPmpMAbs1bfVejPZhyhsg72fZJLKwwn2XNif5WfM=; b=Q5GnsCpQ54V6Z8IyXAEBDNG2k+kEe1heRl6f7EKCSm93wgSioxWrc77FZXYECUirzuhjx5 OVk7OFTVHR3xvnwJy3araxJm6p2mUDX+f38bNdhUhTeW3u2Uzn8PcFTjSXxH7D28M5cVfK JCEXX4FT/C8745VrTR/s1ftextMWFl8= Date: Tue, 18 Jun 2019 12:11:49 +0200 From: Borislav Petkov To: "Lendacky, Thomas" Cc: "linux-kernel@vger.kernel.org" , "x86@kernel.org" , Thomas Gleixner , Ingo Molnar , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Baoquan He , Lianbo Jiang Subject: Re: [PATCH v2 2/2] x86/mm: Create an SME workarea in the kernel for early encryption Message-ID: <20190618101149.GB5629@zn.tnic> References: <20190617110241.GH27127@zn.tnic> <9e7e1757-2f2f-ae34-5b31-cca5e164a6a9@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <9e7e1757-2f2f-ae34-5b31-cca5e164a6a9@amd.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 18, 2019 at 01:49:13AM +0000, Lendacky, Thomas wrote: > Whoever uses it in the future could rename it if desired. But I can do > that now. Is there a preferred name? I can leave it as .early_scratch > or .early_workarea. So looking at readelf output of vmlinux, we already have .init.* sections for stuff which gets freed after booting but I'm guessing we can't have the SME scratch area in the middle because you need to be able to say which range gets encrypted without encrypting the scratch area itself... But you could call it .init.scratch or so, so that it fits with the already existing naming nomenclature for ranges which get freed after init. > I think it's easier to show the alignment requirements that SME has for > this section by having it be its own section. Not only that, from ld.info: " The special output section name '/DISCARD/' may be used to discard input sections. Any input sections which are assigned to an output section named '/DISCARD/' are not included in the output file." but you want that section present in the output file. Thx. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.