Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp792990ybk; Sat, 9 May 2020 19:20:31 -0700 (PDT) X-Google-Smtp-Source: APiQypJa47RfouFw/6R6rnLQ0ODN0hS6rQG8IQDZbUZ75iwgmMmMJ4Ys9sI1M0+MyJPa60VbRs64 X-Received: by 2002:a17:906:1d13:: with SMTP id n19mr7717141ejh.287.1589077231119; Sat, 09 May 2020 19:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589077231; cv=none; d=google.com; s=arc-20160816; b=thfJMZOO7jDlyvNVPTNMWW+ExHXki3tdSk0gbAV1TzAL7hXQFZYYCgTvGwgNQVk79j k+H9Q7s7JZogegL94MbdX2/pcwNvhvBwykLKu03i/RWROHpjKmRRg7gQ6djRlVy2SEBl OrXwZZDUXRAAj/0iYHm4cJIsrh+OEggbThSzbUPU385OiU47HWZInNjD5GHfzjiVMrJh 56MIUemhGwSxqBq8oRtAnehJxR8hbWVfaak4QBJ8jKVNgtEEhQUCeUPXS9z5K8jyRP3e j0otNvyYzsp+oaodARUgplZbAtEDkO8WnvDw0JjGVrHWbjKSwD+4EyCicKBkcXd+1JTU 5mrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=zZO7z1uZ3JyTfUHXZIjNKa9uIQjs+v1jCyQprPMHpc4=; b=Rm+ubsck1y1uld+YqjTg53+Zu8sNrFuzzSopbJ5YN7L+5EVqDucP1XH+OnrtUWZdEA 87W8R9DtVMLRKoVcAQUXdjrelUG7sLhWUEx1/6vaF/yTLBFHOaYH6eY2KUma2c1FuKB0 anJUGrVoIOGcc972QunN88d4mgD1misGZ3Fn80WLU5/StiwOi9VXnliwc3l9U0uHUZos cHm/UhtNtbzIiystckF8Y1vsPThin/YIvDOS8Fqh8ZY11+zlG8rX16vuzHpRP3xkuXgL t4NL0pWvHj7CJLD/z7s/Z8ZVWMklptWsydQWUXq/HWyHtUezq3CEICtuVusPxgwZVu1M /O0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@pensando.io header.s=google header.b=ZLFGU6FE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h5si3567714ejq.430.2020.05.09.19.20.08; Sat, 09 May 2020 19:20:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@pensando.io header.s=google header.b=ZLFGU6FE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728620AbgEJCP2 (ORCPT + 99 others); Sat, 9 May 2020 22:15:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728238AbgEJCP1 (ORCPT ); Sat, 9 May 2020 22:15:27 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30905C061A0C for ; Sat, 9 May 2020 19:15:27 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id q24so6034939pjd.1 for ; Sat, 09 May 2020 19:15:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=zZO7z1uZ3JyTfUHXZIjNKa9uIQjs+v1jCyQprPMHpc4=; b=ZLFGU6FEzQhtgASCJHB/bfuc3jyfJSNipYcQ4b7l0ISyMWnoOomEmfrEWSIwVUYvYi e/n6HWL/Qt0VA6GtuW0ukDqyDBLmfdTIh7j0te43fTx528dvK2q4t5d/P5/A0yJd47Fi ysfr/xFuXR3u0pRmH2tLwHZXGCuVtaWPwFBTIXN+DPuwa2yHdh4m5Q9+G4D4DG/37Wn0 +YL79k2rmRLg7jj5huQ/L+DekguFUgjWkPZBfLFs5A5ClSqKSNFv/B0G9mkdDuCgCjlH j/MUUC90P/no78ohrdGmIUCaomJeQYQiLZlfus7QdLU8fVE84e9fTWA9psdZuwISTprG /ygw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=zZO7z1uZ3JyTfUHXZIjNKa9uIQjs+v1jCyQprPMHpc4=; b=lNj3S2308MQsu+dmEYaKtqX7+K2gi8sowUJwrJ3EiPNRSNNu4otNeBdYcxhS4W6kbq Q+StmGehHgZ3WlGzN1jqy3lXo0IFRHKzZzqMNyPaqjIEBpE7iOLe7GMYR4kCIcEsaelS oJgByqV4XI/KXHFEGXEYLbx4NrLxIw1O9dd6Krd0RqBJoYkVzkCe+ceZzLlli86tSEV6 N/CCbb8ueIDrmJ9Ieu8CLJSRyyEa7341USlL2t2QOwueiy68l4uh1d9MRjsqXURxVQpS kd0bcvzX7EboiCbommAx2WUZxZnHYDk0p7AAA36TlVmOVzNzz5mvBO8fuwhXQQc8HvUL XZsQ== X-Gm-Message-State: AGi0PuacApzgHxgbdMrxBdUQlnczvSXWqiRQOws4rShqYDhcsGG7WJeE 9ODtLo+1TUf3Fz1EyOjFRy0cgjGO7Qw= X-Received: by 2002:a17:90a:343:: with SMTP id 3mr10850397pjf.224.1589076926192; Sat, 09 May 2020 19:15:26 -0700 (PDT) Received: from Shannons-MacBook-Pro.local (static-50-53-47-17.bvtn.or.frontiernet.net. [50.53.47.17]) by smtp.gmail.com with ESMTPSA id c15sm5652524pfp.34.2020.05.09.19.15.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 09 May 2020 19:15:25 -0700 (PDT) Subject: Re: [PATCH 00/15] net: taint when the device driver firmware crashes To: Andrew Lunn Cc: Luis Chamberlain , jeyu@kernel.org, akpm@linux-foundation.org, arnd@arndb.de, rostedt@goodmis.org, mingo@redhat.com, aquini@redhat.com, cai@lca.pw, dyoung@redhat.com, bhe@redhat.com, peterz@infradead.org, tglx@linutronix.de, gpiccoli@canonical.com, pmladek@suse.com, tiwai@suse.de, schlad@suse.de, andriy.shevchenko@linux.intel.com, keescook@chromium.org, daniel.vetter@ffwll.ch, will@kernel.org, mchehab+samsung@kernel.org, kvalo@codeaurora.org, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200509043552.8745-1-mcgrof@kernel.org> <1e097eb0-6132-f549-8069-d13b678183f5@pensando.io> <20200510015814.GE362499@lunn.ch> From: Shannon Nelson Message-ID: <01831b19-5890-e7e0-3801-068dfab5c92a@pensando.io> Date: Sat, 9 May 2020 19:15:23 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200510015814.GE362499@lunn.ch> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/9/20 6:58 PM, Andrew Lunn wrote: > On Sat, May 09, 2020 at 06:01:51PM -0700, Shannon Nelson wrote: >> On 5/8/20 9:35 PM, Luis Chamberlain wrote: >>> Device driver firmware can crash, and sometimes, this can leave your >>> system in a state which makes the device or subsystem completely >>> useless. Detecting this by inspecting /proc/sys/kernel/tainted instead >>> of scraping some magical words from the kernel log, which is driver >>> specific, is much easier. So instead this series provides a helper which >>> lets drivers annotate this and shows how to use this on networking >>> drivers. >>> >> If the driver is able to detect that the device firmware has come back >> alive, through user intervention or whatever, should there be a way to >> "untaint" the kernel?  Or would you expect it to remain tainted? > Hi Shannon > > In general, you don't want to be able to untained. Say a non-GPL > licenced module is loaded, which taints the kernel. It might then try > to untaint the kernel to hide its. Yeah, obviously we don't want this to be abuseable.  I was just wondering about reversing this particular status if the broken device could get itself fixed. > > As for firmware, how much damage can the firmware do as it crashed? If > it is a DMA master, it could of splattered stuff through > memory. Restarting the firmware is not going to reverse the damage it > has done. > True, and tho' the driver might get the thing restarted, it wouldn't necessarily know what kind of damage had ensued. Carry on, sln