ANDROID: fuse: Add flag for Android passthrough support
Android does not work with unmodified Android passthrough. This feature flag marks that those modifications are in place, and that passthrough will function as Android expects. Bug: 376007121 Test: cat /sys/fs/fuse/fuse_passthrough Change-Id: I2cd2a6f646e2b6172b5ecc5cc699318395082f63 Signed-off-by: Daniel Rosenberg <drosen@google.com>
This commit is contained in:
committed by
Treehugger Robot
parent
7b7404ab99
commit
62ae9b0430
@@ -5,6 +5,14 @@ Description:
|
||||
Read-only file that contains the word 'supported' if fuse-bpf is
|
||||
supported, does not exist otherwise
|
||||
|
||||
What: /sys/fs/fuse/features/fuse_passthrough
|
||||
Date: February 2025
|
||||
Contact: Daniel Rosenberg <drosen@google.com>
|
||||
Description:
|
||||
Read-only file that contains the word 'supported' if fuse
|
||||
passthrough with Android modifications is supported, does not
|
||||
exist otherwise
|
||||
|
||||
What: /sys/fs/fuse/bpf_prog_type_fuse
|
||||
Date: December 2022
|
||||
Contact: Paul Lawrence <paullawrence@google.com>
|
||||
|
||||
+18
-4
@@ -2242,6 +2242,17 @@ static void fuse_fs_cleanup(void)
|
||||
|
||||
static struct kobject *fuse_kobj;
|
||||
|
||||
#ifdef CONFIG_FUSE_PASSTHROUGH
|
||||
static ssize_t fuse_passthrough_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr, char *buff)
|
||||
{
|
||||
return sysfs_emit(buff, "supported\n");
|
||||
}
|
||||
|
||||
static struct kobj_attribute fuse_passthrough_attr =
|
||||
__ATTR_RO(fuse_passthrough);
|
||||
#endif
|
||||
|
||||
static ssize_t fuse_bpf_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr, char *buff)
|
||||
{
|
||||
@@ -2251,14 +2262,17 @@ static ssize_t fuse_bpf_show(struct kobject *kobj,
|
||||
static struct kobj_attribute fuse_bpf_attr =
|
||||
__ATTR_RO(fuse_bpf);
|
||||
|
||||
static struct attribute *bpf_features[] = {
|
||||
static struct attribute *fuse_features[] = {
|
||||
&fuse_bpf_attr.attr,
|
||||
#ifdef CONFIG_FUSE_PASSTHROUGH
|
||||
&fuse_passthrough_attr.attr,
|
||||
#endif
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const struct attribute_group bpf_features_group = {
|
||||
static const struct attribute_group fuse_features_group = {
|
||||
.name = "features",
|
||||
.attrs = bpf_features,
|
||||
.attrs = fuse_features,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -2286,7 +2300,7 @@ static const struct attribute_group bpf_attr_group = {
|
||||
};
|
||||
|
||||
static const struct attribute_group *attribute_groups[] = {
|
||||
&bpf_features_group,
|
||||
&fuse_features_group,
|
||||
&bpf_attr_group,
|
||||
NULL
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user