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 Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA5DEC433FE for ; Mon, 6 Dec 2021 10:49:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 572C24B0BA; Mon, 6 Dec 2021 05:49:07 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ivobWxOldrnR; Mon, 6 Dec 2021 05:49:06 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 2B0CC4B08F; Mon, 6 Dec 2021 05:49:06 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id A05B14B08F for ; Mon, 6 Dec 2021 05:49:04 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9TJ93JbnE2f3 for ; Mon, 6 Dec 2021 05:49:03 -0500 (EST) Received: from theia.8bytes.org (8bytes.org [81.169.241.247]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 56BCA4B08E for ; Mon, 6 Dec 2021 05:49:03 -0500 (EST) Received: by theia.8bytes.org (Postfix, from userid 1000) id BB60137E; Mon, 6 Dec 2021 11:48:57 +0100 (CET) Date: Mon, 6 Dec 2021 11:48:23 +0100 From: Joerg Roedel To: Eric Auger Subject: Re: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API Message-ID: References: <20211027104428.1059740-1-eric.auger@redhat.com> <20211027104428.1059740-2-eric.auger@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211027104428.1059740-2-eric.auger@redhat.com> Cc: kvm@vger.kernel.org, vivek.gautam@arm.com, vdumpa@nvidia.com, kvmarm@lists.cs.columbia.edu, eric.auger.pro@gmail.com, jean-philippe@linaro.org, yi.l.liu@intel.com, ashok.raj@intel.com, maz@kernel.org, vsethi@nvidia.com, nicolinc@nvidia.com, zhangfei.gao@linaro.org, sumitg@nvidia.com, kevin.tian@intel.com, jacob.jun.pan@linux.intel.com, will@kernel.org, nicoleotsuka@gmail.com, alex.williamson@redhat.com, wangxingang5@huawei.com, chenxiang66@hisilicon.com, linux-kernel@vger.kernel.org, lushenming@huawei.com, iommu@lists.linux-foundation.org, robin.murphy@arm.com X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Wed, Oct 27, 2021 at 12:44:20PM +0200, Eric Auger wrote: > Signed-off-by: Jean-Philippe Brucker > Signed-off-by: Liu, Yi L > Signed-off-by: Ashok Raj > Signed-off-by: Jacob Pan > Signed-off-by: Eric Auger This Signed-of-by chain looks dubious, you are the author but the last one in the chain? > +int iommu_uapi_attach_pasid_table(struct iommu_domain *domain, > + void __user *uinfo) > +{ [...] > + if (pasid_table_data.format == IOMMU_PASID_FORMAT_SMMUV3 && > + pasid_table_data.argsz < > + offsetofend(struct iommu_pasid_table_config, vendor_data.smmuv3)) > + return -EINVAL; This check looks like it belongs in driver specific code. Regards, Joerg _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 64441C433F5 for ; Mon, 6 Dec 2021 10:49:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 0361481763; Mon, 6 Dec 2021 10:49:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dd6dgOBqcpAE; Mon, 6 Dec 2021 10:49:08 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id C6EBF81769; Mon, 6 Dec 2021 10:49:07 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7C9C5C001E; Mon, 6 Dec 2021 10:49:07 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 55849C0012 for ; Mon, 6 Dec 2021 10:49:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 483DB40224 for ; Mon, 6 Dec 2021 10:49:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pM-x3zFfn8P5 for ; Mon, 6 Dec 2021 10:49:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by smtp2.osuosl.org (Postfix) with ESMTPS id 1067D400A4 for ; Mon, 6 Dec 2021 10:49:04 +0000 (UTC) Received: by theia.8bytes.org (Postfix, from userid 1000) id BB60137E; Mon, 6 Dec 2021 11:48:57 +0100 (CET) Date: Mon, 6 Dec 2021 11:48:23 +0100 From: Joerg Roedel To: Eric Auger Subject: Re: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API Message-ID: References: <20211027104428.1059740-1-eric.auger@redhat.com> <20211027104428.1059740-2-eric.auger@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211027104428.1059740-2-eric.auger@redhat.com> Cc: peter.maydell@linaro.org, kvm@vger.kernel.org, vivek.gautam@arm.com, kvmarm@lists.cs.columbia.edu, eric.auger.pro@gmail.com, jean-philippe@linaro.org, ashok.raj@intel.com, maz@kernel.org, vsethi@nvidia.com, zhangfei.gao@linaro.org, kevin.tian@intel.com, will@kernel.org, alex.williamson@redhat.com, wangxingang5@huawei.com, linux-kernel@vger.kernel.org, lushenming@huawei.com, iommu@lists.linux-foundation.org, robin.murphy@arm.com X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Wed, Oct 27, 2021 at 12:44:20PM +0200, Eric Auger wrote: > Signed-off-by: Jean-Philippe Brucker > Signed-off-by: Liu, Yi L > Signed-off-by: Ashok Raj > Signed-off-by: Jacob Pan > Signed-off-by: Eric Auger This Signed-of-by chain looks dubious, you are the author but the last one in the chain? > +int iommu_uapi_attach_pasid_table(struct iommu_domain *domain, > + void __user *uinfo) > +{ [...] > + if (pasid_table_data.format == IOMMU_PASID_FORMAT_SMMUV3 && > + pasid_table_data.argsz < > + offsetofend(struct iommu_pasid_table_config, vendor_data.smmuv3)) > + return -EINVAL; This check looks like it belongs in driver specific code. Regards, Joerg _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 654E0C433F5 for ; Mon, 6 Dec 2021 10:49:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240289AbhLFKwd (ORCPT ); Mon, 6 Dec 2021 05:52:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239446AbhLFKwd (ORCPT ); Mon, 6 Dec 2021 05:52:33 -0500 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82A16C061746; Mon, 6 Dec 2021 02:49:04 -0800 (PST) Received: by theia.8bytes.org (Postfix, from userid 1000) id BB60137E; Mon, 6 Dec 2021 11:48:57 +0100 (CET) Date: Mon, 6 Dec 2021 11:48:23 +0100 From: Joerg Roedel To: Eric Auger Cc: eric.auger.pro@gmail.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, will@kernel.org, robin.murphy@arm.com, jean-philippe@linaro.org, zhukeqian1@huawei.com, alex.williamson@redhat.com, jacob.jun.pan@linux.intel.com, yi.l.liu@intel.com, kevin.tian@intel.com, ashok.raj@intel.com, maz@kernel.org, peter.maydell@linaro.org, vivek.gautam@arm.com, shameerali.kolothum.thodi@huawei.com, wangxingang5@huawei.com, jiangkunkun@huawei.com, yuzenghui@huawei.com, nicoleotsuka@gmail.com, chenxiang66@hisilicon.com, sumitg@nvidia.com, nicolinc@nvidia.com, vdumpa@nvidia.com, zhangfei.gao@linaro.org, zhangfei.gao@gmail.com, lushenming@huawei.com, vsethi@nvidia.com Subject: Re: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API Message-ID: References: <20211027104428.1059740-1-eric.auger@redhat.com> <20211027104428.1059740-2-eric.auger@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211027104428.1059740-2-eric.auger@redhat.com> Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Wed, Oct 27, 2021 at 12:44:20PM +0200, Eric Auger wrote: > Signed-off-by: Jean-Philippe Brucker > Signed-off-by: Liu, Yi L > Signed-off-by: Ashok Raj > Signed-off-by: Jacob Pan > Signed-off-by: Eric Auger This Signed-of-by chain looks dubious, you are the author but the last one in the chain? > +int iommu_uapi_attach_pasid_table(struct iommu_domain *domain, > + void __user *uinfo) > +{ [...] > + if (pasid_table_data.format == IOMMU_PASID_FORMAT_SMMUV3 && > + pasid_table_data.argsz < > + offsetofend(struct iommu_pasid_table_config, vendor_data.smmuv3)) > + return -EINVAL; This check looks like it belongs in driver specific code. Regards, Joerg