Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp216834lqa; Fri, 26 Apr 2024 22:35:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVpdHEUDEYnMjoqHStEZPTzjzdiv4DMOLl759nA+OolyPRk1hVnTVYdI/gZ68gCUWDvcSxkuXlmhR49xyE0Ny2u85aDj+Tf7zF6AyL2nA== X-Google-Smtp-Source: AGHT+IFBWbwyWfDkY3fQ0MtGjffhqWRbF0ebHsuv3QKIYK37pf700F2FQ8lwlcCdXEO5tnPqUlK3 X-Received: by 2002:a17:902:d4c4:b0:1ea:95f3:b0a5 with SMTP id o4-20020a170902d4c400b001ea95f3b0a5mr2230196plg.0.1714196147388; Fri, 26 Apr 2024 22:35:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714196147; cv=pass; d=google.com; s=arc-20160816; b=QU2416aIK7ENAZWX3uYmC794d1+Mc9gFAu+rl+TEgY/4vAfaEvEPtvyn4h5ie1Stb4 s9yq1SF0Dn0LcnXIlZQHIODmORz3KApwZOW5++w5GXqVLa2W8VAoXh3YV89Fu4PbmMfW Tqk5hfz6sNbyqPtZog0frFzdjF73dadnoy4mdgXe4ovIvfVcBd+8yac9Ckgg31j2UQo8 C+/Z1u4umjGHzUooH2ZcAcbvfZvSHIbgSXjYz1X1et7jg3YaRMgQ+EbLC2RqIkwsgB7F DzoljvzHNcwv65Jzn+PjShkAnBx0Je4Z5/aj8ATunX3jx5E1eKj9I/hXvIcG39pL4GYV 4Cdg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=KY2WzbDBo/OxdnW2KhS/yyHjxKD8eqidz0ymMyzvlkU=; fh=heenNTU1QnjL4yrjG7z6owEkc38KIR1Yq+lzeXiyU0I=; b=FWG85yEBzyFSXB7SqjIvjlrKLqlkcP4kzxCekaL6uEMF2oyS31fv/FC7dwNd2fRqQS AdBruJ5y83aVBfue6ZXP5iafqHrY0caT47cmQagJUB8HVo7ZcHWrCFg2xqq3vSXGalb1 LE/QLxojI7faTAZp8psL7X7dwndzYMgmhOkdIFyrCGUsiI6eGwirx7wUgadQ0pXL0oQi oqrZGkswOoeoRi+58RgfTH38ysGw+hbJlT06G9NKrpICw7yNQXZb7XsL74905xw+oRTi L48Rc+sjOZNFe8QIL2YBTF55EAK6JeDOBIYBagA1Xt0OHGq7Gbia11/S0gThW2f4vBiC OZlw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-160909-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160909-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id n15-20020a170903110f00b001e9661a1b8dsi8262454plh.128.2024.04.26.22.35.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 22:35:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160909-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-160909-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160909-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D236828288D for ; Sat, 27 Apr 2024 05:35:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 07AF840850; Sat, 27 Apr 2024 05:35:41 +0000 (UTC) Received: from bmailout3.hostsharing.net (bmailout3.hostsharing.net [176.9.242.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55BA73FBBF; Sat, 27 Apr 2024 05:35:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=176.9.242.62 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714196140; cv=none; b=frtfIGMPz/Yil5AZES1/kIop6RTD6sAz2iCIk2MgfgPlfG+MeY5+7dhWBthKfaItsmsOyfbqS3zCvePlqrnrfz9A9ThV0xaGwK169N56set9MXMqa03Qjdyc7a4DijPQ3MUgu8JBN9nM+E4mv4Jj2aqDTwO+EZGFyoVOjM4rNaA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714196140; c=relaxed/simple; bh=FydKzk9IMY7WF4Up9h/mfHIIoqBtqlvl//KZxLqMQ5E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=o8LrVr9ojrAwGmrXmHdk6kwhSLn8x5DbvHzrlFSc+QmaxxuspqmnfeVNmMxB4WQ/G2961VEUz+W0o26yU9e5yJ+ubJyVdhQ7T3wHQqAsQQEz5iCJm5A/QL9nJHQ+N7H5iHdEbEVZtcYAoVcIfzLDwvVdM5OjZgx5jeEKQqq2WPE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de; spf=none smtp.mailfrom=h08.hostsharing.net; arc=none smtp.client-ip=176.9.242.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=h08.hostsharing.net Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 019D11019569E; Sat, 27 Apr 2024 07:35:34 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id B1DE771E12; Sat, 27 Apr 2024 07:35:33 +0200 (CEST) Date: Sat, 27 Apr 2024 07:35:33 +0200 From: Lukas Wunner To: Mika Westerberg Cc: Esther Shimanovich , Mario Limonciello , Dmitry Torokhov , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Rajat Jain , Gil Fine Subject: Re: [PATCH v4] PCI: Relabel JHL6540 on Lenovo X1 Carbon 7,8 Message-ID: References: <20240416050353.GI112498@black.fi.intel.com> <20240419044945.GR112498@black.fi.intel.com> <7d68a112-0f48-46bf-9f6d-d99b88828761@amd.com> <20240423053312.GY112498@black.fi.intel.com> <7197b2ce-f815-48a1-a78e-9e139de796b7@amd.com> <20240424085608.GE112498@black.fi.intel.com> <20240426045207.GI112498@black.fi.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240426045207.GI112498@black.fi.intel.com> On Fri, Apr 26, 2024 at 07:52:07AM +0300, Mika Westerberg wrote: > On Thu, Apr 25, 2024 at 05:16:24PM -0400, Esther Shimanovich wrote: > > I did find one example of a docking station that uses the DSL6540 > > chip, which has PCI IDs defined in include/linux/pci_ids.h: > > #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_4C_NHI 0x1577 > > #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_4C_BRIDGE 0x1578 > > It seems like it has an NHI, despite being in an external, removable > > docking station. This appears to contradict what you say about only > > having "NHI" on a host router. I am assuming that by host router, you > > mean the fixed discrete, fixed thunderbolt chip, or the thunderbolt > > controller upstream to the root port. Please correct me if I got > > anything wrong! > > So it goes same way with other discrete chips from Intel at least. It is > the same silicon but the NHI is disabled on device routers. > > That said, it is entirely possible for a "malicious" device to pretend > to have one so we need to be careful. If a device (accidentally or maliciously) exposes an NHI, the thunderbolt driver will try to bind to it. Do we take any precautions to prevent that? AFAICS we'd be allocating a duplicate root_switch with route 0. Seems dangerous if two driver instances talk to the same Root Switch. This looks like something that needs to be checked by Intel Validation Engineering folks. Have they been testing this? (+cc Gil) Thanks, Lukas