1b6c1c574SMatthias Kaehlcke /* SPDX-License-Identifier: GPL-2.0 */
2b6c1c574SMatthias Kaehlcke 
3b6c1c574SMatthias Kaehlcke #ifndef __LINUX_DM_VERITY_LOADPIN_H
4b6c1c574SMatthias Kaehlcke #define __LINUX_DM_VERITY_LOADPIN_H
5b6c1c574SMatthias Kaehlcke 
6b6c1c574SMatthias Kaehlcke #include <linux/list.h>
7b6c1c574SMatthias Kaehlcke 
8b6c1c574SMatthias Kaehlcke struct block_device;
9b6c1c574SMatthias Kaehlcke 
10b6c1c574SMatthias Kaehlcke extern struct list_head dm_verity_loadpin_trusted_root_digests;
11b6c1c574SMatthias Kaehlcke 
12b6c1c574SMatthias Kaehlcke struct dm_verity_loadpin_trusted_root_digest {
13b6c1c574SMatthias Kaehlcke 	struct list_head node;
14b6c1c574SMatthias Kaehlcke 	unsigned int len;
15*5f536ac6SKees Cook 	u8 data[] __counted_by(len);
16b6c1c574SMatthias Kaehlcke };
17b6c1c574SMatthias Kaehlcke 
18231af470SMatthias Kaehlcke #if IS_ENABLED(CONFIG_SECURITY_LOADPIN_VERITY)
19b6c1c574SMatthias Kaehlcke bool dm_verity_loadpin_is_bdev_trusted(struct block_device *bdev);
20b6c1c574SMatthias Kaehlcke #else
dm_verity_loadpin_is_bdev_trusted(struct block_device * bdev)21b6c1c574SMatthias Kaehlcke static inline bool dm_verity_loadpin_is_bdev_trusted(struct block_device *bdev)
22b6c1c574SMatthias Kaehlcke {
23b6c1c574SMatthias Kaehlcke 	return false;
24b6c1c574SMatthias Kaehlcke }
25b6c1c574SMatthias Kaehlcke #endif
26b6c1c574SMatthias Kaehlcke 
27b6c1c574SMatthias Kaehlcke #endif /* __LINUX_DM_VERITY_LOADPIN_H */
28