All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-devel] fix the name_to_dev_t mess
@ 2023-05-23  7:45 ` Christoph Hellwig
  0 siblings, 0 replies; 142+ messages in thread
From: Christoph Hellwig @ 2023-05-23  7:45 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Vignesh Raghavendra, Rafael J. Wysocki, Greg Kroah-Hartman,
	linux-pm, Joern Engel, linux-kernel, linux-block,
	Richard Weinberger, dm-devel, Mike Snitzer, Pavel Machek,
	Miquel Raynal, linux-mtd

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(-)

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


^ permalink raw reply	[flat|nested] 142+ messages in thread
* [dm-devel] fix the name_to_dev_t mess v2
@ 2023-05-31 12:55 Christoph Hellwig
  2023-05-31 12:55 ` [dm-devel] [PATCH 15/24] block: move the code to do early boot lookup of block devices to block/ Christoph Hellwig
  0 siblings, 1 reply; 142+ messages in thread
From: Christoph Hellwig @ 2023-05-31 12:55 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Loic Poulain, Vignesh Raghavendra, Rafael J. Wysocki,
	Greg Kroah-Hartman, linux-pm, Joern Engel, linux-kernel,
	linux-block, Richard Weinberger, dm-devel, Mike Snitzer,
	Pavel Machek, Miquel Raynal, linux-mtd

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

Changes since v1:
 - really propagate the actual error in dm_get_device
 - improve the documentation in kernel-parameters.txt
 - spelling fixes

Diffstat:

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


^ permalink raw reply	[flat|nested] 142+ messages in thread

end of thread, other threads:[~2023-06-22 15:13 UTC | newest]

Thread overview: 142+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-23  7:45 [dm-devel] fix the name_to_dev_t mess Christoph Hellwig
2023-05-23  7:45 ` Christoph Hellwig
2023-05-23  7:45 ` Christoph Hellwig
2023-05-23  7:45 ` [dm-devel] [PATCH 01/24] driver core: return bool from driver_probe_done Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23 16:34   ` [dm-devel] " Greg Kroah-Hartman
2023-05-23 16:34     ` Greg Kroah-Hartman
2023-05-23 16:34     ` Greg Kroah-Hartman
2023-05-23  7:45 ` [dm-devel] [PATCH 02/24] PM: hibernate: factor out a helper to find the resume device Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23 18:25   ` [dm-devel] " Rafael J. Wysocki
2023-05-23 18:25     ` Rafael J. Wysocki
2023-05-23 18:25     ` Rafael J. Wysocki
2023-05-23  7:45 ` [dm-devel] [PATCH 03/24] PM: hibernate: remove the global snapshot_test variable Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23 18:30   ` [dm-devel] " Rafael J. Wysocki
2023-05-23 18:30     ` Rafael J. Wysocki
2023-05-23 18:30     ` Rafael J. Wysocki
2023-05-23  7:45 ` [dm-devel] [PATCH 04/24] PM: hibernate: move finding the resume device out of software_resume Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23 18:33   ` [dm-devel] " Rafael J. Wysocki
2023-05-23 18:33     ` Rafael J. Wysocki
2023-05-23 18:33     ` Rafael J. Wysocki
2023-05-23  7:45 ` [dm-devel] [PATCH 05/24] init: remove pointless Root_* values Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45 ` [dm-devel] [PATCH 06/24] init: rename mount_block_root to mount_root_generic Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45 ` [dm-devel] [PATCH 07/24] init: refactor mount_root Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45 ` [dm-devel] [PATCH 08/24] init: pass root_device_name explicitly Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45 ` [dm-devel] [PATCH 09/24] init: don't remove the /dev/ prefix from error messages Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45 ` [dm-devel] [PATCH 10/24] init: handle ubi/mtd root mounting like all other root types Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45 ` [dm-devel] [PATCH 11/24] init: factor the root_wait logic in prepare_namespace into a helper Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45 ` [dm-devel] [PATCH 12/24] init: move the nfs/cifs/ram special cases out of name_to_dev_t Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45 ` [dm-devel] [PATCH 13/24] init: improve the name_to_dev_t interface Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45 ` [dm-devel] [PATCH 14/24] init: clear root_wait on all invalid root= strings Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-06-21 21:07   ` [dm-devel] " Guenter Roeck
2023-06-21 21:07     ` Guenter Roeck
2023-06-21 21:07     ` Guenter Roeck
2023-06-22  3:51     ` [dm-devel] " Christoph Hellwig
2023-06-22  3:51       ` Christoph Hellwig
2023-06-22  3:51       ` Christoph Hellwig
2023-06-22  4:28       ` [dm-devel] " Guenter Roeck
2023-06-22  4:28         ` Guenter Roeck
2023-06-22  4:28         ` Guenter Roeck
2023-06-22  6:00         ` [dm-devel] " Christoph Hellwig
2023-06-22  6:00           ` Christoph Hellwig
2023-06-22  6:00           ` Christoph Hellwig
2023-06-22 13:54           ` [dm-devel] " Guenter Roeck
2023-06-22 13:54             ` Guenter Roeck
2023-06-22 13:54             ` Guenter Roeck
2023-06-22 14:40             ` [dm-devel] " Christoph Hellwig
2023-06-22 14:40               ` Christoph Hellwig
2023-06-22 14:40               ` Christoph Hellwig
2023-06-22 14:57               ` [dm-devel] " Guenter Roeck
2023-06-22 14:57                 ` Guenter Roeck
2023-06-22 14:57                 ` Guenter Roeck
2023-05-23  7:45 ` [dm-devel] [PATCH 15/24] block: move the code to do early boot lookup of block devices to block/ Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-24  4:58   ` [dm-devel] " Randy Dunlap
2023-05-24  4:58     ` Randy Dunlap
2023-05-24  4:58     ` Randy Dunlap
2023-05-24  4:59     ` [dm-devel] " Randy Dunlap
2023-05-24  4:59       ` Randy Dunlap
2023-05-24  4:59       ` Randy Dunlap
2023-05-24  6:08       ` [dm-devel] " Christoph Hellwig
2023-05-24  6:08         ` Christoph Hellwig
2023-05-24  6:08         ` Christoph Hellwig
2023-05-23  7:45 ` [dm-devel] [PATCH 16/24] block: move more code to early-lookup.c Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45 ` [dm-devel] [PATCH 17/24] dm-snap: simplify the origin_dev == cow_dev check in snapshot_ctr Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23 16:56   ` [dm-devel] " Mike Snitzer
2023-05-23 16:56     ` Mike Snitzer
2023-05-23 16:56     ` Mike Snitzer
2023-05-23  7:45 ` [dm-devel] [PATCH 18/24] dm: open code dm_get_dev_t in dm_init_init Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23 16:57   ` [dm-devel] " Mike Snitzer
2023-05-23 16:57     ` Mike Snitzer
2023-05-23 16:57     ` Mike Snitzer
2023-05-23  7:45 ` [dm-devel] [PATCH 19/24] dm: remove dm_get_dev_t Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23 16:49   ` [dm-devel] " Mike Snitzer
2023-05-23 16:49     ` Mike Snitzer
2023-05-23 16:49     ` Mike Snitzer
2023-05-24  6:06     ` [dm-devel] " Christoph Hellwig
2023-05-24  6:06       ` Christoph Hellwig
2023-05-24  6:06       ` Christoph Hellwig
2023-05-23  7:45 ` [dm-devel] [PATCH 20/24] dm: only call early_lookup_bdev from early boot context Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23 16:59   ` [dm-devel] " Mike Snitzer
2023-05-23 16:59     ` Mike Snitzer
2023-05-23 16:59     ` Mike Snitzer
2023-05-23  7:45 ` [dm-devel] [PATCH 21/24] PM: hibernate: don't use early_lookup_bdev in resume_store Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23 18:36   ` [dm-devel] " Rafael J. Wysocki
2023-05-23 18:36     ` Rafael J. Wysocki
2023-05-23 18:36     ` Rafael J. Wysocki
2023-05-23  7:45 ` [dm-devel] [PATCH 22/24] mtd: block2mtd: factor the early block device open logic into a helper Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  9:32   ` [dm-devel] " Miquel Raynal
2023-05-23  9:32     ` Miquel Raynal
2023-05-23  9:32     ` Miquel Raynal
2023-05-23  7:45 ` [dm-devel] [PATCH 23/24] mtd: block2mtd: don't call early_lookup_bdev after the system is running Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  9:34   ` [dm-devel] " Miquel Raynal
2023-05-23  9:34     ` Miquel Raynal
2023-05-23  9:34     ` Miquel Raynal
2023-05-23  7:45 ` [dm-devel] [PATCH 24/24] block: mark early_lookup_bdev as __init Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
2023-05-23  7:45   ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2023-05-31 12:55 [dm-devel] fix the name_to_dev_t mess v2 Christoph Hellwig
2023-05-31 12:55 ` [dm-devel] [PATCH 15/24] block: move the code to do early boot lookup of block devices to block/ Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.