Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1941861ybg; Fri, 5 Jun 2020 01:19:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzraCuAm3fohgxYrId8qE+xMRfD0eX88YvFUmDRFz+5HzRiN+tPRFVfL3VNzIaE9Vlza5HT X-Received: by 2002:aa7:cd16:: with SMTP id b22mr8169390edw.308.1591345159593; Fri, 05 Jun 2020 01:19:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591345159; cv=none; d=google.com; s=arc-20160816; b=hw87WW2ffelIl9+z6LyxX+1d2F0Y/SQ1a+z2HY24g+w0ofSKpkjS3dsgosnI9kTvsL Pwtv9xH5sNuARoBqOlpCdaBVgR6SReUuvq5Hg5pvR6wCUjFPRJJVjUYxH9PeFGcfpX3I vCdOhL0SyFR0Ef04gYxPI/Ny0zlSL7basaBXknkBB9vERBC1ZEp9N5SLF2klhlK9LHZm UQMY91G7mPCIbf9sxIVkTa9Qkjx8ssfuRrIJbglJd4U5oqTki2A2A6XsWF3qmMo/cUnm 8kC2TXCDf55Aqw9Tq0Flj6qEwpd746IQWJN/zJttgwy5qXPjCxBR7UlVZ70o7JQpy/0Z FO8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=dHbxfqZQs+MiEas28rc25pxvuy1zRUH+/v6FqkZZCBc=; b=N/6WdtJ45oTthAIonSTJWLt853A5egADnBZACff1AvTiWaTABa41bhwqILPMJYTocX XqBKaBKvn3IjpRyzz7olaRW/eVjjblXGDms+d92kqg8C/dPta9UhsA/CqNtW+JF4q1bg zdQazYib58/bVszC6Nks5iR/y/pDZg1knjqsjfjL/FZwuc65BTPxILe9jKqqKn54/+XA dOQ5pHJaZr7IAOqFfWmHXxy98jh6GZI5WJO8LUsaNF3V+qiI1Jl4chBX4FnAJapHwadO NGoWYoq/COj/cP03vvDzktwijM/iOZz2ugshwtp4thNdCQexU3QixtJghM54QE6Wldi+ GJNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=COqoOl3b; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z21si3043680eji.205.2020.06.05.01.18.56; Fri, 05 Jun 2020 01:19:19 -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=@gmail.com header.s=20161025 header.b=COqoOl3b; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726212AbgFEIPI (ORCPT + 99 others); Fri, 5 Jun 2020 04:15:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726096AbgFEIPH (ORCPT ); Fri, 5 Jun 2020 04:15:07 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 549FBC08C5C2; Fri, 5 Jun 2020 01:15:07 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id v19so7584122wmj.0; Fri, 05 Jun 2020 01:15:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=dHbxfqZQs+MiEas28rc25pxvuy1zRUH+/v6FqkZZCBc=; b=COqoOl3bjsflXq+RMWBGHc7/i6lzipaIgcF73oaMaMPfMOaZD5aiznG88QRq+baU8q 3LpbySylZGmMAMNY26TNJ3ud0fEKJ6Q6cczbAcjDXi/GkKQ/HMhDyvn+hq1E5XmDbIAM jW41v/3M5J6wVWh+BkVRzJ9fMEnMZGzngdC32EAFfYJjLkcbBNKAd77/ppijjQbe1Mx9 nBMsyuiAvCwJh40l/vIbLMSxIdQmBTMXbydgt8jpplI6Vstiju4DpJ6ObuoshjXdFUx8 cD4UGI6Up7YctmeximHTjBi/xMz5srPUoIPNKPaOEeGvvrQ8kKV3ogbESKkaV5587M0u u//Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dHbxfqZQs+MiEas28rc25pxvuy1zRUH+/v6FqkZZCBc=; b=g2akr+HhhOx4rJVGRreKeKqC3kDCi3wopzGysvGLpU1XlyXgqm+mVIO95dKpxXhuTq e5lGWzXi+Duo792krMmdUldW7gvyv53wHkovTx0UM+lxHzSICLoSQwMFjvsCps/WFs8p aWDAvkXX6PvOYZ6+chwIiIqL6cVrppFaADTt3Iut8IlyHmqrC87K48pV0Xr3jsWBcd+X q5+COEANtklp9D8uc8QZQDRYwui73yBUlHmbYu1A3N5UiAqNdRBBdnprGYXqjb2INfbY y/va7rd+t89AG8oMhPq0eZtF+KfwVyDtyOJsOdbMjOR0vP07DPgw+zkW1O+JdoHPvW5I k1Ww== X-Gm-Message-State: AOAM5333sMCJgl1N7HtnEUOpbvX4yLWavqDGSBAYc46DUoSttS2s9Kuq Mf6u/DuHskUoKx34bLNOeMg= X-Received: by 2002:a7b:c7d8:: with SMTP id z24mr1442139wmk.28.1591344906024; Fri, 05 Jun 2020 01:15:06 -0700 (PDT) Received: from localhost ([51.15.41.238]) by smtp.gmail.com with ESMTPSA id q11sm10991924wrv.67.2020.06.05.01.15.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 01:15:04 -0700 (PDT) Date: Fri, 5 Jun 2020 09:15:03 +0100 From: Stefan Hajnoczi To: "Paraschiv, Andra-Irina" Cc: Benjamin Herrenschmidt , linux-kernel@vger.kernel.org, Anthony Liguori , Colm MacCarthaigh , Bjoern Doebel , David Woodhouse , Frank van der Linden , Alexander Graf , Martin Pohlack , Matt Wilson , Paolo Bonzini , Balbir Singh , Stefano Garzarella , Stefan Hajnoczi , Stewart Smith , Uwe Dannowski , kvm@vger.kernel.org, ne-devel-upstream@amazon.com Subject: Re: [PATCH v3 01/18] nitro_enclaves: Add ioctl interface definition Message-ID: <20200605081503.GA59410@stefanha-x1.localdomain> References: <20200525221334.62966-1-andraprs@amazon.com> <20200525221334.62966-2-andraprs@amazon.com> <20200527084959.GA29137@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BXVAT5kNtrzKuDFl" Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 01, 2020 at 10:20:18AM +0300, Paraschiv, Andra-Irina wrote: >=20 >=20 > On 01/06/2020 06:02, Benjamin Herrenschmidt wrote: > > On Wed, 2020-05-27 at 09:49 +0100, Stefan Hajnoczi wrote: > > > What about feature bits or a API version number field? If you add > > > features to the NE driver, how will userspace detect them? > > >=20 > > > Even if you intend to always compile userspace against the exact kern= el > > > headers that the program will run on, it can still be useful to have = an > > > API version for informational purposes and to easily prevent user > > > errors (running a new userspace binary on an old kernel where the API= is > > > different). > > >=20 > > > Finally, reserved struct fields may come in handy in the future. That > > > way userspace and the kernel don't need to explicitly handle multiple > > > struct sizes. > > Beware, Greg might disagree :) > >=20 > > That said, yes, at least a way to query the API version would be > > useful. >=20 > I see there are several thoughts with regard to extensions possibilities.= :) >=20 > I added an ioctl for getting the API version, we have now a way to query > that info. Also, I updated the sample in this patch series to check for t= he > API version. Great. The ideas are orthogonal and not all of them need to be used together. As long as their is a way of extending the API cleanly in the future then extensions can be made without breaking userspace. Stefan --BXVAT5kNtrzKuDFl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAl7Z/wcACgkQnKSrs4Gr c8ixagf9FLJp1V9BuzC0rZMPadtO77p0R7zJ3q/JbtZtO6VkFyiP1JuRRIE9QR7v gGacilPQPMMrAXoiRjMojNFWUmOgYbqA51PDjzeQmUIGfgWDdBF8c6toyq3zjpFb KP7GKrvVmKq2ZhvayPbS4lKK8PkFj3RUiHQ8AHxEw6EBb7OtuH2dg0IsXlDG4vv4 NMoHRm6IJ7L2P5e1CEjAyFfVK3/ATw8T7o7xYyYFrvR5AIptV2VC65fbzq5qSYjM +cMxLYVnoqIQmZ9JR/tqEJCH7kNN5/FaCaDcQQGOiv8gWW7YQpFaQZ/YGTYnSB00 FCdtRZy4lkV5WYyK+E51CZ5e8Y5JKg== =haJB -----END PGP SIGNATURE----- --BXVAT5kNtrzKuDFl--