Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp146967ybg; Sun, 31 May 2020 20:01:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuqxLMqeiL4UYOucdULjWzT6HnKG5mWvTXBO5Z7JYWO3OMjvxvaqFnoeRu4suo88ooYPfH X-Received: by 2002:a50:8b44:: with SMTP id l62mr1727025edl.72.1590980497000; Sun, 31 May 2020 20:01:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590980496; cv=none; d=google.com; s=arc-20160816; b=rXMGiVQxG8ErRwfqPPGA4NdHVQjM6tiSX2QNOrcBaNtHo0bRiOwUHSn8tKIkWKH4hl rmtUiwuIOb/COH0TT2bO7iD5WY0i7A5ApPFecS/jmSEdNsfrmkCA3aW2SNgcCZe0pYS4 gIk9D7sDs5rHycdbQ3pHiSuTxlCTismysQuT+EWKYzr04g8GuGEzgGIC6ku4cyZIPyRO MXri0eAEn6conDJ64B/OzbQbIpgtj1NVwrmGge8QGuDLcjoWKcDOd2cJBdUkNzYoKwBm pGF/igD7DHF5Ogz9os+sdjlXwvGUxKZOwNaEH6Wmw0Rt5r/4xyZpVBOIWaDUJvqnk3Yt u+0g== 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=eQcMkgMQ6kytEM6WWITKVBDD5a6y+IEL18LnE3A67Uc=; b=qdrDqMjOFLQmUXGQ0BXCX6loCedNhhkkANjqYx9egoOP97EKtTZoxW9S0Xjzy5M0nW naBTKmngDAh3sBd6NZHRK0wNA2SJG38X6UU2ccIjvgRKbPiVOYX/bs2RuraTwPA+PZ+F v0JaNAte+MlmDb6E8yccDi/5SVvGAnb8Sgu4zkTiffwdpwe8vOuzHH1VBftDTzfYZKuw iNPU8ql6rOq0XAvaHFOGT3UpCL6iaAvZMt8nuMwooun6bZyWyi3sw/J0/MWI6ChhnRkb VZSHmnlkIUm8R5BAuTSkWRo2VWhpSFssX8Iq/3XRDMtbTU1d2ABa2CrqnLeXNqwGZAVm sOFA== 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 n9si5288419ejz.644.2020.05.31.20.01.13; Sun, 31 May 2020 20:01:36 -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 S1728166AbgFAC7c (ORCPT + 99 others); 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.