Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756777AbbLASdm (ORCPT ); Tue, 1 Dec 2015 13:33:42 -0500 Received: from mout.gmx.net ([212.227.17.21]:54687 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753740AbbLASdk convert rfc822-to-8bit (ORCPT ); Tue, 1 Dec 2015 13:33:40 -0500 User-Agent: K-9 Mail for Android In-Reply-To: <20151201172537.GA541@obsidianresearch.com> References: <1448564494-23218-1-git-send-email-martin.wilck@ts.fujitsu.com> <20151127101125.GS19888@pengutronix.de> <20151201132436.GC5072@pengutronix.de> <20151201172537.GA541@obsidianresearch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Subject: Re: [tpmdd-devel] [PATCH] base/platform: fix panic when probe function is NULL From: Peter Huewe Date: Tue, 01 Dec 2015 10:26:17 -0800 To: Jason Gunthorpe , "Wilck, Martin" CC: "tpmdd-devel@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" , =?ISO-8859-1?Q?Uwe_Kleine-K=F6nig?= Message-ID: X-Provags-ID: V03:K0:M8R9bz68kOtAJACSBPHVjfJZw609xOYYpDeJ3TGOn8mFlNF0oyI qH4ZSPPfaQpQ8TmGSXqSu+3vHynsOEfxbUDJ0AMSSvqUf++gmX3aPiHQjIRn95oZBsKTdT6 BWAZmFFsI+uklB7goZEZTxQt0nZKB0HVLw4mE4Nk5IRaPe6eekre6f1L7jUJqstAKFl5yAC C0ubctr8YpVNxD2rJ42lA== X-UI-Out-Filterresults: notjunk:1;V01:K0:5BzVQ7CszbM=:nY0B1Xgk381IrkiGKC1bM4 w82buF0tb6cjUQ8+LSo2wmkUEQ77plBEox/vfVoMmXuPgvxw5yRrXHYy9lw4jQ4WvBSdOBy4e X0WmQbQF9j3clfsJr2WFfAWsbrOl5wn1SMTG8pgbFq3mlTxj/EFhg8g4s6mO077C0TQ27CuE+ 41Q+k8LIGoSEn8wCJ6htss4x8STxsstEAq6i7lS3yv021f34IJKZiYKRiElSmneSy/EkpZNj6 cozk6gWamTbtJEPl2yqOWicCmkAw489tuSy+W+V9cliEWhEyhew6LX9F10JgF2SjpVi1Ow+0x W7+JWaTMCkWh5DjqIb/t/UQTAXaqmw9r5rjb8ZdDLu1fd3ppYIQapRqkh7cHh5yBwf2DG5h8+ 2uXz+ZHDxCsIQOX6Ajl4HsOB1OUVs+m+Shw+xojx9y/dr5L0jAnFp84F4jA1hvOAzXtp6iQx1 UmsyAa6UbaQ9oq5x4xmeXF490uKj1zflPp1BLuVO3NOJIVxbvNHk6IVTMXj9br/oWxaYQ36DA DCC/nHnykUZlCtsjVOdkWB7/9AW8wJY0WV7azqpoErbKumVW4n0sJq5DrUulscXEQ7ixfaCX3 l6u4SsFVWOwc7cWhP/KH70Kl7H91Oy2TWKkoHOFSH0EseozpKsvEF9S+VDUEMXKxvnEXVY1bz 6ErqNX7HDmdzdbm024PFb24A1e3LDVk+m2InRRcHAZmmbX2o1Mql44bVvFLgG4w8DlfXayWvB Mh+2cQbB2aPLexmMb4gj3wWpRQyYtoJZQASJjkW1U3EbKdm+h8RplBrxN9LPVRjyaSD6YrOA3 5+mgetX Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2143 Lines: 54 Am 1. Dezember 2015 09:25:37 PST, schrieb Jason Gunthorpe : >On Tue, Dec 01, 2015 at 04:19:25PM +0100, Wilck, Martin wrote: >> > > > tpm_tis_init calls tpmm_chip_alloc which barfs when pdev (i.e. >the return value >> > > > of platform_device_register_simple above) isn't bound. It is >not allowed >> > > > to assume that the device is bound after the above function >calls. >> > > >> > > Can you please explain again why you think that assumption is >invalid? >> > >> > You can unbind a device from a driver via sysfs, you can also >prevent >> > binding somehow I think, probing can fail for different reasons, >probing >> > might wait for userspace interaction to load firmware which wasn't >> > scheduled yet. I'm sure there are still more things that break the >> > assumption. >> >> Thanks. Out of these, "prevent binding somehow" would be the only >> problem that applies to tpm_tis, as probing can't fail (no probe() >> routine), there's no FW to load, and unbinding via sysfs would >require >> nearly impossible timing (not sure if it could be done with udev). >> >> Anyway, the Right Thing to do is to create a probe() routine and >that's >> what Jason did. > >That fixes tpm_tis, but there are other ancient TPM drivers that use >the old, now broken way. > >So, we still need to do something here. Either fixup b8b2c7d845d5 as >you have proposed, remove the now broken obsolete TPM drivers, or try >and fix them.. How broken are they and since when? I thought multiple times about deprecating and finally removing the 1.1b stuff - tpm 1.2 is out for 10? years now? With an expected life span of a TPM of roughly 5years... And also unfortunately the 1.1b legacy drivers usually get loaded first :( (atleast for slb9635) Mark them as obsolete , default them to No and remove them by 4.10 if there are no objections? Peter -- Sent from my mobile -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/