From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD9B8C433DF for ; Mon, 1 Jun 2020 02:59:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 89C8320776 for ; Mon, 1 Jun 2020 02:59:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728175AbgFAC7c (ORCPT ); Sun, 31 May 2020 22:59:32 -0400 Received: from kernel.crashing.org ([76.164.61.194]:53932 "EHLO kernel.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727820AbgFAC7c (ORCPT ); Sun, 31 May 2020 22:59:32 -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 0512xBhh003181 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 31 May 2020 21:59:15 -0500 Message-ID: Subject: Re: [PATCH v3 02/18] nitro_enclaves: Define the PCI device interface From: Benjamin Herrenschmidt To: Greg KH , "Paraschiv, Andra-Irina" 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 12:59:10 +1000 In-Reply-To: <20200526222109.GB179549@kroah.com> References: <20200525221334.62966-1-andraprs@amazon.com> <20200525221334.62966-3-andraprs@amazon.com> <20200526064455.GA2580530@kroah.com> <20200526222109.GB179549@kroah.com> 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 00:21 +0200, Greg KH wrote: > > There are a couple of data structures with more than one member and multiple > > field sizes. And for the ones that are not, gathered as feedback from > > previous rounds of review that should consider adding a "flags" field in > > there for further extensibility. > > Please do not do that in ioctls. Just create new calls instead of > trying to "extend" existing ones. It's always much easier. > > > I can modify to have "__packed" instead of the attribute callout. > > Make sure you even need that, as I don't think you do for structures > like the above one, right? Hrm, my impression (granted I only just started to look at this code) is that these are protocol messages with the PCI devices, not strictly just ioctl arguments (though they do get conveyed via such ioctls). Andra-Irina, did I get that right ? :-) That said, I still think that by carefully ordering the fields and using explicit padding, we can avoid the need of the packed attributed. Cheers, Ben.