Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4107011yba; Mon, 29 Apr 2019 13:53:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJrS2nrLA9XLAIUDPTbyngR0Gu4GQscRRRpOdDsV0gocWoK52mPVcBj22MTQAWV1sWkK1E X-Received: by 2002:a17:902:7d8f:: with SMTP id a15mr63723030plm.3.1556571187160; Mon, 29 Apr 2019 13:53:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556571187; cv=none; d=google.com; s=arc-20160816; b=wvd+q2TsWC2thTZiqX9IASbzsKvSVB3XOuf/fv25Q+NXDijajEvNtbUDh1oF+hre5Y 03H3hzf7i6mQtFHs9NI0pyeIyk6AkgSd2VGIRaUWIGUAkELxtsbviv49tJ0crk2CmHAj tRoXDZg+RtEWXFU4MraLXPIDUNge0ya/ZpJ32ZE0vhphz0r6bxUJNTwG4DbJPPcjmW2V N5PXYun30GbPgEt/Tcfa15TOZdf22zYQaD0CkyD0YxYR4TiweeWlDs7sBqxzn1j2mtbm 4plnH/6J1p2ZGwFeFZ3ij33gy3H5p90QOQHapNy8quITepdVFgxkb/1hXjcC9JQQ9vaF A1tw== 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=5md5VuGZiE3QlF5RlE3Z38kH7C7pY3edvkPEVK1hHck=; b=msEAaTM0CM9WKKFJh6MmcxLqBzD7tHYnhGzExCWpdK9qAZQmPcOAa3UJuaXuGVAYoW Zjh1zAtBZ8anJ9IIKiLQ+8vo/eCkEbmFG95pL2fRfSue+dQ0nAhkMUN6t/JCwtSONLLN VNj7a9IKyGLrIIKIWQG431d1sOPhkkOhfM+PvZioGsYolT/V9EAbN1qfrrd+fkHxtYfo KfAZ60vd9R7Bi73gWR+cC/a/VwoYh9zIEYVzOy8DplbdwL5OKMaZ4RS98dILdDAp4Szk /xZKZWL7P2S6K502TZQcxKwxbVQT/96pQuBOF17juN0/x9wRbTmZqUgChZ3YASWS1eeu QbSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="r/excxlc"; 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 c10si35912599pla.231.2019.04.29.13.52.51; Mon, 29 Apr 2019 13:53:07 -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="r/excxlc"; 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 S1729386AbfD2Uvz (ORCPT + 99 others); Mon, 29 Apr 2019 16:51:55 -0400 Received: from mail.skyhub.de ([5.9.137.197]:48698 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728669AbfD2Uvx (ORCPT ); Mon, 29 Apr 2019 16:51:53 -0400 Received: from zn.tnic (p200300EC2F073600329C23FFFEA6A903.dip0.t-ipconnect.de [IPv6:2003:ec:2f07:3600:329c:23ff:fea6:a903]) (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 C6E8F1EC06E5; Mon, 29 Apr 2019 22:51:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1556571111; 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=5md5VuGZiE3QlF5RlE3Z38kH7C7pY3edvkPEVK1hHck=; b=r/excxlcYxZMPb/BJjJXeYH8yPtVanogrEp1oPMTSI6PKESw0zG2+KGYla/5qWoIPLQW62 bDNMwlin9svDnrcn1TX402htB3ORWe1PeUdhr0Pq8gla1eUrE9W/4xMRtAqeNRtoOSM21P RJUvj5maJF7mdhKSx5g9u6GqHvQo2f4= Date: Mon, 29 Apr 2019 22:51:46 +0200 From: Borislav Petkov To: Gary R Hook Cc: Thomas Gleixner , "Hook, Gary" , "linux-kernel@vger.kernel.org" , "dave.hansen@linux.intel.com" , "peterz@infradead.org" , "x86@kernel.org" , "mingo@redhat.com" , "luto@kernel.org" , Alexander Potapenko Subject: Re: [PATCH] x86/mm/mem_encrypt: Disable all instrumentation for SME early boot code Message-ID: <20190429205146.GF2324@zn.tnic> References: <155440965936.6194.3202659723198724589.stgit@sosrh7.amd.com> <5dfcb133-0a0e-9e07-3774-313e30814e79@amd.com> <20190408165835.GJ15689@zn.tnic> <8a14050e-2516-5c0f-195d-611c6959b94b@amd.com> <20190408190800.GL15689@zn.tnic> <20190426162425.GI4608@zn.tnic> <1beb4b7b-a4c1-0f60-3aa8-640754e30137@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1beb4b7b-a4c1-0f60-3aa8-640754e30137@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 Mon, Apr 29, 2019 at 08:16:07PM +0000, Gary R Hook wrote: > Yes, option 4 would be a combination of using a local copy of strncmp() Why the local copy? > and disabling instrumentation (KASAN, KCOV, whatever) for > arch/x86/lib/cmdline.c when SME is enabled. I think this should suffice. You only disable instrumentation when CONFIG_AMD_MEM_ENCRYPT=y and not do any local copies but use the generic functions. Hmm. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.