]> git.baikalelectronics.ru Git - 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)
committerMike Snitzer <snitzer@redhat.com>
Tue, 25 May 2021 20:14:05 +0000 (16:14 -0400)
commitf823170b06af4d79562b1321e621f08aee697b12
treed396e1e07190a4ec0410d3227f64fac2039cfa52
parent0bfb8ed727aafd784980161b5dae041075559fb9
dm verity: fix require_signatures module_param permissions

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>
drivers/md/dm-verity-verify-sig.c