On 4/11/23 6:14?PM, Josh Poimboeuf wrote: > On Tue, Apr 11, 2023 at 04:39:39PM -0600, Jens Axboe wrote: >>>>>>> lib/iov_iter.o: warning: objtool: .altinstr_replacement+0x0: redundant UACCESS d >>>>>>> isable >>>>>>> lib/iov_iter.o: warning: objtool: iovec_from_user.part.0+0xc7: call to copy_comp >>>>>>> at_iovec_from_user.part.0() with UACCESS enabled >>>>>>> lib/iov_iter.o: warning: objtool: __import_iovec+0x21d: call to copy_compat_iovec_from_user.part.0() with UACCESS enabled >>>>>>> >>>>>>> Presumably introduced by commit >>>>>>> >>>>>>> 6376ce56feb6 ("iov_iter: import single vector iovecs as ITER_UBUF") >> >> lib/iov_iter.o attached, gzip'ed. NOTE: if you disable either of the >> copy_compat_iovec_from_user() as per diff below (commented out), then >> it doesn't complain. Is there some bug where it thinks we'll hit both? >> That should not be possible. > > Yeah, the problem is an inter-procedural compiler optimization which > moves the user_access_begin() out of copy_compat_iovec_from_user() and > into its callers. Ah, I see. > Which is fine, but objtool doesn't like it as it expects the uaccess > enable to not cross function boundaries. > > Do the warnings go away if you make copy_compat_iovec_from_user() > non-static? Yep, if I kill the static, it stops complaining. -- Jens Axboe