[PATCH 3/8] asm-generic: fix unaligned access hamdling in raw_copy_{from,to}_user

Al Viro viro at zeniv.linux.org.uk
Fri Sep 4 14:06:17 EDT 2020


On Fri, Sep 04, 2020 at 06:52:11PM +0200, Christoph Hellwig wrote:
> Use get_unaligned and put_unaligned for the small constant size cases
> in the generic uaccess routines.  This ensures they can be used for
> architectures that do not support unaligned loads and stores, while
> being a no-op for those that do.

Frankly, I would rather get rid of those constant-sized cases entirely;
sure, we'd need to adjust asm-generic/uaccess.h defaults for __get_user(),
but there that kind of stuff would make sense; in raw_copy_from_user()
it really doesn't.



More information about the linux-riscv mailing list