Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2205907pxp; Mon, 7 Mar 2022 10:21:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxIlr/wvdzIahbGdixwqg4Ak4Yb3B4/za/045jKy7hi1wkX3bQnsxGG/CI7ZHfxp5IeIPK5 X-Received: by 2002:a05:6402:69a:b0:416:5f39:982b with SMTP id f26-20020a056402069a00b004165f39982bmr2829490edy.147.1646677299985; Mon, 07 Mar 2022 10:21:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646677299; cv=none; d=google.com; s=arc-20160816; b=jH9FZPuU878mSpckrs5y4ZxpxS7Soc23RAE4hkN2FypiE+RMgfSFmCzBI5nQau2Wre KKnCMSVZN2vd9tpZtH0tKfXmALqjnPwW7MDPNSuQvwRkn9tNk8JK7kydWFCSjUGpCZ2b uwWtnmjPxZ3X0ZOQNkcTPXAfqA1fXEzcRVBZwJHDHXimo0vvDM0pTcSjSCRkBOMbFssS hrFL21OA/jJgNshZqkQUS+YJbF1KuC6sB328q85MReHC8XEDzuXJudfhQdodAsxYcY+5 +6YNHtctpHc/67wMKvL11+vZq5gSO8Y4kSW3FcWexj0gkJ3njXOioakkvfwNjsxC1XLW ekCQ== 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=NJg4WQ578K+E/OLUk65GkAo/XuO5VpPVpv5bzh7rmK8=; b=tYkUExlLBPmLijVGWfCOtPnkCKwnF3D/7fpsikZj3rtcY+PmYVByzhv2UBQHcor+1S ccRPdQQ+a3Zatvnb9dCBAFGJW5g4taMxUrALIICgvcaFmhHXEvh6Sy9Gkv8DHhNdHS1v hQlJeWkJyX1ZkbPOYQ2IyW+Tlv6YmRz5URi0Pe2a7HPjZrjYoMIiP7lGD416HZuR3HIX rQB+wUt6O3OuSwXaJt1ZyfT3RyM8wqfBYSZ8qN/bgzxHmy6UvDTw4TPBMqCAUERvJDZ6 zO+pVK4oJjMMhe1md7zJe4rxM4QzfZDws+xzdKdl+U7UxgAWr7uFMGB1ePPhenJtYF4G K+hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AxmZwu+b; 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 nb7-20020a1709071c8700b006cec3e62ab8si9803681ejc.459.2022.03.07.10.21.16; Mon, 07 Mar 2022 10:21:39 -0800 (PST) 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=AxmZwu+b; 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 S244264AbiCGQlR (ORCPT + 99 others); Mon, 7 Mar 2022 11:41:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244253AbiCGQlP (ORCPT ); Mon, 7 Mar 2022 11:41:15 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A75FD4EA37; Mon, 7 Mar 2022 08:40:21 -0800 (PST) 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 59B0BB81632; Mon, 7 Mar 2022 16:40:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FC4DC340EF; Mon, 7 Mar 2022 16:40:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646671219; bh=D64AUoKStrCHhLRQnKnJTF+bBWtIrtXVo6ZGfwkuq/o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AxmZwu+bSl1W8wWDQsMLHRUtJuMN96MmoZOYEKFo3xeyvyXVp6qvoICHHDQ3EZNUR yLunK+eDuIEjtvnsphTmYTMu5y1EdEdBy9zUHBoQhNGNygNwXfkwAbWZjN+WwUUgYh 8Ize1F35ehMGTWYIjKxeGbGV5dy42CILtK2ddyxP8eBS+Xlcg79EXRZPru1fpg8Lf3 MXd8u+p0/2gvSQ71MwacksiyWDK8vHMwMbrmnkpGT8DgkyjWeWj4V6EAdbu092gsiE ikgTUzZCNcO5g7Uch/FfR9IyG5NLGESyiuuX/f4fMyxN3sgz281stU3GuSaacpah5r /g81vBEpXhxCQ== Date: Mon, 7 Mar 2022 18:39:38 +0200 From: Jarkko Sakkinen To: Reinette Chatre Cc: dave.hansen@linux.intel.com, tglx@linutronix.de, bp@alien8.de, luto@kernel.org, mingo@redhat.com, linux-sgx@vger.kernel.org, x86@kernel.org, seanjc@google.com, kai.huang@intel.com, cathy.zhang@intel.com, cedric.xing@intel.com, haitao.huang@intel.com, mark.shanahan@intel.com, hpa@zytor.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2 21/32] selftests/sgx: Test two different SGX2 EAUG flows Message-ID: References: <32c1116934a588bd3e6c174684e3e36a05c0a4d4.1644274683.git.reinette.chatre@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32c1116934a588bd3e6c174684e3e36a05c0a4d4.1644274683.git.reinette.chatre@intel.com> X-Spam-Status: No, score=-7.6 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 Mon, Feb 07, 2022 at 04:45:43PM -0800, Reinette Chatre wrote: > + addr = mmap((void *)self->encl.encl_base + total_size, PAGE_SIZE, > + PROT_READ | PROT_WRITE | PROT_EXEC, > + MAP_SHARED | MAP_FIXED, self->encl.fd, 0); Maybe inline comment to just state that this is expected to work because the range does not contain enclave pages, just as a reminder (had xref to sgx_encl_may_map() to check this assumption). Otherwise, fine. BR, Jarkko