Loading sdcard/sdcard.c +3 −3 Original line number Diff line number Diff line Loading @@ -264,7 +264,7 @@ struct fuse_handler { * buffer at the same time. This allows us to share the underlying storage. */ union { __u8 request_buffer[MAX_REQUEST_SIZE]; __u8 read_buffer[MAX_READ + PAGESIZE]; __u8 read_buffer[MAX_READ + PAGE_SIZE]; }; }; Loading Loading @@ -1282,7 +1282,7 @@ static int handle_read(struct fuse* fuse, struct fuse_handler* handler, __u32 size = req->size; __u64 offset = req->offset; int res; __u8 *read_buffer = (__u8 *) ((uintptr_t)(handler->read_buffer + PAGESIZE) & ~((uintptr_t)PAGESIZE-1)); __u8 *read_buffer = (__u8 *) ((uintptr_t)(handler->read_buffer + PAGE_SIZE) & ~((uintptr_t)PAGE_SIZE-1)); /* Don't access any other fields of hdr or req beyond this point, the read buffer * overlaps the request buffer and will clobber data in the request. This Loading @@ -1308,7 +1308,7 @@ static int handle_write(struct fuse* fuse, struct fuse_handler* handler, struct fuse_write_out out; struct handle *h = id_to_ptr(req->fh); int res; __u8 aligned_buffer[req->size] __attribute__((__aligned__(PAGESIZE))); __u8 aligned_buffer[req->size] __attribute__((__aligned__(PAGE_SIZE))); if (req->flags & O_DIRECT) { memcpy(aligned_buffer, buffer, req->size); Loading Loading
sdcard/sdcard.c +3 −3 Original line number Diff line number Diff line Loading @@ -264,7 +264,7 @@ struct fuse_handler { * buffer at the same time. This allows us to share the underlying storage. */ union { __u8 request_buffer[MAX_REQUEST_SIZE]; __u8 read_buffer[MAX_READ + PAGESIZE]; __u8 read_buffer[MAX_READ + PAGE_SIZE]; }; }; Loading Loading @@ -1282,7 +1282,7 @@ static int handle_read(struct fuse* fuse, struct fuse_handler* handler, __u32 size = req->size; __u64 offset = req->offset; int res; __u8 *read_buffer = (__u8 *) ((uintptr_t)(handler->read_buffer + PAGESIZE) & ~((uintptr_t)PAGESIZE-1)); __u8 *read_buffer = (__u8 *) ((uintptr_t)(handler->read_buffer + PAGE_SIZE) & ~((uintptr_t)PAGE_SIZE-1)); /* Don't access any other fields of hdr or req beyond this point, the read buffer * overlaps the request buffer and will clobber data in the request. This Loading @@ -1308,7 +1308,7 @@ static int handle_write(struct fuse* fuse, struct fuse_handler* handler, struct fuse_write_out out; struct handle *h = id_to_ptr(req->fh); int res; __u8 aligned_buffer[req->size] __attribute__((__aligned__(PAGESIZE))); __u8 aligned_buffer[req->size] __attribute__((__aligned__(PAGE_SIZE))); if (req->flags & O_DIRECT) { memcpy(aligned_buffer, buffer, req->size); Loading