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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 6C175C433DF for ; Tue, 26 May 2020 22:21:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D384208C9 for ; Tue, 26 May 2020 22:21:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590531673; bh=k6NIXNBHoIFJMYLYcaW8jcJWWohY5des9NYh3DMl9v0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=KyD40wnTRFnagCP1xKx2GS7RRjn0uloGiVtEKcgPdPCx8+57T9kroTOZawGp5dBm0 jCfvrp+LGNWliZxGoHPqynrpPae05rnHtH7j/AHKJjG3tNgWB0bW/gRSVFyHCRPehq tjgkAVYI4fKdSVZBazlj6Dsw7d2QQgLJQGeFwrbc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404052AbgEZWVM (ORCPT ); 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