1. 22 May, 2020 5 commits
  2. 21 May, 2020 10 commits
  3. 20 May, 2020 9 commits
  4. 19 May, 2020 13 commits
  5. 18 May, 2020 3 commits
    • Ricardo Ribalda Delgado's avatar
      mtd: Fix mtd not registered due to nvmem name collision · 7b01b723
      Ricardo Ribalda Delgado authored
      When the nvmem framework is enabled, a nvmem device is created per mtd
      device/partition.
      
      It is not uncommon that a device can have multiple mtd devices with
      partitions that have the same name. Eg, when there DT overlay is allowed
      and the same device with mtd is attached twice.
      
      Under that circumstances, the mtd fails to register due to a name
      duplication on the nvmem framework.
      
      With this patch we use the mtdX name instead of the partition name,
      which is unique.
      
      [    8.948991] sysfs: cannot create duplicate filename '/bus/nvmem/devices/Production Data'
      [    8.948992] CPU: 7 PID: 246 Comm: systemd-udevd Not tainted 5.5.0-qtec-standard #13
      [    8.948993] Hardware name: AMD Dibbler/Dibbler, BIOS 05.22.04.0019 10/26/2019
      [    8.948994] Call Trace:
      [    8.948996]  dump_stack+0x50/0x70
      [    8.948998]  sysfs_warn_dup.cold+0x17/0x2d
      [    8.949000]  sysfs_do_create_link_sd.isra.0+0xc2/0xd0
      [    8.949002]  bus_add_device+0x74/0x140
      [    8.949004]  device_add+0x34b/0x850
      [    8.949006]  nvmem_register.part.0+0x1bf/0x640
      ...
      [    8.948926] mtd mtd8: Failed to register NVMEM device
      
      Fixes: c4dfa25a ("mtd: add support for reading MTD devices via the nvmem API")
      Signed-off-by: default avatarRicardo Ribalda Delgado <ribalda@kernel.org>
      Acked-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      7b01b723
    • Miquel Raynal's avatar
      mtd: spinand: Propagate ECC information to the MTD structure · 3507273d
      Miquel Raynal authored
      This is done by default in the raw NAND core (nand_base.c) but was
      missing in the SPI-NAND core. Without these two lines the ecc_strength
      and ecc_step_size values are not exported to the user through sysfs.
      
      Fixes: 7529df46 ("mtd: nand: Add core infrastructure to support SPI NANDs")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      Reviewed-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      3507273d
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity · 642b151f
      Linus Torvalds authored
      Pull integrity fixes from Mimi Zohar:
       "A couple of miscellaneous bug fixes for the integrity subsystem:
      
        IMA:
      
         - Properly modify the open flags in order to calculate the file hash.
      
         - On systems requiring the IMA policy to be signed, the policy is
           loaded differently. Don't differentiate between "enforce" and
           either "log" or "fix" modes how the policy is loaded.
      
        EVM:
      
         - Two patches to fix an EVM race condition, normally the result of
           attempting to load an unsupported hash algorithm.
      
         - Use the lockless RCU version for walking an append only list"
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
        evm: Fix a small race in init_desc()
        evm: Fix RCU list related warnings
        ima: Fix return value of ima_write_policy()
        evm: Check also if *tfm is an error pointer in init_desc()
        ima: Set file->f_mode instead of file->f_flags in ima_calc_file_hash()
      642b151f