On 3/29/23 1:42 PM, Jens Axboe wrote: > On 3/29/23 1:38 PM, Jens Axboe wrote: >> On 3/29/23 1:30 PM, Linus Torvalds wrote: >>> On Wed, Mar 29, 2023 at 11:41 AM Jens Axboe <axboe@xxxxxxxxx> wrote: >>>> >>>> + struct iovec __ubuf_iovec; >>> >>> I think this is the third time I say this: this should be "const struct iovec". >> >> Doh sorry, not sure why I keep missing that... But yes, it should, I'll make >> the edit and actually amend it. > > Now I recall why that ended up like that again, during the initial fiddling > with this. If we leave it const, we get: > > CC arch/arm64/kernel/asm-offsets.s > In file included from ./include/linux/socket.h:8, > from ./include/linux/compat.h:15, > from ./arch/arm64/include/asm/ftrace.h:52, > from ./include/linux/ftrace.h:23, > from arch/arm64/kernel/asm-offsets.c:12: > ./include/linux/uio.h: In function ‘iov_iter_ubuf’: > ./include/linux/uio.h:374:12: error: assignment of read-only location ‘*i’ > 374 | *i = (struct iov_iter) { > | ^ > make[1]: *** [scripts/Makefile.build:114: arch/arm64/kernel/asm-offsets.s] Error 1 > make: *** [Makefile:1286: prepare0] Error 2 > > Let me take a closer look at that... We can get rid of these if we convert the iov_iter initializers to just assign the members rather than the copy+zero fill. The automatic zero fill is nice though, in terms of sanity. -- Jens Axboe