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:   Mon, 25 Nov 2019 17:34:28 +0100
From:   Christophe Kerello <christophe.kerello@...com>
To:     Steve deRosier <derosier@...il.com>
CC:     <miquel.raynal@...tlin.com>, Richard Weinberger <richard@....at>,
        <vigneshr@...com>, linux-mtd <linux-mtd@...ts.infradead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        <linux-stm32@...md-mailman.stormreply.com>
Subject: Re: mtd: Use mtd device name instead of mtd->name when registering
 nvmem device



On 11/25/19 5:05 PM, Steve deRosier wrote:
> On Fri, Nov 22, 2019 at 9:04 AM Christophe Kerello
> <christophe.kerello@...com> wrote:
>>
>> MTD currently allows to have same partition name on different devices.
>> Since nvmen device registration has been added, it is not more possible
>> to have same partition name on different devices. We get following
>> logs:
>> sysfs: cannot create duplicate filename XXX
>> Failed to register NVMEM device
>>
>> To avoid such issue, the proposed patch uses the mtd device name instead of
>> the partition name.
> ...
>> diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
>> index 5fac435..559b693 100644
>> --- a/drivers/mtd/mtdcore.c
>> +++ b/drivers/mtd/mtdcore.c
>> @@ -551,7 +551,7 @@ static int mtd_nvmem_add(struct mtd_info *mtd)
>>
>>          config.id = -1;
>>          config.dev = &mtd->dev;
>> -       config.name = mtd->name;
>> +       config.name = dev_name(&mtd->dev);
>>          config.owner = THIS_MODULE;
>>          config.reg_read = mtd_nvmem_reg_read;
>>          config.size = mtd->size;
> 
> This would be a breaking change for anyone that depended on
> `config.name = mtd->name` behavior. Obviously, if they were using
> multiple devs with the same partition name as you were, they'd have
> already been broken, but I suspect if a lot of people were doing that
> we'd have heard about that before now.

Hi Steve,

I understand your concern. So the recommendation is to have unique 
partition names.

Regards,
Christophe Kerello.

> 
> - Steve
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ