Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1270442rwe; Thu, 1 Sep 2022 15:48:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR70XygKk4e/VoVY/USnFy/yZVM6WicoT5EX/g0NTGvj3mkUAuAteCdZEOU3A+5yhNRbX7r2 X-Received: by 2002:a17:906:8a77:b0:73d:deef:8f76 with SMTP id hy23-20020a1709068a7700b0073ddeef8f76mr22684979ejc.765.1662072484067; Thu, 01 Sep 2022 15:48:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662072484; cv=none; d=google.com; s=arc-20160816; b=0RlgoBI36kgP4q7dusePgKJcDjFv/Dflptc5VyBgMCR1iZG8TR37rCPWHM/Xxu8Z8B +olzIfHtBEPLjlYMkKOymUCo69pYhDNTtX6Y37G8ogdVnEJPTzG9AH0e8gx9AibDOshT Jd4guxIzNQgCXJK44xDJ2CzIC5GHgs90l8Al8EcybUBMCgLB83+Ak/Ak4w4oUUmlpVTF m4f9m72fD0NBaBo3q30pu2BxXTdHMOnPSzLVLgCeg6ZRryGwW4I79u4SuqsORVi+xi2W ejzXaWSJ2WtovR8Ednl/s5gWxH44DXFTvyNXUDc2P4VIDIH2fMWS1dpkpM7lc8kHuNxA txOA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OgREc93J81VZxuZBIC7GS09Oetd3MkoYJO3+unwVrsY=; b=VZB612R7pWBK4L1Vpdu2tT6qwc3Pz3LfLT4Wxtgj1fVN8TnOWVhBF/pvqIsVfRlgsW KU1RTlElcGtiEDgc4Jn7RKYmFk4AG/4RCdfjLhmr0wkjk2LLOWaXRgYP/ClvRiuT7tYl BHkHbA+b3swbG/VZdMWPPDuA0vAHEzM6TWmAo2IeZAFRYQMaFoEnQWncslWA3H21bLmG uNoo43GNWpivfnlfen/C7GIACKhiKdyVg7JcvNw6Ja/EPB4VHWKztS2qtLnbVgWQeP8+ Elwz1rNgJfCcWL9N1n0xj9BTOm12bCOxM+ZE5Kuj9boo/714pC3Ijki2YdeaQKpgT59D Q+6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vg6A7fUA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s5-20020a17090699c500b0073dab845a38si366970ejn.346.2022.09.01.15.47.39; Thu, 01 Sep 2022 15:48:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vg6A7fUA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234982AbiIAW3n (ORCPT + 99 others); Thu, 1 Sep 2022 18:29:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233931AbiIAW3L (ORCPT ); Thu, 1 Sep 2022 18:29:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 770426143; Thu, 1 Sep 2022 15:27:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1140662013; Thu, 1 Sep 2022 22:27:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F63AC433C1; Thu, 1 Sep 2022 22:27:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662071247; bh=X4NhP5h1BDo+HeLevPQhixM9pF9whQkJf1DYX/W3TM0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Vg6A7fUAWqIW295veEQ27KxkQ9spNuxgvwTsvydQwe35fitLyCn/tuwn4cCoWlwlo etQbRVUY5h1rLMeNJ8uXmaEyZDZzeMO+5PFEr5oFOS+M4Isx0F+EXv2GhMSKEhYu9e +xSSz0vSziEL+EMjemIqhs1643fFnhJOfE40WPfAwqfmtWeeA57cX/IfSYboqpPiNY DZECTdBatRaoHmadejYYbalIPk1E/gY+43CFQafkNBPwgNDpVeWjtUf9z4Cl2N+60J gCS/hQPPqDco9l6vxCJAfzaOVrLanVe68uAtzQd3rkZ8f4wk1KWNL80TDmdJ05Or+i vjM8fgXBJtN5A== Date: Fri, 2 Sep 2022 01:27:22 +0300 From: "jarkko@kernel.org" To: "Huang, Kai" Cc: "Hansen, Dave" , "haitao.huang@linux.intel.com" , "pmenzel@molgen.mpg.de" , "linux-sgx@vger.kernel.org" , "x86@kernel.org" , "dave.hansen@linux.intel.com" , "Dhanraj, Vijay" , "Chatre, Reinette" , "mingo@redhat.com" , "tglx@linutronix.de" , "bp@alien8.de" , "linux-kernel@vger.kernel.org" , "hpa@zytor.com" Subject: Re: [PATCH 1/6] x86/sgx: Do not consider unsanitized pages an error Message-ID: References: <94993d90b0b3c59fae61427cf0cc78dd10c381bb.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <94993d90b0b3c59fae61427cf0cc78dd10c381bb.camel@intel.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 31, 2022 at 08:42:59PM +0000, Huang, Kai wrote: > On Wed, 2022-08-31 at 11:35 -0700, Dave Hansen wrote: > > Jarkko, Kai and Haitao, > > > > Can you three please start trimming your replies? You don't need to and > > should not quote the entirety of your messages every time you reply. > > > > On 8/31/22 11:28, jarkko@kernel.org wrote: > > > > Will it cause racing if we expose dev nodes to user space before > > > > ksgxd is started and sensitization done? > > > I'll to explain this. > > > > > > So the point is to fix the issue at hand, and fix it locally. > > > > > > Changing initialization order is simply out of context. It's > > > not really an argument for or against changing it > > > > > > We are fixing sanitization here, and only that with zero > > > side-effects to any other semantics. > > > > > > It's dictated by the development process [*] but more > > > importantly it's also just plain common sense. > > > > Kai, I think your suggestion is reasonable. You make a good point about > > not needing ksgxd for vepc. > > > > *But*, I think it's a bit too much for a bugfix that's headed to > > -stable. I'm concerned that it will have unintended side effects, > > *especially* when there's a working, tested alternative. > > Agreed. Thanks Dave/Jarkko. Please do a patch. It's a very reasonable suggestion when considered out of context of this bug. If you go really rigid with this, the compilation process should not compile in sanitization process in the case when only vepc is enabled. It's useless functionality in that case. BR, Jarkko