Matthias Kaehlcke | b6c1c57 | 2022-06-27 08:35:24 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | |
| 3 | #ifndef __LINUX_DM_VERITY_LOADPIN_H |
| 4 | #define __LINUX_DM_VERITY_LOADPIN_H |
| 5 | |
| 6 | #include <linux/list.h> |
| 7 | |
| 8 | struct block_device; |
| 9 | |
| 10 | extern struct list_head dm_verity_loadpin_trusted_root_digests; |
| 11 | |
| 12 | struct dm_verity_loadpin_trusted_root_digest { |
| 13 | struct list_head node; |
| 14 | unsigned int len; |
| 15 | u8 data[]; |
| 16 | }; |
| 17 | |
Matthias Kaehlcke | 231af47 | 2022-06-27 08:35:26 -0700 | [diff] [blame] | 18 | #if IS_ENABLED(CONFIG_SECURITY_LOADPIN_VERITY) |
Matthias Kaehlcke | b6c1c57 | 2022-06-27 08:35:24 -0700 | [diff] [blame] | 19 | bool dm_verity_loadpin_is_bdev_trusted(struct block_device *bdev); |
| 20 | #else |
| 21 | static inline bool dm_verity_loadpin_is_bdev_trusted(struct block_device *bdev) |
| 22 | { |
| 23 | return false; |
| 24 | } |
| 25 | #endif |
| 26 | |
| 27 | #endif /* __LINUX_DM_VERITY_LOADPIN_H */ |