Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4636643pxb; Tue, 2 Nov 2021 13:09:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfyghd3DihGK37Z0IqIoc8NNI+1cF6r0bhL//AewaQPT9uHXOYiALu+M1jj0xHWihMI9sN X-Received: by 2002:a6b:5105:: with SMTP id f5mr1965154iob.216.1635883771724; Tue, 02 Nov 2021 13:09:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635883771; cv=none; d=google.com; s=arc-20160816; b=co1lL118ijgd0GOH63TomnZ3P5YML/4VgJpUj6DFRf3vfDIU6k/9KPmsrM0UvUmIEi 6e7rjp4+Xq4HHA+hwJpQsj8mbxLooVTkzNjE2RqxGeIV8No3jyvh12P/4P2pHIXz9waO cp7AcjaFygiZhtGT+OjIkltmpLBLLEfJfAxLzqnQA6hr80Qfy8KMYP1WSY4jFiDqRKnk L/TZI2A5WcPiOwxDz8dZ2m8WPzMLZ/C3CCUOF6xWUin3So7qPqZ1XrgIxRly3izFkU4o YQD/BjFy6eIV6BXwZJbs8oVOt1wpBHnQY+mZi7ITuUsyw/Z55gbITdv8r9/xlPtex2i/ ewdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=T8LBLtsFEwmy6zb7QwWHHt7X8rl/w6GkvA3NJPrl0OQ=; b=k+GRDdUzik6nOKvFcn0CF+hkuww0YIPA+MN0zqSmN6tYbpwRIrNSbG5MT/HH+9C9e3 JF08Yw7vSFIkt4bOczSSvOsoL04+HzEQDiCeyU58O5f/H3Pee2EOODE0j02SJYlIuV4U l1c3gSyrWuOFqHDHCSeeVkDjp9LHEx1VHuiS/8uVCZipyPmBDGwtHk1Rt7ygF0Radmkq bwT/TLIH7u/lfiTw7RR4ec0Qxke1nUCvca4GAjVEHu1ntMIv+uK7CuhGv/R5HZ6WsYSV BqyO7VXH6HxNROJg/HWHoElQZWF5Lu496GP/enHTCYMDD8caMKUN0NRF0iE7tLDEJzvY tcyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=WxmK9DEz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t2si19437073jam.80.2021.11.02.13.09.19; Tue, 02 Nov 2021 13:09:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=WxmK9DEz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231167AbhKBUFV (ORCPT + 99 others); Tue, 2 Nov 2021 16:05:21 -0400 Received: from smtp-fw-80007.amazon.com ([99.78.197.218]:34207 "EHLO smtp-fw-80007.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230155AbhKBUFV (ORCPT ); Tue, 2 Nov 2021 16:05:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1635883367; x=1667419367; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=T8LBLtsFEwmy6zb7QwWHHt7X8rl/w6GkvA3NJPrl0OQ=; b=WxmK9DEzqO7ianicR7+8Jp2J16IoCbezfbCyqKXrGEFKzdfV1+wnyv+Q wNaHHJbcS/aVSUM7UCSfo4AgN5q38U1b1+L4JNZMLfws1f7mxEiHnQJx+ dgdAUEKZIa80aPRsto0yF8YbFsIy9XejlCSP8tOdgSdrGPcEZaCK7JJpb E=; X-IronPort-AV: E=Sophos;i="5.87,203,1631577600"; d="scan'208";a="38681449" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-iad-1a-b27d4a00.us-east-1.amazon.com) ([10.25.36.210]) by smtp-border-fw-80007.pdx80.corp.amazon.com with ESMTP; 02 Nov 2021 20:02:30 +0000 Received: from EX13D16EUB003.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-iad-1a-b27d4a00.us-east-1.amazon.com (Postfix) with ESMTPS id 73ABE81605; Tue, 2 Nov 2021 20:02:27 +0000 (UTC) Received: from [192.168.4.199] (10.43.162.89) by EX13D16EUB003.ant.amazon.com (10.43.166.99) with Microsoft SMTP Server (TLS) id 15.0.1497.24; Tue, 2 Nov 2021 20:02:21 +0000 Message-ID: <65d5d6b8-03bc-772c-8d06-63989302e45c@amazon.com> Date: Tue, 2 Nov 2021 22:02:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [PATCH v2] nitro_enclaves: Fix implicit type conversion Content-Language: en-US To: Jiasheng Jiang CC: , , , Greg KH , Kamal Mostafa , Paolo Bonzini , Stefano Garzarella , Stefan Hajnoczi , "Vitaly Kuznetsov" , "ne-devel-upstream@amazon.com" , "kvm@vger.kernel.org" References: <1635472126-1822073-1-git-send-email-jiasheng@iscas.ac.cn> From: "Paraschiv, Andra-Irina" In-Reply-To: <1635472126-1822073-1-git-send-email-jiasheng@iscas.ac.cn> X-Originating-IP: [10.43.162.89] X-ClientProxiedBy: EX13D35UWB004.ant.amazon.com (10.43.161.230) To EX13D16EUB003.ant.amazon.com (10.43.166.99) Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CgpPbiAyOS8xMC8yMDIxIDA0OjQ4LCBKaWFzaGVuZyBKaWFuZyB3cm90ZToKPiAKPiBUaGUgdmFy aWFibGUgJ2NwdScgYW5kICdjcHVfc2libGluZycgYXJlIGRlZmluZWQgYXMgdW5zaWduZWQgaW50 Lgo+IEhvd2V2ZXIgaW4gdGhlIGZvcl9lYWNoX2NwdSwgdGhlaXIgdmFsdWVzIGFyZSBhc3NpZ25l ZCB0byAtMS4KPiBUaGF0IGRvZXNuJ3QgbWFrZSBzZW5zZSBhbmQgaW4gdGhlIGNwdW1hc2tfbmV4 dCgpIHRoZXkgYXJlIGltcGxpY2l0bHkKPiB0eXBlIGNvbnZlcnNlZCB0byBpbnQuCj4gSXQgaXMg dW5pdmVyc2FsbHkgYWNjZXB0ZWQgdGhhdCB0aGUgaW1wbGljaXQgdHlwZSBjb252ZXJzaW9uIGlz Cj4gdGVycmlibGUuCj4gQWxzbywgaGF2aW5nIHRoZSBnb29kIHByb2dyYW1taW5nIGN1c3RvbSB3 aWxsIHNldCBhbiBleGFtcGxlIGZvcgo+IG90aGVycy4KPiBUaHVzLCBpdCBtaWdodCBiZSBiZXR0 ZXIgdG8gY2hhbmdlIHRoZSBkZWZpbml0aW9uIG9mICdjcHUnIGFuZAo+ICdjcHVfc2libGluZycg ZnJvbSB1bnNpZ25lZCBpbnQgdG8gaW50Lgo+IAo+IFNpZ25lZC1vZmYtYnk6IEppYXNoZW5nIEpp YW5nIDxqaWFzaGVuZ0Bpc2Nhcy5hYy5jbj4KPiAtLS0KPiAgIGRyaXZlcnMvdmlydC9uaXRyb19l bmNsYXZlcy9uZV9taXNjX2Rldi5jIHwgMTQgKysrKysrKy0tLS0tLS0KPiAgIDEgZmlsZSBjaGFu Z2VkLCA3IGluc2VydGlvbnMoKy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