Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp2153534lqe; Tue, 9 Apr 2024 10:58:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVKWp0773n3voDyvzxFixHk4VBu+qDdfPVBM9f89dS3Dw/NcSBGUGV24PrBgTZojYd0Jfqn2TkBs+eYRS8RfO29ip2MqUSOqkKCLCl3Vw== X-Google-Smtp-Source: AGHT+IGksM8ChE8F4aIJCEeFGq2kjk6UTtQ+8Rt8sHooHl9Azr5j88ZNmPYkKjHKgXYVgbxHS65T X-Received: by 2002:a05:620a:1a83:b0:78d:6150:fc1c with SMTP id bl3-20020a05620a1a8300b0078d6150fc1cmr495426qkb.32.1712685500172; Tue, 09 Apr 2024 10:58:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712685500; cv=pass; d=google.com; s=arc-20160816; b=MI0nYkJbrVu/kKbI+pjSqWV2NfW9pabRymutZyhBH7RnOZ4XOmdyhTw4mJyo5htSZX 4TZPhJfnJxKDhLmuqEyMaPVOKU4id7RjzpF+i/40euCbsVFkHTRMICrDZdgmN3SVZT8m jOGgnywSE+FcWn1PicjC1sern8I//zCYwi2Wf6Ph3y5bRNj2yPEo0G0rAsv26byg+6Rd jBGqWDi81lZdHOMPiGKjX4RY+rn37JQMUNVYO+U2alslveS0k4Liop+EFy4UZWq9OVH3 k5BSZ0OYZgakGYBhe8lkZfmaGjVuOmnqIwuylm80T+Jcya8wIy65bNRHHWNWAzqZ22kY h9sw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=MKS+kjKQ6f7tmhdKG07q4YnXSsF5xoB+pU8srRMMnzg=; fh=yOXSm0E/8tOfmRnhk0JfE6MKLQieMwDr2DHng9Fw+Y4=; b=RIL3QnCCMW67YA5DvsysT3rDux4r18QR4mRW/WXXBeqa+UdPWmhcizCEuW2tZ8Mh3z Q47BWpYe2n++PprDgi78MOGguGDpsCRJceK7Z6U9N3Nn+4SVZ11UuiiVi/oMpzFJdd+l uL5VKAIwHM8Z/AobUAkJa+L7Cz0XQxbGUqOB794XTFl/HJKMdD3bRt2ic4WFcIPwKxJw rAOieVTjsALTtaliUasefeeJHUIJGc6mmOOqQJkrhJQI2UQtekFp+XFY0iFKMAociIQ2 5zgEnw+zOWmsXUpITxDuDPo93T4Kkg/ruS8vg+Q5ciLLTyJA90JQrg0p13hVsZA/VW+T EfUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-137430-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137430-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j8-20020a37c248000000b0078d65a42d9bsi5141578qkm.213.2024.04.09.10.58.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 10:58:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137430-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-137430-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137430-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DE8CC1C2176B for ; Tue, 9 Apr 2024 17:58:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34F9D156883; Tue, 9 Apr 2024 17:58:12 +0000 (UTC) Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE04E131732 for ; Tue, 9 Apr 2024 17:58:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712685491; cv=none; b=p/uMmM87igDIsgz9hRZcUbVLEGI+ZrKwEgoXqIAfmjecTCD1b2PJ+NzTLh56KxJcjS5sPNqPtUQvUKpGmfxqoYWUNQhnlcGo4eSmCZQ61Vz3bVe3d/zkkg1RHT2Q+9sZrYyXF+PLwgj8Af98WRBgOHkAg3CyYYY91t4utPmYucY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712685491; c=relaxed/simple; bh=K41sP0ZETOeyv4cbfS9ddqUr9tmWzEZdyvMpN+HRH6g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pam68GQ3RsrrTYaxaW+ry+Zjnt7mv3xUG/HpsExzM3LwEkFvmJt+fLhzomHBrf7BVYKlMKdhsk0FJTu7ui8e5kMQ5kJydeDRRhpdLF5FJOmlu8K0ZoV1Owgr9iW+Oufkz88jSTqeGoPO7cq4BiL6/DZQWST0loIIpiyzLuw3BaM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 7148640E01C5; Tue, 9 Apr 2024 17:58:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id tykDg4uvVSRC; Tue, 9 Apr 2024 17:58:02 +0000 (UTC) Received: from zn.tnic (p5de8ecf7.dip0.t-ipconnect.de [93.232.236.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id D0ED640E0187; Tue, 9 Apr 2024 17:57:47 +0000 (UTC) Date: Tue, 9 Apr 2024 19:57:42 +0200 From: Borislav Petkov To: Tom Lendacky Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-coco@lists.linux.dev, svsm-devel@coconut-svsm.dev, Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Dan Williams , Michael Roth , Ashish Kalra Subject: Re: [PATCH v3 01/14] x86/sev: Rename snp_init() in the boot/compressed/sev.c file Message-ID: <20240409175742.GEZhWBljxrJ8yGC3wE@fat_crate.local> References: <425afa6512994b1ca1bb366eb7abfb24d65175aa.1711405593.git.thomas.lendacky@amd.com> <20240409170917.GCZhV2PWPhmzTHhMRO@fat_crate.local> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Tue, Apr 09, 2024 at 12:44:13PM -0500, Tom Lendacky wrote: > When it's not static and has the name snp_init(), then it has to match the > definition in arch/x86/include/asm/sev.h, which is really intended for the > snp_init() in arch/x86/kernel/sev.c when called from > arch/x86/mm/mem_encrypt_identity.c. > > So, yes, changing the name would be enough except then it remains not a > static and you can get a compiler warning about not having a prototype for > it if the -Wmissing-prototypes option is ever applied to that file (I don't > believe it is today because it is in the decompressor code, but that can > change). And since nothing calls the snp_init() in > arch/x86/boot/compressed/sev.c from outside of that file, making it static > was appropriate. Yes, then please remove all that text about what could potentially happen from the commit message so that it is not confusing as to what the situation *currently* is. The two functions are independent right now. It is enough to say that you want to differentiate which one is called when, in order to avoid confusion. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette