Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp530147ybn; Wed, 2 Oct 2019 02:00:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFoyCkjPtOc4chDYa2lkNP0UnfrahZ+5p6Up8EKP4qjGp6oueMab+or2qN2u6RHo3wWXJD X-Received: by 2002:aa7:d803:: with SMTP id v3mr2571630edq.146.1570006800566; Wed, 02 Oct 2019 02:00:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570006800; cv=none; d=google.com; s=arc-20160816; b=XVG6XaRhfBEvk1WkuwaUk2T2h8kILHPT991rgFIrDhYfo+PM5d9iwJin6fUR7kbmGT wj9Hx84HyPh+ZvrkhVsI72ytZF0LGzjITHOjKz9HCVPbZP8gX6QfrUhMngzHh/gnTDBo G4zFusD1IHDO6g9+j4kdQHhC4v+y9JajFVYPUQTtU+/lBqxvNQW3Sy3jUGDsrsAN1BIc 8t9Z8WMMSyu+8nsyUYwGyGl6GK7gXvVqL00amOCdhPQHXYMv3lIPA0wBSfhByoObaeIS 7Uo6vi3IhFssFnw/g8Kd3lK5PUU5i7DFAAjsAWapql7tZVVIMgtVQhSzI4aPUoj0TQQ2 7M3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=P+1MMQ/mth/eKI83E7whtGKHrfNKHQN94eHn3f5lEv0=; b=xmyoqy3mWdMKtb3CW96+hr0K9IIA4+ViW/b6tr9HB7SdALzbYfbXYh876ZRYVjwM8P JBpLXrCZQascZ/N8Mbbewem1xTNJr+dquTAh+EdvIKKaslmDC72/EAxjs0+qRwyJfMGv HvmoyC2rWsPrRhHKSwYYcZGXpRtrjz74gBpySivm+C+RufzjhNIJyBIot70fTrz6/eDT bPheRahrkytDoyRtWHGeUxxuLI81C4xzuZYv/GVmEiq/zCrpTk19CuB9dKM3B2kyZ1Ac MffqWuTGNqE/rCCCSlbXoqJLwnvfYAR37BP3Yr1YzVRIdaGg8OIAQsR9hn8yOZ2yJwJv pNcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s7si11641446edd.290.2019.10.02.01.59.36; Wed, 02 Oct 2019 02:00:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726784AbfJBIjT (ORCPT + 99 others); Wed, 2 Oct 2019 04:39:19 -0400 Received: from mga03.intel.com ([134.134.136.65]:10445 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726102AbfJBIjT (ORCPT ); Wed, 2 Oct 2019 04:39:19 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Oct 2019 01:39:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,573,1559545200"; d="scan'208";a="205279402" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by fmsmga001.fm.intel.com with SMTP; 02 Oct 2019 01:39:14 -0700 Received: by lahna (sSMTP sendmail emulation); Wed, 02 Oct 2019 11:39:14 +0300 Date: Wed, 2 Oct 2019 11:39:13 +0300 From: Mika Westerberg To: Mario.Limonciello@dell.com Cc: linux-usb@vger.kernel.org, andreas.noever@gmail.com, michael.jamet@intel.com, YehezkelShB@gmail.com, rajmohan.mani@intel.com, nicholas.johnson-opensource@outlook.com.au, lukas@wunner.de, gregkh@linuxfoundation.org, stern@rowland.harvard.edu, anthony.wong@canonical.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4 Message-ID: <20191002083913.GG2714@lahna.fi.intel.com> References: <20191001113830.13028-1-mika.westerberg@linux.intel.com> <20191001113830.13028-18-mika.westerberg@linux.intel.com> <184c95fc476146939b240557e54ee2c9@AUSX13MPC105.AMER.DELL.COM> <5357cb96013445d79f5c2016df8a194e@AUSX13MPC105.AMER.DELL.COM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5357cb96013445d79f5c2016df8a194e@AUSX13MPC105.AMER.DELL.COM> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 01, 2019 at 06:14:23PM +0000, Mario.Limonciello@dell.com wrote: > One more thought; would you consider exporting to sysfs sw->config.vendor_id? > Maybe an attribute that is switch_vendor? > > Userland fwupd also does validation on the NVM and will need to follow this. > The same check will go into fwupd to match the vendor and lack of nvm_non_active0 > to mark the device as not updatable. When the checks in the kernel get relaxed, > some NVM parsing will have to make it over to fwupd too to relax the check at that point. The original idea was that the kernel does the basic validation and userspace then does more complex checks. Currently you can compare the two NVM images (active one and the new) and find that information there. I think fwupd is doing just that already. Is that not enough?