Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp149222ybg; Sun, 31 May 2020 20:05:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0jZOenNAo2Wllu/dLLzXapHh3VZCjRjBf3nufYpCjAyAgYlgbKfPf83vIZ2QCMnxuDJg8 X-Received: by 2002:a17:906:2b04:: with SMTP id a4mr18183746ejg.98.1590980758074; Sun, 31 May 2020 20:05:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590980758; cv=none; d=google.com; s=arc-20160816; b=H2AFVVbfBGGrNI+5BDoI/rACoDIt8tykpODxaH0DCNVjkoNSHaWWNJ2AYYYvhh4qUO EnqjhJIPxuHNhoSQMlm5N8nK7ArGc9W8+kVml4m4dQl4nVet/WLdt8VAVKiKQdCMGxLG 9WH/AFUyc3mjA7WIg4haBxsBj1dDcsJE+uUrw6HrCI7NtJvwyjrGILOriv2ufzJjOR82 /cvcgGjIVeIfvgkkYKb3X76b7SF5rY/NQN3phFz/ZrP19RAusVaOCFMv2S3hMWviByYZ ErYhwN8LHfqL4n/M4pv0lwRcJZOQqiZgrqFh1pQ0NMxePLIap/AH0vxak1XhyYEaRNVq qmxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=ssZUoy9UGFMhkQgLYGBzOPBKXC64Hp1lw4RG202HjVQ=; b=zi9a8vxMDDCeCHJg7Gu4nR+H0y82V28GAhlM2Ztav2Eq6F2LJArPU+WBlBR/kvYARb 9vQha3LStvH1IV6QEJdDvVyRcnUvVnPdpH2en1NCb16B8AL/vWUGvroo5HqsUPUXTsuA yq+ELMLPmKkKKKmfTgqOTth4IVZRB0FrKoOnk2pTAy/knGT7Kd8R5+NUpnZMDOhg7/Em FCVAWhC0d8fbsNaZTF3I6sy7CWJmPkZRj7Duq/c43BgMkIlVQZWRgMupyFZ2PznRDXCY PbD/iF7tc5Cm3sHyWUoEgl92TG4Sn5pRS3bWDHh9hVhKMy+/2P134VQBmFrlN4MnkrMx G6lA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x20si11615445edi.323.2020.05.31.20.05.36; Sun, 31 May 2020 20:05:58 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727900AbgFADD0 (ORCPT + 99 others); Sun, 31 May 2020 23:03:26 -0400 Received: from kernel.crashing.org ([76.164.61.194]:53958 "EHLO kernel.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726901AbgFADDZ (ORCPT ); Sun, 31 May 2020 23:03:25 -0400 Received: from localhost (gate.crashing.org [63.228.1.57]) (authenticated bits=0) by kernel.crashing.org (8.14.7/8.14.7) with ESMTP id 051330TT003234 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 31 May 2020 22:03:04 -0500 Message-ID: Subject: Re: [PATCH v3 01/18] nitro_enclaves: Add ioctl interface definition From: Benjamin Herrenschmidt To: Stefan Hajnoczi , Andra Paraschiv Cc: 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 Date: Mon, 01 Jun 2020 13:02:59 +1000 In-Reply-To: <20200527084959.GA29137@stefanha-x1.localdomain> References: <20200525221334.62966-1-andraprs@amazon.com> <20200525221334.62966-2-andraprs@amazon.com> <20200527084959.GA29137@stefanha-x1.localdomain> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > > Even if you intend to always compile userspace against the exact kernel > 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). > > 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 :) That said, yes, at least a way to query the API version would be useful. Cheers, Ben.