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-next>] [day] [month] [year] [list]
Message-ID: <cover.1683043928.git.daniel@makrotopia.org>
Date:   Tue, 2 May 2023 17:47:48 +0100
From:   Daniel Golle <daniel@...rotopia.org>
To:     linux-mtd@...ts.infradead.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Zhihao Cheng <chengzhihao1@...wei.com>,
        Rafał Miłecki <zajec5@...il.com>
Subject: [PATCH 0/4] mtd: ubi: behave like a good MTD citizen

As of now one can easily trigger the existence of "ghost" UBI devices
or even worse by removing e.g. the SPI bus driver which previously
provided access to an SPI-NAND chip.

Make UBI behave more like other MTD users and create/remove UBI devices
based on MTD notifications. As removing could previously fail in case
of an ubiblock device still being in use, make sure there are no
excuses preventing release of an already gone MTD partition.

This makes it possible to attach UBI devices immediately after the MTD
partition becomes available, which will allow using UBI volumes as
nvmem-cells provider in the future [1]. Introduce new device tree
compatible "linux,ubi" to be used on MTD partitions which should be
attached.

In order to make sure ubiblock devices are still created according to
the module or kernel parameters, let ubiblock creation from parameters
be triggered by UBI_VOLUME_ADDED notifications instead of trying only
once during boot.

[1]: https://forum.openwrt.org/t/asus-tuf-ax4200-support/155738/44?u=daniel

Daniel Golle (4):
  mtd: ubi: block: don't return on error when removing
  mtd: ubi: block: use notifier to create ubiblock from parameter
  dt-bindings: mtd: partitions: add linux,ubi
  mtd: ubi: attach MTD partition from device-tree

 .../bindings/mtd/partitions/ubi.yaml          |  49 +++++
 drivers/mtd/ubi/block.c                       | 158 ++++++++-------
 drivers/mtd/ubi/build.c                       | 189 ++++++++++++------
 drivers/mtd/ubi/cdev.c                        |   4 +-
 drivers/mtd/ubi/ubi.h                         |   6 +-
 5 files changed, 271 insertions(+), 135 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/ubi.yaml


base-commit: b5fda08ef213352ac2df7447611eb4d383cce929
-- 
2.40.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ