History

Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt

Pull fscrypt updates from Eric Biggers: - Add the IV_INO_LBLK_64 encryption policy flag which modifies the encryption to be optimized for UFS inline encryption hardware. - For AES-128-CBC, use the crypto API's implementation of ESSIV (which was added in 5.4) rather than doing ESSIV manually. - A few other cleanups. * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: f2fs: add support for IV_INO_LBLK_64 encryption policies ext4: add support for IV_INO_LBLK_64 encryption policies fscrypt: add support for IV_INO_LBLK_64 policies fscrypt: avoid data race on fscrypt_mode::logged_impl_name docs: ioctl-number: document fscrypt ioctl numbers fscrypt: zeroize fscrypt_info before freeing fscrypt: remove struct fscrypt_ctx fscrypt: invoke crypto API for ESSIV handling

Linus Torvalds committed 6 years ago

Commit ea4b71b2 parents ae36607 0eee17e14 files · +208 −328Browse files

Showing the changes to include/linux (1 of 14 files). Show all

Unified · Split

include/linux/fscrypt.h+3−32
@@ -20,7 +20,6 @@ · 19 unmodified lines
20 20
21#define FS_CRYPTO_BLOCK_SIZE 1621#define FS_CRYPTO_BLOCK_SIZE 16
22 22
23struct fscrypt_ctx;
24struct fscrypt_info;23struct fscrypt_info;
25 24
26struct fscrypt_str {25struct fscrypt_str {
@@ -62,18 +61,9 @@ struct fscrypt_operations { · 35 unmodified lines
62 bool (*dummy_context)(struct inode *);61 bool (*dummy_context)(struct inode *);
63 bool (*empty_dir)(struct inode *);62 bool (*empty_dir)(struct inode *);
64 unsigned int max_namelen;63 unsigned int max_namelen;
65};64 bool (*has_stable_inodes)(struct super_block *sb);
66 65 void (*get_ino_and_lblk_bits)(struct super_block *sb,
67/* Decryption work */66 int *ino_bits_ret, int *lblk_bits_ret);
68struct fscrypt_ctx {
69 union {
70 struct {
71 struct bio *bio;
72 struct work_struct work;
73 };
74 struct list_head free_list; /* Free list */
75 };
76 u8 flags; /* Flags */
77};67};
78 68
79static inline bool fscrypt_has_encryption_key(const struct inode *inode)69static inline bool fscrypt_has_encryption_key(const struct inode *inode)
@@ -102,8 +92,6 @@ static inline void fscrypt_handle_d_move(struct dentry *dentry) · 22 unmodified lines
102 92
103/* crypto.c */93/* crypto.c */
104extern void fscrypt_enqueue_decrypt_work(struct work_struct *);94extern void fscrypt_enqueue_decrypt_work(struct work_struct *);
105extern struct fscrypt_ctx *fscrypt_get_ctx(gfp_t);
106extern void fscrypt_release_ctx(struct fscrypt_ctx *);
107 95
108extern struct page *fscrypt_encrypt_pagecache_blocks(struct page *page,96extern struct page *fscrypt_encrypt_pagecache_blocks(struct page *page,
109 unsigned int len,97 unsigned int len,
@@ -244,8 +232,6 @@ static inline bool fscrypt_match_name(const struct fscrypt_name *fname, · 134 unmodified lines
244 232
245/* bio.c */233/* bio.c */
246extern void fscrypt_decrypt_bio(struct bio *);234extern void fscrypt_decrypt_bio(struct bio *);
247extern void fscrypt_enqueue_decrypt_bio(struct fscrypt_ctx *ctx,
248 struct bio *bio);
249extern int fscrypt_zeroout_range(const struct inode *, pgoff_t, sector_t,235extern int fscrypt_zeroout_range(const struct inode *, pgoff_t, sector_t,
250 unsigned int);236 unsigned int);
251 237
@@ -295,16 +281,6 @@ static inline void fscrypt_enqueue_decrypt_work(struct work_struct *work) · 43 unmodified lines
295{281{
296}282}
297 283
298static inline struct fscrypt_ctx *fscrypt_get_ctx(gfp_t gfp_flags)
299{
300 return ERR_PTR(-EOPNOTSUPP);
301}
302
303static inline void fscrypt_release_ctx(struct fscrypt_ctx *ctx)
304{
305 return;
306}
307
308static inline struct page *fscrypt_encrypt_pagecache_blocks(struct page *page,284static inline struct page *fscrypt_encrypt_pagecache_blocks(struct page *page,
309 unsigned int len,285 unsigned int len,
310 unsigned int offs,286 unsigned int offs,
@@ -484,11 +460,6 @@ static inline void fscrypt_decrypt_bio(struct bio *bio) · 173 unmodified lines
484{460{
485}461}
486 462
487static inline void fscrypt_enqueue_decrypt_bio(struct fscrypt_ctx *ctx,
488 struct bio *bio)
489{
490}
491
492static inline int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk,463static inline int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk,
493 sector_t pblk, unsigned int len)464 sector_t pblk, unsigned int len)
494{465{

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t