| // SPDX-License-Identifier: GPL-2.0 |
| * fs-verity module initialization and logging |
| * Copyright 2019 Google LLC |
| #include "fsverity_private.h" |
| #include <linux/ratelimit.h> |
| void fsverity_msg(const struct inode *inode, const char *level, |
| static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL, |
| DEFAULT_RATELIMIT_BURST); |
| printk("%sfs-verity (%s, inode %lu): %pV\n", |
| level, inode->i_sb->s_id, inode->i_ino, &vaf); |
| printk("%sfs-verity: %pV\n", level, &vaf); |
| static int __init fsverity_init(void) |
| fsverity_check_hash_algs(); |
| err = fsverity_init_info_cache(); |
| err = fsverity_init_workqueue(); |
| goto err_exit_info_cache; |
| err = fsverity_init_signature(); |
| pr_debug("Initialized fs-verity\n"); |
| fsverity_exit_workqueue(); |
| fsverity_exit_info_cache(); |
| late_initcall(fsverity_init) |