lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 4 Feb 2020 08:15:49 +0100
From:   Alexander Steffen <Alexander.Steffen@...ineon.com>
To:     Stephen Boyd <swboyd@...omium.org>,
        Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
        Peter Huewe <peterhuewe@....de>
CC:     Andrey Pronin <apronin@...omium.org>,
        <linux-kernel@...r.kernel.org>, <linux-integrity@...r.kernel.org>,
        Duncan Laurie <dlaurie@...omium.org>,
        Jason Gunthorpe <jgg@...pe.ca>, Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Guenter Roeck <groeck@...omium.org>,
        Heiko Stuebner <heiko@...ech.de>
Subject: Re: [PATCH v7 4/6] tpm: tpm_tis_spi: Support cr50 devices

On 04.02.2020 01:37, Stephen Boyd wrote:
> Quoting Alexander Steffen (2020-02-03 01:13:29)
>> On 20.09.2019 20:32, Stephen Boyd wrote:
>>> diff --git a/drivers/char/tpm/Makefile b/drivers/char/tpm/Makefile
>>> index a01c4cab902a..c96439f11c85 100644
>>> --- a/drivers/char/tpm/Makefile
>>> +++ b/drivers/char/tpm/Makefile
>>> @@ -21,7 +21,9 @@ tpm-$(CONFIG_EFI) += eventlog/efi.o
>>>    tpm-$(CONFIG_OF) += eventlog/of.o
>>>    obj-$(CONFIG_TCG_TIS_CORE) += tpm_tis_core.o
>>>    obj-$(CONFIG_TCG_TIS) += tpm_tis.o
>>> -obj-$(CONFIG_TCG_TIS_SPI) += tpm_tis_spi.o
>>> +obj-$(CONFIG_TCG_TIS_SPI) += tpm_tis_spi_mod.o
>>> +tpm_tis_spi_mod-y := tpm_tis_spi.o
>>> +tpm_tis_spi_mod-$(CONFIG_TCG_TIS_SPI_CR50) += tpm_tis_spi_cr50.o
>>>    obj-$(CONFIG_TCG_TIS_I2C_ATMEL) += tpm_i2c_atmel.o
>>>    obj-$(CONFIG_TCG_TIS_I2C_INFINEON) += tpm_i2c_infineon.o
>>>    obj-$(CONFIG_TCG_TIS_I2C_NUVOTON) += tpm_i2c_nuvoton.o
>>
>> This renames the driver module from tpm_tis_spi to tpm_tis_spi_mod, was
>> this done intentionally? When trying to upgrade the kernel, this just
>> broke my test system, since all scripts expect to be able to load
>> tpm_tis_spi, which does not exist anymore with that change.
>>
> 
> I mentioned this during the review of this patch set. I thought nobody
> would care, given that it's just a module name.
> 
> Can your scripts load the module based on something besides the module
> name? Perhaps by using device attributes instead?

The scripts are effectively using modprobe/rmmod/etc. and those need the 
name. modprobe can be fixed by defining an alias, but this does not work 
for rmmod. Many other things also depend on the name, e.g. module 
blacklisting or the output of lsmod, where people might now get confused 
by the difference between "tpm_tis_spi_mod" and "tpm_tis_i2c". Also, 
there are many tutorials out there, that explicitly tell users to run 
something like "modprobe tpm_tis_spi", which won't work anymore now.

So, if there is a good reason to break compatibility, I'm fine with 
that. But in this case, isn't there some way to achieve the desired 
functionality without changing the name? Even if it is a little more 
complex than the three-line change above, that would probably be worth it.

Alexander

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ