Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1343480rwe; Thu, 1 Sep 2022 17:18:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR5uJuLsmYtMeKjtPq3Bh7uHdN3kTpfWX47EgvSXfyMVlPw+0hBZ+Z+eg4vYS7clAY5eXcfb X-Received: by 2002:a65:4687:0:b0:42a:8907:5c3d with SMTP id h7-20020a654687000000b0042a89075c3dmr28401224pgr.510.1662077917584; Thu, 01 Sep 2022 17:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662077917; cv=none; d=google.com; s=arc-20160816; b=bbAdtZo9HOf8hXmnqkgLtWFamuqDZ/VOcN/6KpIRq1BiPY9OqYOaTao4AzGqEFBrIk WA2dmx9Vka1VcOjns6t1Xnijda9TmF6CtDBA/fqn+3YdD4qrzXbhOW4ROlURCscjRS/o cB9Ad1UVy1hvMD6CTnPW1c3MQ/0oQoTz2qC0N7ON1dMl+s32xMftJRiNauHdARj5qZgP 9PHF8HcwuWEhz6Nd5hjsVPBKMLtCBSiu7CO9STYa94J936sNmqQXLy6HPLDrTzCspD4g sJCF6iTtnOG20ic2XNYS3YoRkQ6KIVCa+iTsf/jWFVY/uOKJvKYPNa76QWtvyNLVos2F QAqQ== 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=vEysGieKjuCyP14PpjfoNEx9D2dScNF+pBTn7PUxgjI=; b=SxA5MsEGMs/BgzgtzM9wkJs0BNx5fH8u0UbyzDelx62VL73ZopY55qrdNHkKcOYmd8 emWlFS6FM8E6DGxDvs+6ysLNJNh8MmC4dYScZ7cm1GPuF5BlIcl229l6E/4ZI8GwwScv QAVBeSRzaXc7vuxGGefxFM0NGtif1lJZ/Cciwsn8tZYjyQGkt2mfhHkw/KUTwhkWoBML EzIe7CF1BigTj6XXiLDGzFLkBp/0oWsk4tPEX2rVah637QDdok5W+aKm5EQyfQxrbN7T veZdfHVLDZs6YpYIUklWqS6x977xwD7U0XJmjMRgRcqrPwRwxxUiDj4KMQ8C+sPT99kW RpKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eEOR2R0O; 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 d6-20020a621d06000000b00537cb0a5fb2si477530pfd.298.2022.09.01.17.18.26; Thu, 01 Sep 2022 17:18:37 -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=eEOR2R0O; 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 S234330AbiIAX6o (ORCPT + 99 others); Thu, 1 Sep 2022 19:58:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230151AbiIAX6m (ORCPT ); Thu, 1 Sep 2022 19:58:42 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AD2B6C763; Thu, 1 Sep 2022 16:58:41 -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 ams.source.kernel.org (Postfix) with ESMTPS id 0D7A9B82897; Thu, 1 Sep 2022 23:58:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 555F3C433C1; Thu, 1 Sep 2022 23:58:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662076718; bh=8N8RRa/GUsmMMJuIufQYY+tMakpxVYzcByXjf3hVKfg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eEOR2R0Oh4Tx7xDq6t+t/oUttp3mkFtlyOG6WTlSWJuUwQF+yfwRKHq/bVhcj9TsG R/nFV1uNANlEKiCHrm13ruZVkVKM99L78SFqU2m1SrtPCTcdVKSTBbIQURb61zFKCf aQTkiPDKWuxoTwTe3TTFBFgJGCUr1JwPQ8z38ttL8aR9cLvj0yAEkJTLNWVLW/6TQi aZywYFHvj75Fk061U4RX+ELa9RkserETF8eZyijJSt8As2sAGP06+EnmDNydVJsMRW lPeLJ5UpSFLbQ/62IoOlQGXh2rZvO+hfvzP+ctk+NGjsl7WTX6mTe0u31Ka0kodHAR biRN3Six6o7Zw== Date: Fri, 2 Sep 2022 02:58:34 +0300 From: "jarkko@kernel.org" To: "Huang, Kai" Cc: "pmenzel@molgen.mpg.de" , "Hansen, Dave" , "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" , "haitao.huang@linux.intel.com" , "hpa@zytor.com" , "linux-kernel@vger.kernel.org" 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: 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 Thu, Sep 01, 2022 at 10:41:54PM +0000, Huang, Kai wrote: > On Fri, 2022-09-02 at 01:27 +0300, jarkko@kernel.org wrote: > > 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 > > Yeah I am planning to work out one to see how it goes. Looking forward to try it out :-) BR, Jarkko