Re: [PATCH] m68knommu: add missing __user annotations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 8/9/20 11:30 pm, Christoph Hellwig wrote:
On Tue, Sep 08, 2020 at 11:26:47PM +1000, Greg Ungerer wrote:
Some of the m68knommu user access functions are not using the __user
annotation where required. Specifically __clear_user(), strnlen_user()
and strncpy_from_user() need their user space source address annoted
with __user.

You'll also need __force annotations to that sparse doesn't complain
inside the function.  Btw, it might be worth to just use the helpers
from asm-generic/uaccess.h as they should work for m68knommu.

I would much prefer to use the helpers in asm-generic/uaccess.h.
But that is going to involve a little more change, the put_user()
and get_user() macros can't be over-ridden with the logic as defined
in asm-generic/uaccess.h today.

It might just be the case that we can use the whole lot and not
lose optimized get_user()/set_user() anyway. I will check the
resulting code and see if it is just as good.

Regards
Greg




[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux