ANDROID: fuse-bpf: Make fuse_test pass on 15-6.6

* Handle AT_GETATTR_NOSEC
* Resolve fuse_in_postfilter_header clash

Test: fuse_test passes
Bug: 329877626
Change-Id: I4a3a22a7266d3745ed2d320556c6e2f2ab3571fc
Signed-off-by: Paul Lawrence <paullawrence@google.com>
This commit is contained in:
Paul Lawrence
2024-03-18 13:39:16 -07:00
parent 8be90ef631
commit be7841a4ed
3 changed files with 18 additions and 4 deletions
+4 -1
View File
@@ -1967,7 +1967,10 @@ int fuse_getattr_backing(struct fuse_bpf_args *fa,
if (!stat)
stat = &tmp;
err = vfs_getattr(backing_path, stat, request_mask, flags);
if (flags & AT_GETATTR_NOSEC)
err = vfs_getattr_nosec(backing_path, stat, request_mask, flags);
else
err = vfs_getattr(backing_path, stat, request_mask, flags);
if (!err)
fuse_stat_to_attr(get_fuse_conn(entry->d_inode),
+1 -1
View File
@@ -538,7 +538,7 @@ static void fuse_args_to_req(struct fuse_req *req, struct fuse_args *args)
{
req->in.h.opcode = args->opcode;
req->in.h.nodeid = args->nodeid;
req->in.h.padding = args->error_in;
req->in.h.error_in = args->error_in;
req->args = args;
if (args->is_ext)
req->in.h.total_extlen = args->in_args[args->ext_idx].size / 8;
+13 -2
View File
@@ -1013,8 +1013,19 @@ struct fuse_in_header {
uint32_t uid;
uint32_t gid;
uint32_t pid;
uint16_t total_extlen; /* length of extensions in 8byte units */
uint16_t padding;
/*
* fuse-bpf reused the padding field to pass errors to postfilter
* Unfortunately this field has now been used for extlen.
* Manage at least temporarily with a union
*/
union {
struct {
uint16_t total_extlen; /* length of extensions in 8byte units */
uint16_t padding;
};
uint32_t error_in;
};
};
struct fuse_out_header {