summaryrefslogtreecommitdiff
path: root/include/arch/x86_64/linux/loadpin.h
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-07 20:10:31 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-07 20:10:31 +0100
commitfc00c656c96528112d05cf0edf8631bd5eaea446 (patch)
treea6e0e6c588191a8bd1c64afc3b7a258e3e66c236 /include/arch/x86_64/linux/loadpin.h
Add build system scaffolding and libc headers
Diffstat (limited to 'include/arch/x86_64/linux/loadpin.h')
-rw-r--r--include/arch/x86_64/linux/loadpin.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/arch/x86_64/linux/loadpin.h b/include/arch/x86_64/linux/loadpin.h
new file mode 100644
index 00000000..97d00f81
--- /dev/null
+++ b/include/arch/x86_64/linux/loadpin.h
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/*
+ * Copyright (c) 2022, Google LLC
+ */
+
+#ifndef _LINUX_LOOP_LOADPIN_H
+#define _LINUX_LOOP_LOADPIN_H
+
+#define LOADPIN_IOC_MAGIC 'L'
+
+/**
+ * LOADPIN_IOC_SET_TRUSTED_VERITY_DIGESTS - Set up the root digests of verity
+ * devices that loadpin should trust.
+ *
+ * Takes a file descriptor from which to read the root digests of trusted verity
+ * devices. The file is expected to contain a list of digests in ASCII format,
+ * with one line per digest. The ioctl must be issued on the securityfs
+ * attribute 'loadpin/dm-verity' (which can be typically found under
+ * /sys/kernel/security/loadpin/dm-verity).
+ */
+#define LOADPIN_IOC_SET_TRUSTED_VERITY_DIGESTS \
+ _IOW(LOADPIN_IOC_MAGIC, 0x00, unsigned int)
+
+#endif /* _LINUX_LOOP_LOADPIN_H */