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: <20230523074535.249802-1-hch@lst.de>
Date:   Tue, 23 May 2023 09:45:11 +0200
From:   Christoph Hellwig <hch@....de>
To:     Jens Axboe <axboe@...nel.dk>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Mike Snitzer <snitzer@...nel.org>,
        Joern Engel <joern@...ybastard.org>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        Pavel Machek <pavel@....cz>, dm-devel@...hat.com,
        linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
        linux-mtd@...ts.infradead.org, linux-pm@...r.kernel.org
Subject: fix the name_to_dev_t mess

Hi all,

this series tries to sort out accumulated mess around the name_to_dev_t
function.  This function is intended to allow looking up the dev_t of a
block device based on a name string before the root file systems is
mounted and thus the normal path based lookup is available.

Unfortunately a few years ago it managed to get exported and used in
non-init contexts, leading to the something looking like a path name
also beeing lookuped up by a different and potential dangerous
algorithm.

This series does a fair amount of refactoring and finally ends up with
the renamed and improved name_to_dev_t only beeing available for the
early init code again.

The series is against Jens' for-6.5/block tree but probably applies
against current mainline just fine as well.

A git tree is also available here:

    git://git.infradead.org/users/hch/block.git blk-init-cleanup

Gitweb:

    http://git.infradead.org/users/hch/block.git/shortlog/refs/heads/blk-init-cleanup

Diffstat:
 Documentation/admin-guide/kernel-parameters.txt |    2 
 arch/alpha/kernel/setup.c                       |    2 
 arch/ia64/kernel/setup.c                        |    2 
 arch/powerpc/platforms/powermac/setup.c         |    3 
 block/Makefile                                  |    2 
 block/early-lookup.c                            |  315 ++++++++++++++++++
 block/genhd.c                                   |   92 -----
 drivers/base/dd.c                               |    6 
 drivers/md/dm-init.c                            |    4 
 drivers/md/dm-snap.c                            |   14 
 drivers/md/dm-table.c                           |   26 -
 drivers/md/md-autodetect.c                      |    3 
 drivers/mtd/devices/block2mtd.c                 |   62 ++-
 fs/pstore/blk.c                                 |    4 
 include/linux/blkdev.h                          |    6 
 include/linux/device-mapper.h                   |    2 
 include/linux/device/driver.h                   |    2 
 include/linux/mount.h                           |    1 
 include/linux/root_dev.h                        |    9 
 init/do_mounts.c                                |  416 ++++++------------------
 init/do_mounts.h                                |   14 
 init/do_mounts_initrd.c                         |   11 
 kernel/power/hibernate.c                        |  167 +++++----
 kernel/power/power.h                            |    3 
 kernel/power/swap.c                             |    2 
 25 files changed, 603 insertions(+), 567 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ