]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
dm verity: fix require_signatures module_param permissions
authorJohn Keeping <john@metanate.com>
Wed, 12 May 2021 11:14:21 +0000 (12:14 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 15 Jul 2021 17:27:17 +0000 (19:27 +0200)
commitee9469a9c01b10130a0562d37b57c2bddfeadd7c
treee1cedcef475112dc646c5ddefa22df3c831d2e0c
parent2e83531d62e22d4a76782ad365c4e4e1fd296e92
dm verity: fix require_signatures module_param permissions

BugLink: https://bugs.launchpad.net/bugs/1933369
[ Upstream commit 0c1f3193b1cdd21e7182f97dc9bca7d284d18a15 ]

The third parameter of module_param() is permissions for the sysfs node
but it looks like it is being used as the initial value of the parameter
here.  In fact, false here equates to omitting the file from sysfs and
does not affect the value of require_signatures.

Making the parameter writable is not simple because going from
false->true is fine but it should not be possible to remove the
requirement to verify a signature.  But it can be useful to inspect the
value of this parameter from userspace, so change the permissions to
make a read-only file in sysfs.

Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/md/dm-verity-verify-sig.c