Revision cd358208d703fca446b52f3cf8f23c18f9e7705e authored by Linus Torvalds on 31 August 2021, 17:01:14 UTC, committed by Linus Torvalds on 31 August 2021, 17:01:14 UTC
Pull fscrypt updates from Eric Biggers: "Some small fixes and cleanups for fs/crypto/: - Fix ->getattr() for ext4, f2fs, and ubifs to report the correct st_size for encrypted symlinks - Use base64url instead of a custom Base64 variant - Document struct fscrypt_operations" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fscrypt: document struct fscrypt_operations fscrypt: align Base64 encoding with RFC 4648 base64url fscrypt: remove mention of symlink st_size quirk from documentation ubifs: report correct st_size for encrypted symlinks f2fs: report correct st_size for encrypted symlinks ext4: report correct st_size for encrypted symlinks fscrypt: add fscrypt_symlink_getattr() for computing st_size
fault-inject-usercopy.c
// SPDX-License-Identifier: GPL-2.0-only
#include <linux/fault-inject.h>
#include <linux/fault-inject-usercopy.h>
static struct {
struct fault_attr attr;
} fail_usercopy = {
.attr = FAULT_ATTR_INITIALIZER,
};
static int __init setup_fail_usercopy(char *str)
{
return setup_fault_attr(&fail_usercopy.attr, str);
}
__setup("fail_usercopy=", setup_fail_usercopy);
#ifdef CONFIG_FAULT_INJECTION_DEBUG_FS
static int __init fail_usercopy_debugfs(void)
{
struct dentry *dir;
dir = fault_create_debugfs_attr("fail_usercopy", NULL,
&fail_usercopy.attr);
if (IS_ERR(dir))
return PTR_ERR(dir);
return 0;
}
late_initcall(fail_usercopy_debugfs);
#endif /* CONFIG_FAULT_INJECTION_DEBUG_FS */
bool should_fail_usercopy(void)
{
return should_fail(&fail_usercopy.attr, 1);
}
EXPORT_SYMBOL_GPL(should_fail_usercopy);
Computing file changes ...