From patchwork Wed Jan 14 22:55:57 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1501 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431446; bh=mS4v652BnDkneD/eWf9A71TxHDchQq2lSGgXww1IZ5g=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=cSBQNV6LlR0oHMGLbFIJ7pkkazkIUGruP6SLHuYuXwxmHEVGmeVglMuxmO9QH23fh niC9UnO+2wjUPNvEMirF48bB0LoImhp6BD4vYodrHe0HgII8KRLr4frs4tZ6WRWcJ8 RMu1I+iNEiA5A2zikQLWUYFaUqkN3KAiBCy+j7t2wiBbJLA3Y/JYB5s0/3S2Yy+VBC gL81enWb9xBkE0RUnSSBY5h9S3rstv3AWeZhls/J0fS/kYFFDhfbHVRnbMq/y+gZbW 5kmu1NVGcT57u4Bam6NElqnuZ4sVqlmV3J13Ok2lbYbx0mpsnQNTrrYlaPnu46vW/Y 3/+qG0OmJ7i1Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 86C796935C for ; Wed, 14 Jan 2026 15:57:26 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id PMzP6Zs3rvxJ for ; Wed, 14 Jan 2026 15:57:26 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431446; bh=mS4v652BnDkneD/eWf9A71TxHDchQq2lSGgXww1IZ5g=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=cSBQNV6LlR0oHMGLbFIJ7pkkazkIUGruP6SLHuYuXwxmHEVGmeVglMuxmO9QH23fh niC9UnO+2wjUPNvEMirF48bB0LoImhp6BD4vYodrHe0HgII8KRLr4frs4tZ6WRWcJ8 RMu1I+iNEiA5A2zikQLWUYFaUqkN3KAiBCy+j7t2wiBbJLA3Y/JYB5s0/3S2Yy+VBC gL81enWb9xBkE0RUnSSBY5h9S3rstv3AWeZhls/J0fS/kYFFDhfbHVRnbMq/y+gZbW 5kmu1NVGcT57u4Bam6NElqnuZ4sVqlmV3J13Ok2lbYbx0mpsnQNTrrYlaPnu46vW/Y 3/+qG0OmJ7i1Q== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6F3C469342 for ; Wed, 14 Jan 2026 15:57:26 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431444; bh=pjwaLrLp9qM9Fdr5OG7IakrGflJVZKRC0AZ+WgICfog=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MOhrorrwXmaJb22CsqSjURObbYsvMjtKzCbCN1RUVKT+2WbVeoAltu8VCFGRNV54I GiKLTPYdl7GSjLjMmBM4A8zE+jfdpVZryVUJ1Fe55ymO5ymUHt3E8xkfK7HkUOgVWP sQU3zbb2lWyYIK1vpkc974mrEZ+hSzBuKNa8Yo/fv3xxN+vOOtEPhK3WzrIUQLYjq6 PrRHuz39qcVi0nh4vWvUQFFyqhGXMfahoCzKjGClp9PxOWdxPYcg1Bdr5AwxvgBqls a3xKWTIlmkWAOmxdcBMfyICEs1ZgCJttKE5fbPAVshVb0yDMRWLbM3Qtsks4GM8Mot 9qUcjh2SYXx/A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 61DFF692F1; Wed, 14 Jan 2026 15:57:24 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 5dXByqvARvXr; Wed, 14 Jan 2026 15:57:24 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431440; bh=bBmqwygWR3ikoJifpno0X6mL+sHBfNNqvUH7PFlhPn8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mo74cdeV6RNpkgQC3L33o2FRyqBTQ1GD2w1tKVJMDtvchtCUFjQl0J59++ziroLXV RHPKGGEb+xQ1BJZwu37PuGRGVBGzIlj5XRsrMamb1EzfBr23xfRy6osv9h+N+W5o2y myhA1X52Szb5JCUd6e5I6zJO2Tc50BmREmhUeuNfjT4bXije39e3ESOyjupDdAL2ow 80xz2iQ/wP9bO5Gr01sXZMz/rkuqsyT7ruySVmLOKpgh4yjMxajnLCeNWvMf2JKwra 8tphwowQaWnQvScSNFcMcMaY1SHhmgSBhYBG/BfsJOCnZBuA4MEnuWA50gw27ZfFDm wnqnXg0e+smfg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id F3812692EF; Wed, 14 Jan 2026 15:57:19 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Wed, 14 Jan 2026 15:55:57 -0700 Message-ID: <20260114225635.3407989-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260114225635.3407989-1-sjg@u-boot.org> References: <20260114225635.3407989-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: VO42GQZZUMTWMQ6HHJMF2IZ4UKKQZM5L X-Message-ID-Hash: VO42GQZZUMTWMQ6HHJMF2IZ4UKKQZM5L X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 07/34] ext4l: Consolidate fscrypt stubs into ext4_fscrypt.h List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Create a dedicated header file for filesystem encryption (fscrypt) stubs that are scattered throughout ext4_uboot.h In Linux, fscrypt provides filesystem-level encryption, but U-Boot does not support this feature. The new ext4_fscrypt.h contains: - Structure definitions (qstr, fscrypt_str, fscrypt_dummy_policy, fscrypt_name) - Inline functions (fscrypt_has_encryption_key, fscrypt_fname_siphash, fscrypt_match_name) - Operation stubs for encryption, directory operations, symlinks - Page I/O and readpage stubs - Function declarations for stub.c implementations This reduces ext4_uboot.h by ~90 lines and makes the fscrypt interface more maintainable by keeping all encryption-related stubs in one place. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_fscrypt.h | 144 ++++++++++++++++++++++++++++++++++++++++ fs/ext4l/ext4_uboot.h | 120 +++++---------------------------- 2 files changed, 160 insertions(+), 104 deletions(-) create mode 100644 fs/ext4l/ext4_fscrypt.h diff --git a/fs/ext4l/ext4_fscrypt.h b/fs/ext4l/ext4_fscrypt.h new file mode 100644 index 00000000000..da91af74343 --- /dev/null +++ b/fs/ext4l/ext4_fscrypt.h @@ -0,0 +1,144 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * fscrypt stubs for U-Boot ext4l + * + * In Linux, fscrypt provides filesystem-level encryption. In U-Boot, + * encryption is not supported, so all fscrypt operations are stubbed out. + */ + +#ifndef _EXT4_FSCRYPT_H +#define _EXT4_FSCRYPT_H + +#include +#include +#include +#include + +/* Forward declarations */ +struct inode; +struct seq_file; +struct page; +struct folio; +struct bio; +struct buffer_head; +struct dentry; +struct super_block; + +/* qstr - quick string for filenames (needed by fscrypt_name) */ +struct qstr { + u32 hash; + u32 len; + const unsigned char *name; +}; + +/* fscrypt_str - encrypted filename string */ +struct fscrypt_str { + unsigned char *name; + u32 len; +}; + +/* fscrypt_dummy_policy - stub */ +struct fscrypt_dummy_policy { + int dummy; +}; + +/* fscrypt_name - stub structure for encrypted filenames */ +struct fscrypt_name { + const struct qstr *usr_fname; + struct fscrypt_str disk_name; + u32 hash; + u32 minor_hash; + bool is_nokey_name; +}; + +/* fscrypt context size */ +#define FSCRYPT_SET_CONTEXT_MAX_SIZE 40 + +/* IS_ENCRYPTED - always false in U-Boot */ +#define IS_ENCRYPTED(inode) (0) + +/* fscrypt inline functions */ +static inline bool fscrypt_has_encryption_key(const struct inode *inode) +{ + return false; +} + +static inline u64 fscrypt_fname_siphash(const struct inode *dir, + const struct qstr *name) +{ + return 0; +} + +static inline int fscrypt_match_name(const struct fscrypt_name *fname, + const u8 *de_name, u32 de_name_len) +{ + if (fname->usr_fname->len != de_name_len) + return 0; + + return !memcmp(fname->usr_fname->name, de_name, de_name_len); +} + +/* fscrypt operation stubs */ +#define fscrypt_prepare_new_inode(dir, i, e) ({ (void)(dir); (void)(i); (void)(e); 0; }) +#define fscrypt_set_context(inode, handle) ({ (void)(inode); (void)(handle); 0; }) +#define fscrypt_file_open(i, f) ({ (void)(i); (void)(f); 0; }) +#define fscrypt_inode_uses_fs_layer_crypto(i) (0) +#define fscrypt_decrypt_pagecache_blocks(f, l, o) ({ (void)(f); (void)(l); (void)(o); 0; }) +#define fscrypt_encrypt_pagecache_blocks(f, l, o, g) \ + ({ (void)(f); (void)(l); (void)(o); (void)(g); (struct page *)NULL; }) +#define fscrypt_zeroout_range(i, lb, pb, l) ({ (void)(i); (void)(lb); (void)(pb); (void)(l); 0; }) +#define fscrypt_limit_io_blocks(i, lb, l) (l) +#define fscrypt_prepare_setattr(d, a) ({ (void)(d); (void)(a); 0; }) +#define fscrypt_dio_supported(i) (1) +#define fscrypt_has_permitted_context(p, c) ({ (void)(p); (void)(c); 1; }) +#define fscrypt_is_nokey_name(d) ({ (void)(d); 0; }) +#define fscrypt_prepare_symlink(d, s, l, m, dl) \ + ({ (void)(d); (void)(m); (dl)->name = (unsigned char *)(s); (dl)->len = (l) + 1; 0; }) +#define fscrypt_encrypt_symlink(i, s, l, d) ({ (void)(i); (void)(s); (void)(l); (void)(d); 0; }) +#define fscrypt_prepare_link(o, d, n) ({ (void)(o); (void)(d); (void)(n); 0; }) +#define fscrypt_prepare_rename(od, ode, nd, nde, f) \ + ({ (void)(od); (void)(ode); (void)(nd); (void)(nde); (void)(f); 0; }) + +/* fscrypt directory operations */ +#define fscrypt_prepare_readdir(i) ({ (void)(i); 0; }) +#define fscrypt_fname_alloc_buffer(len, buf) ({ (void)(len); (void)(buf); 0; }) +#define fscrypt_fname_free_buffer(buf) do { (void)(buf); } while (0) +#define fscrypt_fname_disk_to_usr(i, h1, h2, d, u) \ + ({ (void)(i); (void)(h1); (void)(h2); (void)(d); (void)(u); 0; }) + +/* fscrypt symlink stubs */ +#define fscrypt_get_symlink(i, c, m, d) ({ (void)(i); (void)(c); (void)(m); (void)(d); ERR_PTR(-EOPNOTSUPP); }) +#define fscrypt_symlink_getattr(p, s) ({ (void)(p); (void)(s); 0; }) + +/* fscrypt inode operations */ +#define fscrypt_put_encryption_info(i) do { } while (0) +#define fscrypt_parse_test_dummy_encryption(p, d) ({ (void)(p); (void)(d); 0; }) + +/* fscrypt page-io stubs */ +#define fscrypt_is_bounce_folio(f) ({ (void)(f); 0; }) +#define fscrypt_pagecache_folio(f) (f) +#define fscrypt_free_bounce_page(p) do { (void)(p); } while (0) +#define fscrypt_set_bio_crypt_ctx_bh(bio, bh, gfp) \ + do { (void)(bio); (void)(bh); (void)(gfp); } while (0) +#define fscrypt_mergeable_bio_bh(bio, bh) \ + ({ (void)(bio); (void)(bh); true; }) + +/* fscrypt readpage stubs */ +#define fscrypt_decrypt_bio(bio) ({ (void)(bio); 0; }) +#define fscrypt_enqueue_decrypt_work(work) do { (void)(work); } while (0) +#define fscrypt_mergeable_bio(bio, inode, blk) \ + ({ (void)(bio); (void)(inode); (void)(blk); true; }) +#define fscrypt_set_bio_crypt_ctx(bio, inode, blk, gfp) \ + do { (void)(bio); (void)(inode); (void)(blk); (void)(gfp); } while (0) + +/* fscrypt function declarations (implemented in stub.c) */ +void fscrypt_free_dummy_policy(struct fscrypt_dummy_policy *policy); +int fscrypt_drop_inode(struct inode *inode); +void fscrypt_free_inode(struct inode *inode); +int fscrypt_is_dummy_policy_set(const struct fscrypt_dummy_policy *policy); +int fscrypt_dummy_policies_equal(const struct fscrypt_dummy_policy *p1, + const struct fscrypt_dummy_policy *p2); +void fscrypt_show_test_dummy_encryption(struct seq_file *seq, char sep, + struct super_block *sb); + +#endif /* _EXT4_FSCRYPT_H */ diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 2ffa8ab271b..c6795b35501 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -41,6 +41,7 @@ #include /* For timespec64, time64_t */ #include /* For crc32() used by crc32_be */ #include "ext4_trace.h" /* Trace event stubs */ +#include "ext4_fscrypt.h" /* fscrypt stubs */ /* * __CHAR_UNSIGNED__ - directory hash algorithm selection @@ -259,11 +260,7 @@ struct fiemap_extent_info { #define CAP_SYS_RESOURCE 0 #define capable(cap) (1) -/* fscrypt_str - stub */ -struct fscrypt_str { - unsigned char *name; - u32 len; -}; +/* fscrypt_str, qstr are now in ext4_fscrypt.h */ /* percpu rw semaphore - stubs */ struct percpu_rw_semaphore { @@ -281,12 +278,9 @@ static inline void memalloc_nofs_restore(unsigned int flags) { } /* Inode flags - stubs */ #define IS_CASEFOLDED(inode) (0) -#define IS_ENCRYPTED(inode) (0) +/* IS_ENCRYPTED and FSCRYPT_SET_CONTEXT_MAX_SIZE are in ext4_fscrypt.h */ #define S_NOQUOTA 0 -/* fscrypt context - stub */ -#define FSCRYPT_SET_CONTEXT_MAX_SIZE 40 - /* User namespace - stub */ struct user_namespace { int dummy; @@ -389,9 +383,7 @@ extern struct inode *new_inode(struct super_block *sb); #define clear_nlink(inode) do { } while (0) #define IS_DIRSYNC(inode) ({ (void)(inode); 0; }) -/* fscrypt stubs */ -#define fscrypt_prepare_new_inode(dir, i, e) ({ (void)(dir); (void)(i); (void)(e); 0; }) -#define fscrypt_set_context(inode, handle) ({ (void)(inode); (void)(handle); 0; }) +/* fscrypt_prepare_new_inode, fscrypt_set_context are in ext4_fscrypt.h */ /* ext4_init_acl is provided by acl.h */ /* xattr stubs for files that don't include xattr.h */ @@ -517,10 +509,7 @@ struct ratelimit_state { int dummy; }; -/* fscrypt_dummy_policy - stub */ -struct fscrypt_dummy_policy { - int dummy; -}; +/* fscrypt_dummy_policy and qstr are now in ext4_fscrypt.h */ /* errseq_t is defined in linux/fs.h */ /* time64_t is now in linux/time.h */ @@ -528,12 +517,6 @@ struct fscrypt_dummy_policy { /* IS_NOQUOTA - stub */ #define IS_NOQUOTA(inode) (0) -/* qstr - quick string for filenames (must be before dentry) */ -struct qstr { - const unsigned char *name; - unsigned int len; -}; - /* dentry - stub */ struct dentry { struct qstr d_name; @@ -981,17 +964,7 @@ struct dx_hash_info { /* seq_file - forward declaration */ struct seq_file; -/* fscrypt stubs - encryption not supported in U-Boot */ -static inline bool fscrypt_has_encryption_key(const struct inode *inode) -{ - return false; -} - -static inline u64 fscrypt_fname_siphash(const struct inode *dir, - const struct qstr *name) -{ - return 0; -} +/* fscrypt_has_encryption_key, fscrypt_fname_siphash are in ext4_fscrypt.h */ /* ext4 warning macros - stubs (only when ext4.h is not included) */ #ifdef EXT4_UBOOT_NO_EXT4_H @@ -1450,8 +1423,7 @@ static inline char *d_path(const struct path *path, char *buf, int buflen) return buf; } -/* fscrypt/fsverity stubs */ -#define fscrypt_file_open(i, f) ({ (void)(i); (void)(f); 0; }) +/* fscrypt_file_open is in ext4_fscrypt.h */ #define fsverity_file_open(i, f) ({ (void)(i); (void)(f); 0; }) /* Quota file open - stub */ @@ -1541,38 +1513,7 @@ static inline char *d_path(const struct path *path, char *buf, int buflen) #define map_bh(bh, sb, block) do { } while (0) #define write_begin_get_folio(iocb, m, idx, l) ({ (void)(iocb); (void)(m); (void)(idx); (void)(l); (struct folio *)NULL; }) -/* fscrypt stubs - additional */ -#define fscrypt_inode_uses_fs_layer_crypto(i) (0) -#define fscrypt_decrypt_pagecache_blocks(f, l, o) ({ (void)(f); (void)(l); (void)(o); 0; }) -#define fscrypt_encrypt_pagecache_blocks(f, l, o, g) ({ (void)(f); (void)(l); (void)(o); (void)(g); (struct page *)NULL; }) -#define fscrypt_zeroout_range(i, lb, pb, l) ({ (void)(i); (void)(lb); (void)(pb); (void)(l); 0; }) -#define fscrypt_limit_io_blocks(i, lb, l) (l) -#define fscrypt_prepare_setattr(d, a) ({ (void)(d); (void)(a); 0; }) -#define fscrypt_dio_supported(i) (1) -#define fscrypt_has_permitted_context(p, c) ({ (void)(p); (void)(c); 1; }) -#define fscrypt_is_nokey_name(d) ({ (void)(d); 0; }) -#define fscrypt_prepare_symlink(d, s, l, m, dl) ({ (void)(d); (void)(m); (dl)->name = (unsigned char *)(s); (dl)->len = (l) + 1; 0; }) -#define fscrypt_encrypt_symlink(i, s, l, d) ({ (void)(i); (void)(s); (void)(l); (void)(d); 0; }) -#define fscrypt_prepare_link(o, d, n) ({ (void)(o); (void)(d); (void)(n); 0; }) -#define fscrypt_prepare_rename(od, ode, nd, nde, f) ({ (void)(od); (void)(ode); (void)(nd); (void)(nde); (void)(f); 0; }) - -/* fscrypt_name - stub structure for encrypted filenames */ -struct fscrypt_name { - const struct qstr *usr_fname; - struct fscrypt_str disk_name; - u32 hash; - u32 minor_hash; - bool is_nokey_name; -}; - -static inline int fscrypt_match_name(const struct fscrypt_name *fname, - const u8 *de_name, u32 de_name_len) -{ - if (fname->usr_fname->len != de_name_len) - return 0; - - return !memcmp(fname->usr_fname->name, de_name, de_name_len); -} +/* fscrypt_name, fscrypt_match_name, and fscrypt stubs are in ext4_fscrypt.h */ /* fsverity stubs */ #define fsverity_prepare_setattr(d, a) ({ (void)(d); (void)(a); 0; }) @@ -1688,14 +1629,10 @@ extern struct inode *iget_locked(struct super_block *sb, unsigned long ino); * Additional stubs for dir.c */ -/* fscrypt_str - encrypted filename string */ +/* FSTR_INIT - fscrypt_str initializer (fscrypt_str defined in ext4_fscrypt.h) */ #define FSTR_INIT(n, l) { .name = (n), .len = (l) } -/* fscrypt directory operations */ -#define fscrypt_prepare_readdir(i) ({ (void)(i); 0; }) -#define fscrypt_fname_alloc_buffer(len, buf) ({ (void)(len); (void)(buf); 0; }) -#define fscrypt_fname_free_buffer(buf) do { (void)(buf); } while (0) -#define fscrypt_fname_disk_to_usr(i, h1, h2, d, u) ({ (void)(i); (void)(h1); (void)(h2); (void)(d); (void)(u); 0; }) +/* fscrypt directory operations are in ext4_fscrypt.h */ /* Readahead operations */ #define ra_has_index(ra, idx) ({ (void)(ra); (void)(idx); 0; }) @@ -1801,9 +1738,7 @@ static inline const char *simple_get_link(struct dentry *dentry, return inode->i_link; } -/* fscrypt symlink stubs */ -#define fscrypt_get_symlink(i, c, m, d) ({ (void)(i); (void)(c); (void)(m); (void)(d); ERR_PTR(-EOPNOTSUPP); }) -#define fscrypt_symlink_getattr(p, s) ({ (void)(p); (void)(s); 0; }) +/* fscrypt symlink stubs are in ext4_fscrypt.h */ /* * Additional stubs for super.c @@ -2215,10 +2150,7 @@ void wait_for_completion(struct completion *comp); /* DAX - declaration for stub.c */ void fs_put_dax(void *dax, void *holder); -/* fscrypt - declarations for stub.c */ -void fscrypt_free_dummy_policy(struct fscrypt_dummy_policy *policy); -int fscrypt_drop_inode(struct inode *inode); -void fscrypt_free_inode(struct inode *inode); +/* fscrypt declarations are in ext4_fscrypt.h */ /* Inode allocation - declaration for stub.c */ void *alloc_inode_sb(struct super_block *sb, struct kmem_cache *cache, @@ -2236,10 +2168,8 @@ int inode_generic_drop(struct inode *inode); #define invalidate_inode_buffers(i) do { } while (0) #define clear_inode(i) do { } while (0) -/* fscrypt/fsverity additional stubs */ -#define fscrypt_put_encryption_info(i) do { } while (0) +/* fsverity stubs (fscrypt macros are in ext4_fscrypt.h) */ #define fsverity_cleanup_inode(i) do { } while (0) -#define fscrypt_parse_test_dummy_encryption(p, d) ({ (void)(p); (void)(d); 0; }) /* NFS export helpers - declarations for stub.c */ struct dentry *generic_fh_to_dentry(struct super_block *sb, struct fid *fid, @@ -2259,12 +2189,7 @@ int IOPRIO_PRIO_VALUE(int class, int data); char *kmemdup_nul(const char *s, size_t len, gfp_t gfp); #define strscpy_pad(dst, src) strncpy(dst, src, sizeof(dst)) -/* fscrypt/fsverity declarations for stub.c */ -int fscrypt_is_dummy_policy_set(const struct fscrypt_dummy_policy *policy); -int fscrypt_dummy_policies_equal(const struct fscrypt_dummy_policy *p1, - const struct fscrypt_dummy_policy *p2); -void fscrypt_show_test_dummy_encryption(struct seq_file *seq, char sep, - struct super_block *sb); +/* fscrypt declarations are in ext4_fscrypt.h */ /* Memory allocation - declarations for stub.c */ void *kvzalloc(size_t size, gfp_t flags); @@ -2618,14 +2543,7 @@ struct folio_iter { /* GFP_NOIO - allocation without I/O */ #define GFP_NOIO 0 -/* fscrypt stubs for page-io.c */ -#define fscrypt_is_bounce_folio(f) ({ (void)(f); 0; }) -#define fscrypt_pagecache_folio(f) (f) -#define fscrypt_free_bounce_page(p) do { (void)(p); } while (0) -#define fscrypt_set_bio_crypt_ctx_bh(bio, bh, gfp) \ - do { (void)(bio); (void)(bh); (void)(gfp); } while (0) -#define fscrypt_mergeable_bio_bh(bio, bh) \ - ({ (void)(bio); (void)(bh); 1; }) +/* fscrypt page-io stubs are in ext4_fscrypt.h */ /* folio writeback operations */ #define folio_end_writeback(f) do { (void)(f); } while (0) @@ -2657,13 +2575,7 @@ typedef void *mempool_t; #define folio_end_read(f, success) do { (void)(f); (void)(success); } while (0) #define folio_set_mappedtodisk(f) do { (void)(f); } while (0) -/* fscrypt stubs for readpage.c */ -#define fscrypt_decrypt_bio(bio) ({ (void)(bio); 0; }) -#define fscrypt_enqueue_decrypt_work(work) do { (void)(work); } while (0) -#define fscrypt_mergeable_bio(bio, inode, blk) \ - ({ (void)(bio); (void)(inode); (void)(blk); 1; }) -#define fscrypt_set_bio_crypt_ctx(bio, inode, blk, gfp) \ - do { (void)(bio); (void)(inode); (void)(blk); (void)(gfp); } while (0) +/* fscrypt readpage stubs are in ext4_fscrypt.h */ /* fsverity stubs */ #define fsverity_verify_bio(bio) do { (void)(bio); } while (0)