File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,8 +67,8 @@ fscryptctl.1: fscryptctl.1.md
6767
6868# #############################################################################
6969
70- # Don't format fscrypt_uapi.h, so that it stays identical to the kernel version .
71- FILES_TO_FORMAT := $(filter-out fscrypt_uapi .h, $(SRC ) $(HDRS ) )
70+ # Don't format UAPI files. They should stay identical to the kernel's copies .
71+ FILES_TO_FORMAT := $(filter-out % _uapi .h, $(SRC ) $(HDRS ) )
7272
7373.PHONY : format format-check
7474format :
Original file line number Diff line number Diff line change 1+ /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2+ #ifndef _UAPI_LINUX_BLK_CRYPTO_H
3+ #define _UAPI_LINUX_BLK_CRYPTO_H
4+
5+ #include <linux/ioctl.h>
6+ #include <linux/types.h>
7+
8+ struct blk_crypto_import_key_arg {
9+ /* Raw key (input) */
10+ __u64 raw_key_ptr ;
11+ __u64 raw_key_size ;
12+ /* Long-term wrapped key blob (output) */
13+ __u64 lt_key_ptr ;
14+ __u64 lt_key_size ;
15+ __u64 reserved [4 ];
16+ };
17+
18+ struct blk_crypto_generate_key_arg {
19+ /* Long-term wrapped key blob (output) */
20+ __u64 lt_key_ptr ;
21+ __u64 lt_key_size ;
22+ __u64 reserved [4 ];
23+ };
24+
25+ struct blk_crypto_prepare_key_arg {
26+ /* Long-term wrapped key blob (input) */
27+ __u64 lt_key_ptr ;
28+ __u64 lt_key_size ;
29+ /* Ephemerally-wrapped key blob (output) */
30+ __u64 eph_key_ptr ;
31+ __u64 eph_key_size ;
32+ __u64 reserved [4 ];
33+ };
34+
35+ /*
36+ * These ioctls share the block device ioctl space; see uapi/linux/fs.h.
37+ * 140-141 are reserved for future blk-crypto ioctls; any more than that would
38+ * require an additional allocation from the block device ioctl space.
39+ */
40+ #define BLKCRYPTOIMPORTKEY _IOWR(0x12, 137, struct blk_crypto_import_key_arg)
41+ #define BLKCRYPTOGENERATEKEY _IOWR(0x12, 138, struct blk_crypto_generate_key_arg)
42+ #define BLKCRYPTOPREPAREKEY _IOWR(0x12, 139, struct blk_crypto_prepare_key_arg)
43+
44+ #endif /* _UAPI_LINUX_BLK_CRYPTO_H */
You can’t perform that action at this time.
0 commit comments