ANDROID: fuse-bpf: Align data structs for 32-bit kernels

BPF is always 64-bit code, so we need to pad the uapi structs to be the
same on 32-bit as 64-bit

Bug: 285477572
Test: Cuttlefish x86_64, x86 and x86 only all boot and load fuseMedia
Change-Id: Idf5b09b2581b8d097048e7d2ff4039cd1806c082
Signed-off-by: Paul Lawrence <paullawrence@google.com>
This commit is contained in:
Paul Lawrence 2023-07-07 12:33:52 -07:00
parent 9f5a84b955
commit 523bfe8539

View File

@ -56,15 +56,29 @@ struct fuse_in_postfilter_header {
/** One input argument of a request */
struct fuse_bpf_in_arg {
uint32_t size;
const void *value;
const void *end_offset;
uint32_t padding;
union {
const void *value;
uint64_t padding2;
};
union {
const void *end_offset;
uint64_t padding3;
};
};
/** One output argument of a request */
struct fuse_bpf_arg {
uint32_t size;
void *value;
void *end_offset;
uint32_t padding;
union {
void *value;
uint64_t padding2;
};
union {
void *end_offset;
uint64_t padding3;
};
};
#define FUSE_MAX_IN_ARGS 5
@ -80,6 +94,7 @@ struct fuse_bpf_args {
uint32_t in_numargs;
uint32_t out_numargs;
uint32_t flags;
uint32_t padding;
struct fuse_bpf_in_arg in_args[FUSE_MAX_IN_ARGS];
struct fuse_bpf_arg out_args[FUSE_MAX_OUT_ARGS];
};