]> git.proxmox.com Git - mirror_ubuntu-hirsute-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:23:56 +0000 (19:23 +0200)
commit2471ffa1da7315e3a0035b7b70247b1cf4f9ad69
tree740290399ccc27e335daa963398e8ebd761d2450
parent034216839fc9fd1150078bfda857b644e60b9254
dm verity: fix require_signatures module_param permissions

BugLink: https://bugs.launchpad.net/bugs/1934012
[ 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: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/md/dm-verity-verify-sig.c