summaryrefslogtreecommitdiff
path: root/drivers/platform/cznic/turris-signing-key.c
AgeCommit message (Collapse)Author
2025-03-21platform: cznic: fix function parameter namesArnd Bergmann
A invalid prototype made it into a previous patch, causing an clang warning: drivers/platform/cznic/turris-signing-key.c:25:55: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions] and a slightly different warning with gcc-11 and earlier but not gcc-12 and up: drivers/platform/cznic/turris-signing-key.c: In function 'turris_signing_key_instantiate': drivers/platform/cznic/turris-signing-key.c:25:43: error: parameter name omitted Add the parameters to get a clean build with all compilers. Fixes: 0b28b7080ef5 ("platform: cznic: Add keyctl helpers for Turris platform") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202503210450.AoOpbJXC-lkp@intel.com/ Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-03-20platform: cznic: Add keyctl helpers for Turris platformMarek BehĂșn
Some Turris devices support signing messages with a per-device unique asymmetric key that was created on the device at manufacture time. Add helper module that helps to expose this ability via the keyctl() syscall. A device-specific driver can register a signing key by calling devm_turris_signing_key_create(). Both the `.turris-signing-keys` keyring and the signing key are created with only the VIEW, READ and SEARCH permissions for userspace - it is impossible to link / unlink / move them, set their attributes, or unlink the keyring from userspace. Signed-off-by: Marek BehĂșn <kabel@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>