- Fix DM verity target's 'require_signatures' module_param permissions.

- Revert DM snapshot fix from v5.13-rc3 and then properly fix crash
   when an origin has no snapshots. This allows only the proper fix to
   go to stable@ (since the original fix was successfully dropped).
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEJfWUX4UqZ4x1O2wixSPxCi2dA1oFAmCv6dwACgkQxSPxCi2d
 A1ouvgf/UTg13oWs3w6O36ib9pxFjEmy+APsYsC0cYYEywPpsyNZol/zxuX5hgfQ
 vsThW0l/IPq6TJFSpoYhrnW6syTQkTosDnpTVq1MZcEEDW8lXcsqdElP2qjc9FCn
 jpnma6zfYJzF/ucIZBIF8vuFyQyF+p73XjOf56j2fMnsN2re5KLHK1NylyWq8G5p
 C4bKhqJmQDUKf5Za361rLz91GrAYhljqc6QoqyKlyz2X5JQX/Mw6zjhIaHdqcSZg
 Xbd+aHB/N/4jTqNM8ClPu1J+1uzoaZzHgcNxKTZDiaUjfM8uCbj/htA1L83M4jUe
 iTGXoD8pN5Sr37+fMarkBcUAC11/1A==
 =9/SR
 -----END PGP SIGNATURE-----

Merge tag 'for-5.13/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm

Pull device mapper fixes from Mike Snitzer:

 - Fix DM verity target's 'require_signatures' module_param permissions.

 - Revert DM snapshot fix from v5.13-rc3 and then properly fix crash
   when an origin has no snapshots. This allows only the proper fix to
   go to stable@ (since the original fix was successfully dropped).

* tag 'for-5.13/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
  dm snapshot: properly fix a crash when an origin has no snapshots
  dm snapshot: revert "fix a crash when an origin has no snapshots"
  dm verity: fix require_signatures module_param permissions
This commit is contained in:
Linus Torvalds 2021-05-27 11:54:36 -10:00
commit 38747c9a2d
2 changed files with 3 additions and 2 deletions

View File

@ -859,7 +859,8 @@ static uint32_t __minimum_chunk_size(struct origin *o)
if (o)
list_for_each_entry(snap, &o->snapshots, list)
chunk_size = min(chunk_size, snap->store->chunk_size);
chunk_size = min_not_zero(chunk_size,
snap->store->chunk_size);
return (uint32_t) chunk_size;
}

View File

@ -15,7 +15,7 @@
#define DM_VERITY_VERIFY_ERR(s) DM_VERITY_ROOT_HASH_VERIFICATION " " s
static bool require_signatures;
module_param(require_signatures, bool, false);
module_param(require_signatures, bool, 0444);
MODULE_PARM_DESC(require_signatures,
"Verify the roothash of dm-verity hash tree");