From: Greg Ungerer <gerg@linux-m68k.org>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-m68k@vger.kernel.org, geert@linux-m68k.org,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] m68knommu: add missing __user annotations
Date: Wed, 9 Sep 2020 09:26:01 +1000 [thread overview]
Message-ID: <cd61e5c7-dfb9-1994-2bbc-5bfbb1be26f5@linux-m68k.org> (raw)
In-Reply-To: <20200908133017.GA4042@lst.de>
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
prev parent reply other threads:[~2020-09-08 23:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-08 13:26 [PATCH] m68knommu: add missing __user annotations Greg Ungerer
2020-09-08 13:30 ` Christoph Hellwig
2020-09-08 23:26 ` Greg Ungerer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cd61e5c7-dfb9-1994-2bbc-5bfbb1be26f5@linux-m68k.org \
--to=gerg@linux-m68k.org \
--cc=geert@linux-m68k.org \
--cc=hch@lst.de \
--cc=linux-m68k@vger.kernel.org \
--cc=lkp@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox