From: Heiko Carstens <hca@linux.ibm.com>
To: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
linux-s390@vger.kernel.org, smatch@vger.kernel.org
Subject: Re: smatch and copy_{to,from}_user return values
Date: Thu, 4 Mar 2021 19:35:36 +0100 [thread overview]
Message-ID: <YEEoeIR7X2kSSYkW@osiris> (raw)
In-Reply-To: <b57b4f40-d67c-d57c-c5b2-077b623ed4ed@prevas.dk>
On Wed, Mar 03, 2021 at 08:50:19AM +0100, Rasmus Villemoes wrote:
> Hi Dan
>
> If you look at vfio_ccw_mdev_ioctl() in drivers/s390/cio/vfio_ccw_ops.c,
> and vfio_ap_mdev_get_device_info() in drivers/s390/crypto/vfio_ap_ops.c,
> there are examples of functions that can both return -Esomething as well
> as may return the return value of a copy_{to,from}_user directly (i.e.,
> in case of error some positive number).
>
> [Those "return copy_to_user();" should probably all be changed to
> "return copy_to_user() ? -EFAULT : 0;" - cc'ing the s390 list in case
> the maintainers want to do that.]
This has been reported just a couple of days ago - fixes will go
upstream soon.
Thanks for reporting anyway!
prev parent reply other threads:[~2021-03-04 18:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-03 7:50 smatch and copy_{to,from}_user return values Rasmus Villemoes
2021-03-03 11:20 ` Dan Carpenter
2021-03-05 10:14 ` Dan Carpenter
2021-03-10 10:01 ` Dan Carpenter
2021-03-04 18:35 ` Heiko Carstens [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=YEEoeIR7X2kSSYkW@osiris \
--to=hca@linux.ibm.com \
--cc=dan.carpenter@oracle.com \
--cc=linux-s390@vger.kernel.org \
--cc=rasmus.villemoes@prevas.dk \
--cc=smatch@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.