Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp318657ybm; Tue, 26 May 2020 18:05:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3F8dBfNeLMbkhGYgQKb6D3xvWwxP4rxNtw+rKgA9XZ16mDN0P0yOfF0m9bD1s3KhDck1C X-Received: by 2002:a17:906:1b48:: with SMTP id p8mr3250032ejg.399.1590541545691; Tue, 26 May 2020 18:05:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590541545; cv=none; d=google.com; s=arc-20160816; b=eGGpYNx0j0mYRsLtE6kpUgFdOznMGMsWuE0eZojih87iBxBW7pvaV5gN5QFJxDvJc1 CE6/EBCzIylkVwoLDHhS746yKPooJjrICnJONI94DQyE0HHDpPfpkJ8KlBFTql1xDUHQ KUc0vfrsnRyelQfixgz48Jm+8rgJN1XYZXz3rsJJ1CrL9AIRqRx1s5HudsCoFw7Or4mk jOy8nYdTgLLOFUeUzTdzHhER2iXFYMWUnOE7Xe4/zAyJDUov29fIsEerCttvl4RLdC4w z/Gsxach1fRvmjhUaWEwzkb1tgsBDpyUj7tIrc3st8CJ+RE61PK6KzP1bF7oP/bqTNLD U9Iw== 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=aKF8bOVat6Ozing5HUVHKoaI7q7xvTqir8oDzlP0pv4=; b=XHLQj6QmQ5ExProULli8c5GbDf6F+7MYjnSWR+e1gFMex6RhPhJN9XDB+Cap9gMoL2 QgASJldBi6sx0E90RZQKPGrb4yBI+yrghHuFswZdJHpjY2j0/oeuXZqJBCn1DfpH+787 mL9ogpQZhXGnE5qjnzb00n3d3WZfvs6Z4pVjunwHFU8G4C5sF9ZJV9H8p1c1fj0Q7xTl WLqZG+pUrFKF30JXUBFv9RG1gU2fF1qanaU3kp4fvNKiWMQqJ0UPZwdbg2apPcuj4qLW c5xJcoLwh1vzjQ74Jl3L3rXM/nMyE1OWz+2qMXWcg8aSsNIbreiciXfES9HFxGmUzD8n 8t5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NjbrWojN; 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 r6si749881eds.227.2020.05.26.18.05.22; Tue, 26 May 2020 18:05:45 -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=@kernel.org header.s=default header.b=NjbrWojN; 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 S2404009AbgEZWVM (ORCPT + 99 others); Tue, 26 May 2020 18:21:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:51528 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389613AbgEZWVM (ORCPT ); Tue, 26 May 2020 18:21:12 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1E6702088E; Tue, 26 May 2020 22:21:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590531671; bh=k6NIXNBHoIFJMYLYcaW8jcJWWohY5des9NYh3DMl9v0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NjbrWojNPIP9ULpJoH0B3tWwkklW2Z0wpLZJEcvPJfFqWKz/a65iA0chn3WfRjxkL HXkAegoMHuaX3JkVpmInezV/jdykRI9EI1YjKpbYb2LthaE0G2XDS/YqOsExkZGd1v UXhY+Guu4J1Ye/nzO2SmV9cd4+WpStIE1aqLZbi4= Date: Wed, 27 May 2020 00:21:09 +0200 From: Greg KH To: "Paraschiv, Andra-Irina" Cc: linux-kernel@vger.kernel.org, Anthony Liguori , Benjamin Herrenschmidt , 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 02/18] nitro_enclaves: Define the PCI device interface Message-ID: <20200526222109.GB179549@kroah.com> References: <20200525221334.62966-1-andraprs@amazon.com> <20200525221334.62966-3-andraprs@amazon.com> <20200526064455.GA2580530@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 On Tue, May 26, 2020 at 08:01:36PM +0300, Paraschiv, Andra-Irina wrote: > > > On 26/05/2020 09:44, Greg KH wrote: > > On Tue, May 26, 2020 at 01:13:18AM +0300, Andra Paraschiv wrote: > > > +struct enclave_get_slot_req { > > > + /* Context ID (CID) for the enclave vsock device. */ > > > + u64 enclave_cid; > > > +} __attribute__ ((__packed__)); > > Can you really "pack" a single member structure? > > > > Anyway, we have better ways to specify this instead of the "raw" > > __attribute__ option. But first see if you really need any of these, at > > first glance, I do not think you do at all, and they can all be removed. > > 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? thanks, greg k-h