Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2312615rdb; Fri, 8 Dec 2023 04:52:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHuf6+MAc8zDyRtAZm5Xp3NH3szx1Q6JqXU1647Z8es6bPWXInk7iOpoB+Ubo8SiIZVrm8c X-Received: by 2002:a05:6870:b155:b0:1f5:cd12:260f with SMTP id a21-20020a056870b15500b001f5cd12260fmr23478oal.26.1702039963916; Fri, 08 Dec 2023 04:52:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702039963; cv=pass; d=google.com; s=arc-20160816; b=RBt6peumAETzN4tnqCEH7+LsOnYHG3g+BAszYzAeynouL8rIyXHF6bjZ9ekVPd+Dzh mCh0/Zhjvg1uktZOKiETKzhvspnx0bmEEwBBAkU41HdPRajrS0v1aq+jueQuPlNBL2Jk 9ViHbT7SXzUQWwAXeNWGSAoZ2gSjcNVpXUlqOc3mkSDTW+OybiAFuDyZ19txO3G/Od88 1zAesx+fgyKYS6MC0P/uX/xtC11pNvjckd0zkv7Sc9B10hWt1gLzUa8mtxfeE6HWSdGt Aog1vuBHzJS5OHSzkXGNviaSKT1hWi6vUe9dcUzHXaLqwg1hUs1yEyn0D7HGkwBim0yB FUcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6OgG/WfjLhLBw6tD7Jdpnxex9z9UjmgI3dvCwGd6Yao=; fh=lN8LiMoqhRwHQMezwzBCGQFinmzxh3Emw9UoDV+Me3A=; b=zfNIYDyrZpUtDWpEiJlOrID7PiDrIN6ubFZWJRKv1lEQIPgfondsdZF0tfw3AQQOhu YaRi91y6BQpGisIQuupMxsnzI1ylykBGsrU9Q8TP1hnRfC6T31YxVLXYhawKyPgZh7d8 T4CmxaYiN1BfQZeNBB8gd1SrSYpbeLhw4Ee6W3hPh/e67GEp4X1TWgAzjZn6ZLH9xbHV +aIIlr1Jxc02ScgE76H8v4yFMF9VL+dYrAF9fgPubFq4O/DzCTU6orhLwCnvTDqO4FyB tktAxzxxFD1wb0274i5n7Ut6fSC9QjB1Uq/8oGxxu/K3wrZL5XAtsc2b5I5vlGGNVV+N WWSQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=jxa3MYTQ; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id q35-20020a635c23000000b00577f67a0614si1428257pgb.879.2023.12.08.04.52.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 04:52:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=jxa3MYTQ; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 80501808AB96; Fri, 8 Dec 2023 04:52:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573736AbjLHMw1 (ORCPT + 99 others); Fri, 8 Dec 2023 07:52:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbjLHMw0 (ORCPT ); Fri, 8 Dec 2023 07:52:26 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2082.outbound.protection.outlook.com [40.107.93.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2882311C for ; Fri, 8 Dec 2023 04:52:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hH7WlHGrHVSuCxyfUyWJUoQaZo41VEfqemlcXJPI5RKg6hiKuEKIeotwZ02eOq/0r5oLxKZJPP5yrjb5pkTpX20C8mMCG1MCg/YWaMk6GxBUlxK3Y+6tEjdWKCRYTJg+1Jt2SOl+oj9QWHMQtH+1tTRabwrCxjAFzjGZsyguTaJvfjNh8lTEYr4lnPp3usc9Ebf6+CA0RfmR1dQ3xSATQBokmzOSW+xOW6ZtH0ay/S0GaLbytLKutno1Ced0KheW2+xcd0CjyIQzr4lkN3wgZmlSd0nSSByw6RKtlzvn97tyeNVKpIn0TJjCKd7rxa5pR4xInEqilvPDrSYSdafb7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6OgG/WfjLhLBw6tD7Jdpnxex9z9UjmgI3dvCwGd6Yao=; b=F+YruqnqBxxKYIIq/lY+gXTuJNWDFD4ir53PkHMba3zAqxdv9fybfn+svBfctVQo9DwE8u8M96sFBYWvEWMZZduDfq+gmsghcMuzqBaxhGNkuZbewlIdoQ5UoZsZcsSRQAM858QWBkPZwa1HyTZ4bTEseJOZ+Sb/LIJKFaRvL7jR49M+Hkrd/5uqsUHz573cn7SoQSNAPh6OzRc4d8PTv5fx5zUkWNSDd8foWBwnPgLQ0KdfKy1ntRe0aHsM6eFqFqwobBS316+nfmUC1u8LRCbsCO/PIgVVdKLcsJejYaX5glb85yaB/bni/d7ROglbEPzSUnaXBTmzW+aAcoQUNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6OgG/WfjLhLBw6tD7Jdpnxex9z9UjmgI3dvCwGd6Yao=; b=jxa3MYTQhwd6MoKvt1sGkHom8qQny5FsmqsWGZpuIsx1n/07P8v8snapZibvXcMm8qFnbaDJlhg+rpSl+TpRef/yXM60sy9yULvRG/7tFvlyA5fpv/nFR4cTMeAqtGpZ7duxQ8TM79tNBMvZQt7urAWa0NkhBD+xAzVndSrXmZbe/i1l50Li5sfrCH/P+/HQTzYi7aC4EI0b5ERklO98LQ16bHgpD76CS4FknJ3wc//OCD54RIp0f8F0SaNUuc4yfL7ma5DrpegZtfF5C4VypoXT4KxcMqi+dZVpdApw17/+up7BrrD/0ujmnzCqEJWdWODFqNrusI7/Vn9psNkwFw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) by SN7PR12MB6983.namprd12.prod.outlook.com (2603:10b6:806:261::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.28; Fri, 8 Dec 2023 12:52:29 +0000 Received: from LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::60d4:c1e3:e1aa:8f93]) by LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::60d4:c1e3:e1aa:8f93%4]) with mapi id 15.20.7046.038; Fri, 8 Dec 2023 12:52:29 +0000 Date: Fri, 8 Dec 2023 08:52:27 -0400 From: Jason Gunthorpe To: Greg Kroah-Hartman Cc: Aron Silverton , Jakub Kicinski , Saeed Mahameed , David Ahern , Arnd Bergmann , Leon Romanovsky , Jiri Pirko , Leonid Bloch , Itay Avraham , linux-kernel@vger.kernel.org, Saeed Mahameed Subject: Re: [PATCH V3 2/5] misc: mlx5ctl: Add mlx5ctl misc driver Message-ID: <20231208125227.GO2692119@nvidia.com> References: <2023112922-lyricist-unclip-8e78@gregkh> <20231204185210.030a72ca@kernel.org> <20231205204855.52fa5cc1@kernel.org> <20231207092329.3ec04dca@kernel.org> <2023120857-calculus-concerned-cef0@gregkh> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2023120857-calculus-concerned-cef0@gregkh> X-ClientProxiedBy: MN2PR22CA0008.namprd22.prod.outlook.com (2603:10b6:208:238::13) To LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV2PR12MB5869:EE_|SN7PR12MB6983:EE_ X-MS-Office365-Filtering-Correlation-Id: 37ee2b8b-472f-4dbb-f01b-08dbf7ec892f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XmmqrXvVSVULCsDYzLu2ckpVKMKsr+mnL3fRlM9esaKhAmHLEqEZ/cveYZfyzV3xYolBXSzF93U0lyHzG5QqYgGx6NLrbxc9ssaX3Y/fqA5ePeT0Ip6qPsDsVJG5Gx5V8zlGt7wqYzL52UP9eueUHEGrKG0OYkYqanXElnvAJjJzy4i3yFQMULcrAPzfeoFTt7ylDYADOrPXAWgOr8vT+SX30hP7+xBUDPdojC2bCu4B2XHtQeuFRhb7t9KE1at4fJQCdosP1xK8CZ5p9+ePah9Meg1NeZP3bF840zPWPtBVlKpK7bvcBLwrKNAwWPwEjdURY5SFMi2+4WU1NdA/T3cVjFx1fSWVB3Pd/J6es937tV5wkw81DMRL6h2xuo5+WHWxQqRGezkvl6g1mssb+EoZlS725SMp7nSRqbxM43kIyxPlhFLeLOrc1/fzDV8527XgI+0RO/xDTTY3BbyU7Sa2RFREOB4ZHkuvFub8cSz+cEsb58A3be063aNmtHITpsSjU8NE9wmBamH9DiYqx68djPksyO6ypy9usFKM8RjfwLUk0Qnl2g7wBljL4OQtGfzEMIO38SBb7jpY1kxxPFIcHk2a1d8DCzz6TaVyHw6F4p38xR37lWltB4I5WRBsIxqOiSPt2i0gCB2s2A/H6qaAOan3ax7ldlhk0H3d/oA= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV2PR12MB5869.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(376002)(396003)(346002)(39860400002)(366004)(230922051799003)(64100799003)(1800799012)(186009)(451199024)(83380400001)(1076003)(6512007)(26005)(2616005)(107886003)(33656002)(6506007)(478600001)(6486002)(316002)(6916009)(66476007)(66556008)(66946007)(54906003)(38100700002)(8936002)(8676002)(86362001)(36756003)(4326008)(5660300002)(2906002)(41300700001)(42413004)(32563001)(21314003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?LvJjzjA381o9DdNnXcmiO8GHrj9+c6yA7dYu0B/1nMTP3nVBZTrR1Q9dFVEN?= =?us-ascii?Q?kangAuUuxAdrkz05NHJQwD1Tl/YWjxLoQjwDw9X46ec1zJ9L6mJkkmuoKoXe?= =?us-ascii?Q?u3PQhnp5nzMgl+u9IoMU92Ef+ewoz3T6II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q?CB33pCFb+z6lpfM4t4XzUoEni+ZnsCDipp5RC+4spw4RR6suQ88axdVYfhy3?= =?us-ascii?Q?VCl1nwksbR0TmMLzhSG60Yb8Q6I5oP1tHHI/RxRKenOz2lYbxxqs50E7C5QR?= =?us-ascii?Q?5xVnv5HUMTHhv/EZf7isJrTQe5wRXP3Zsi42KxKnDek6T1I8zrg8FsXKneO2?= =?us-ascii?Q?g6uw2smQbHb9V7aWx9zxSeEKlBYahGksamrCE9QaNrbTpyzVkVt1eIZWoWlC?= =?us-ascii?Q?YLZ5w4ZSnvpuzobygRWqSjDo/fcE53fVpnAicV1O59Wd1D947X8q4G5f3/33?= =?us-ascii?Q?AsCAioOo4Okg9DmThq0z24d8Qo8PjjjvhDi9eXhhuulUTDETo1TObqvHWf0Q?= =?us-ascii?Q?UkN8ddJNJRgsBdOZicVPyGZ4xY7glZwe2D/KeXJakB4H6epTXVLKmPBxPzYG?= =?us-ascii?Q?C8gFTRVs66HFbmAw2e7Au46qW/sIpCV7+D+wvbeFJVrDNzDamZTnvKf13WNc?= =?us-ascii?Q?frDKL0lz55ZNbc0/l6XP048HkcoK4t6KQk68KJ5AwD2i1rUdL0aaSGLQmoFn?= =?us-ascii?Q?DhCW/yr3OMPR1WSThyPt88/60Sdk36z5xnsXWX7g?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 37ee2b8b-472f-4dbb-f01b-08dbf7ec892f X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2023 12:52:29.0730 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PyO7wup2XYe/zFpHlApyU/sd26boc4ExyINYEP2fl9w7Vmo2GWyvYLCQx1cUIkuc X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6983 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Fri, 08 Dec 2023 04:52:41 -0800 (PST) On Fri, Dec 08, 2023 at 06:27:14AM +0100, Greg Kroah-Hartman wrote: > When they do that, they break the reason why the distro/vendor decided > to prevent access to debugfs in the first place, making the whole system > insecure again! Maybe others have, be we did not! In fact Saeed addresses this explicitly in the cover letter: 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. We did a lot of work here to build an interface that is compatible with the security principles of lockdown. This work is embodied by the new FW bit MLX5_UCTX_OBJECT_CAP_TOOLS_RESOURCES which causes the FW to run these RPCs in a security context that is compatible with lockdown. The overall philosophical architecture is similar to the NVMe vendor command channel which is also a way to deliver opaque RPCs to a device FW and is considered lockdown compatible. This series is not some insecure attempt to bypass lockdown like you may have seen in Android. mlx5 is the driver for the most popular high speed NIC in the world. Our customers take security seriously, and we take security seriously. Jason