Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3748978rdg; Wed, 18 Oct 2023 05:11:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEtQ3JZEDemmWU2+5jYhuxavm2VPD9AlEt2l75QpvP5YTnmSI9ZhXRhgGlJuWkKTSLVX1D4 X-Received: by 2002:a05:6870:c155:b0:1e9:b9e6:98e1 with SMTP id g21-20020a056870c15500b001e9b9e698e1mr5646465oad.1.1697631099284; Wed, 18 Oct 2023 05:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697631099; cv=none; d=google.com; s=arc-20160816; b=C7G5y5U9z+HNu+rqYVbHH3tdw080pHQTb96U7W9ZI0y+0Z3QRovpiVdExPy3Svml4i j+mbnSXJjEqpzBIMMFIW5vbQEgyRIdqqfY4WpSLlHW6K+mvc8c5ROoDN9Jg+/LFraj3T TtQ5CJrvZpktPqflu1GxX6+oiF3bV32RMIaw2YHG7/GhuUxzdFj2EU74zPd9E3W3FLw8 /DgXtrU6+GgdknttJqZEVmUTOwn9CEel6VQSFric2ypdvYqPqholNVCbJ5c8j+P1jYOk XqGucRMjvMK1TVqzWjUgXmu8kQX94c4ekQUUI7LqhwQlve6ahENVN8hOQkP7PEG4X+jD RUtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cpteRdaSeC7tob8rmjdBOMmGi18cDI0xGfHrQ2xXj/Y=; fh=iWdLQUVnSIgIxbLFrNEqzHtiXNVEx3fwSCeRG1hs4AA=; b=JG4+MJYG5bG1U3tQjPOuXFGSx/DBjDLSg3FIpXqC+7/I4nOQsjSW11k5lZ6Qm7S/Fu Zw8G3DEnZXnBwkycwnjffxSIG9ExaC0tP/l/N57Z01Um0CMEP+s7+McWpuHY3JQj1a/J UT5YfGW9b5AnCCQeTAjvMPP2XV85nrdO6nLyRONnHBbg6kBO3VCX8ilQdFPiKTN+VZYq fWKF7OrXOy7KkBiwjK+BrZdLWPoEk0ER60qZPomEj5+la8nnAY2RdS9ndWIJtvhhIJYK LQ0HTe8+Vz7KdUNEFkxQXZ98AcjXrvWOZq8O33AZ6fUDg+bqGcATMjgx0MFFFwIBpv17 GD+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=et4vpI08; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id h184-20020a6383c1000000b0057851fc2b4asi1989400pge.55.2023.10.18.05.11.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 05:11:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=et4vpI08; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 1BB88808D496; Wed, 18 Oct 2023 05:11:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230262AbjJRML0 (ORCPT + 99 others); Wed, 18 Oct 2023 08:11:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230229AbjJRMLZ (ORCPT ); Wed, 18 Oct 2023 08:11:25 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74D6311D for ; Wed, 18 Oct 2023 05:11:23 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 392DFC433C7; Wed, 18 Oct 2023 12:11:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1697631082; bh=4MLSoNAMnFdfkyMJ9V/sCOwUBrn7iUfYY1QBvTejZKQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=et4vpI080XMgMIsKYaH3K5bni2cUH1sN165jKtpMoW3ZXS0AHeEGjI2Iyqxyk8Z8a Icr+FbJ5/WuOeOqg7jPP6XbC5In2wb3REy816qxwM6s8br6ujBv71z9lMpy1VLJoV4 9hZUq/d49YSf2fYA8keVp8TfUV/XSPz3KV+ROvdw= Date: Wed, 18 Oct 2023 14:11:20 +0200 From: Greg Kroah-Hartman To: Jason Gunthorpe Cc: Saeed Mahameed , Arnd Bergmann , linux-kernel@vger.kernel.org, Leon Romanovsky , Jiri Pirko , Saeed Mahameed Subject: Re: [PATCH 0/5] mlx5 ConnectX diagnostic misc driver Message-ID: <2023101859-wanting-unmixed-7cfe@gregkh> References: <20231018081941.475277-1-saeed@kernel.org> <2023101858-underwire-donated-3ae9@gregkh> <20231018120025.GQ3952@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231018120025.GQ3952@nvidia.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 18 Oct 2023 05:11:37 -0700 (PDT) On Wed, Oct 18, 2023 at 09:00:25AM -0300, Jason Gunthorpe wrote: > On Wed, Oct 18, 2023 at 10:31:23AM +0200, Greg Kroah-Hartman wrote: > > On Wed, Oct 18, 2023 at 01:19:36AM -0700, Saeed Mahameed wrote: > > > Historically a userspace program was used that accessed the PCI register > > > and config space directly through /sys/bus/pci/.../XXX and could operate > > > these debugging interfaces in parallel with the running driver. > > > This approach is incompatible with secure boot and kernel lockdown so this > > > driver provides a secure and restricted interface to that. > > > > Why not just write a UIO driver for this hardware then? > > The old mechanism relied on direct config space and sometimes mmio > access to the PCI device. We did a security analysis and concluded > that approach could not provide the required security for what our > customers want from the secure boot and lockdown modes. We cannot > allow a lockdown userspace direct access to those device registers. > > So, it was redesigned to be RPC driven instead of having direct HW > access. The RPCs allow the device to provide the required level of > security. > > This new misc driver does not expose any HW registers or interrupts to > userspace, so it does not seem like a fit for UIO. Ok, I'll not complain, I always like "real" drivers instead of UIO ones, nice to see this happen! thanks, greg k-h