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:
Greg Kroah-Hartman
2020-07-02 12:51:03 +02:00
parent 8b304ef274
commit 0a77fca3aa
104 changed files with 173 additions and 86 deletions

View File

@@ -2145,7 +2145,7 @@ struct dentry *d_obtain_alias(struct inode *inode)
{
return __d_obtain_alias(inode, true);
}
EXPORT_SYMBOL(d_obtain_alias);
EXPORT_SYMBOL_NS(d_obtain_alias, ANDROID_GKI_VFS_EXPORT_ONLY);
/**
* d_obtain_root - find or allocate a dentry for a given inode
@@ -2219,7 +2219,7 @@ struct dentry *d_add_ci(struct dentry *dentry, struct inode *inode,
}
return found;
}
EXPORT_SYMBOL(d_add_ci);
EXPORT_SYMBOL_NS(d_add_ci, ANDROID_GKI_VFS_EXPORT_ONLY);
static inline bool d_same_name(const struct dentry *dentry,
@@ -2950,7 +2950,7 @@ void d_move(struct dentry *dentry, struct dentry *target)
__d_move(dentry, target, false);
write_sequnlock(&rename_lock);
}
EXPORT_SYMBOL(d_move);
EXPORT_SYMBOL_NS(d_move, ANDROID_GKI_VFS_EXPORT_ONLY);
/*
* d_exchange - exchange two dentries
@@ -3100,7 +3100,7 @@ out:
__d_add(dentry, inode);
return NULL;
}
EXPORT_SYMBOL(d_splice_alias);
EXPORT_SYMBOL_NS(d_splice_alias, ANDROID_GKI_VFS_EXPORT_ONLY);
/*
* Test whether new_dentry is a subdirectory of old_dentry.