You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
ANDROID: GKI: set vfs-only exports into their own namespace
We have namespaces, so use them for all vfs-exported namespaces so that filesystems can use them, but not anything else. Some in-kernel drivers that do direct filesystem accesses (because they serve up files) are also allowed access to these symbols to keep 'make allmodconfig' builds working properly, but it is not needed for Android kernel images. Bug: 157965270 Bug: 210074446 Cc: Matthias Maennich <maennich@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Iaf6140baf3a18a516ab2d5c3966235c42f3f70de
This commit is contained in:
@@ -2453,5 +2453,6 @@ static void __exit ns_cleanup_module(void)
|
||||
module_exit(ns_cleanup_module);
|
||||
|
||||
MODULE_LICENSE ("GPL");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
MODULE_AUTHOR ("Artem B. Bityuckiy");
|
||||
MODULE_DESCRIPTION ("The NAND flash simulator");
|
||||
|
||||
@@ -1476,3 +1476,4 @@ MODULE_VERSION(__stringify(UBI_VERSION));
|
||||
MODULE_DESCRIPTION("UBI - Unsorted Block Images");
|
||||
MODULE_AUTHOR("Artem Bityutskiy");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
|
||||
@@ -1602,3 +1602,4 @@ module_init(nvmet_init);
|
||||
module_exit(nvmet_exit);
|
||||
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
|
||||
@@ -3644,6 +3644,7 @@ static void __exit target_core_exit_configfs(void)
|
||||
MODULE_DESCRIPTION("Target_Core_Mod/ConfigFS");
|
||||
MODULE_AUTHOR("nab@Linux-iSCSI.org");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
|
||||
module_init(target_core_init_configfs);
|
||||
module_exit(target_core_exit_configfs);
|
||||
|
||||
@@ -956,6 +956,7 @@ static void __exit fileio_module_exit(void)
|
||||
MODULE_DESCRIPTION("TCM FILEIO subsystem plugin");
|
||||
MODULE_AUTHOR("nab@Linux-iSCSI.org");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
|
||||
module_init(fileio_module_init);
|
||||
module_exit(fileio_module_exit);
|
||||
|
||||
@@ -3446,6 +3446,7 @@ static struct usb_function *fsg_alloc(struct usb_function_instance *fi)
|
||||
|
||||
DECLARE_USB_FUNCTION_INIT(mass_storage, fsg_alloc_inst, fsg_alloc);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
MODULE_AUTHOR("Michal Nazarewicz");
|
||||
|
||||
/************************* Module parameters *************************/
|
||||
|
||||
@@ -1015,4 +1015,5 @@ static struct usb_function *f_audio_alloc(struct usb_function_instance *fi)
|
||||
|
||||
DECLARE_USB_FUNCTION_INIT(uac1_legacy, f_audio_alloc_inst, f_audio_alloc);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
MODULE_AUTHOR("Bryan Wu");
|
||||
|
||||
@@ -520,3 +520,4 @@ ssize_t fsg_store_inquiry_string(struct fsg_lun *curlun, const char *buf,
|
||||
EXPORT_SYMBOL_GPL(fsg_store_inquiry_string);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
|
||||
@@ -738,3 +738,4 @@ MODULE_AUTHOR("Latchesar Ionkov <lucho@ionkov.net>");
|
||||
MODULE_AUTHOR("Eric Van Hensbergen <ericvh@gmail.com>");
|
||||
MODULE_AUTHOR("Ron Minnich <rminnich@lanl.gov>");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
# Rewritten to use lists instead of if-statements.
|
||||
#
|
||||
|
||||
subdir-ccflags-y += -DANDROID_GKI_VFS_EXPORT_ONLY=VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver
|
||||
|
||||
obj-y := open.o read_write.o file_table.o super.o \
|
||||
char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \
|
||||
ioctl.o readdir.o select.o dcache.o inode.o \
|
||||
|
||||
@@ -492,3 +492,4 @@ static void __exit exit_adfs_fs(void)
|
||||
module_init(init_adfs_fs)
|
||||
module_exit(exit_adfs_fs)
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -676,6 +676,7 @@ static void __exit exit_affs_fs(void)
|
||||
|
||||
MODULE_DESCRIPTION("Amiga filesystem support for Linux");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
module_init(init_affs_fs)
|
||||
module_exit(exit_affs_fs)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
MODULE_DESCRIPTION("AFS Client File System");
|
||||
MODULE_AUTHOR("Red Hat, Inc.");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
unsigned afs_debug;
|
||||
module_param_named(debug, afs_debug, uint, S_IWUSR | S_IRUGO);
|
||||
|
||||
@@ -114,7 +114,7 @@ kill_priv:
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(setattr_prepare);
|
||||
EXPORT_SYMBOL_NS(setattr_prepare, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
/**
|
||||
* inode_newsize_ok - may this inode be truncated to a given size
|
||||
@@ -158,7 +158,7 @@ out_sig:
|
||||
out_big:
|
||||
return -EFBIG;
|
||||
}
|
||||
EXPORT_SYMBOL(inode_newsize_ok);
|
||||
EXPORT_SYMBOL_NS(inode_newsize_ok, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
/**
|
||||
* setattr_copy - copy simple metadata updates into the generic inode
|
||||
@@ -345,4 +345,4 @@ int notify_change(struct dentry * dentry, struct iattr * attr, struct inode **de
|
||||
|
||||
return error;
|
||||
}
|
||||
EXPORT_SYMBOL(notify_change);
|
||||
EXPORT_SYMBOL_NS(notify_change, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -44,3 +44,4 @@ static void __exit exit_autofs_fs(void)
|
||||
module_init(init_autofs_fs)
|
||||
module_exit(exit_autofs_fs)
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -207,7 +207,7 @@ void make_bad_inode(struct inode *inode)
|
||||
inode->i_opflags &= ~IOP_XATTR;
|
||||
inode->i_fop = &bad_file_ops;
|
||||
}
|
||||
EXPORT_SYMBOL(make_bad_inode);
|
||||
EXPORT_SYMBOL_NS(make_bad_inode, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
/*
|
||||
* This tests whether an inode has been flagged as bad. The test uses
|
||||
@@ -227,7 +227,7 @@ bool is_bad_inode(struct inode *inode)
|
||||
return (inode->i_op == &bad_inode_ops);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(is_bad_inode);
|
||||
EXPORT_SYMBOL_NS(is_bad_inode, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
/**
|
||||
* iget_failed - Mark an under-construction inode as dead and release it
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
MODULE_DESCRIPTION("BeOS File System (BeFS) driver");
|
||||
MODULE_AUTHOR("Will Dyson");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
/* The units the vfs expects inode->i_blocks to be in */
|
||||
#define VFS_BLOCK_SIZE 512
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
MODULE_AUTHOR("Tigran Aivazian <aivazian.tigran@gmail.com>");
|
||||
MODULE_DESCRIPTION("SCO UnixWare BFS filesystem for Linux");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
#undef DEBUG
|
||||
|
||||
|
||||
@@ -832,3 +832,4 @@ static void __exit exit_misc_binfmt(void)
|
||||
core_initcall(init_misc_binfmt);
|
||||
module_exit(exit_misc_binfmt);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -186,7 +186,7 @@ int sb_set_blocksize(struct super_block *sb, int size)
|
||||
return sb->s_blocksize;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(sb_set_blocksize);
|
||||
EXPORT_SYMBOL_NS(sb_set_blocksize, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
int sb_min_blocksize(struct super_block *sb, int size)
|
||||
{
|
||||
@@ -196,7 +196,7 @@ int sb_min_blocksize(struct super_block *sb, int size)
|
||||
return sb_set_blocksize(sb, size);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(sb_min_blocksize);
|
||||
EXPORT_SYMBOL_NS(sb_min_blocksize, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
static int
|
||||
blkdev_get_block(struct inode *inode, sector_t iblock,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user