From: Michael Zoran <mzoran@crowfest.net>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: daniels@collabora.com, eric@anholt.net, noralf@tronnes.org,
popcornmix@gmail.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] staging: vc04_services: Fix unportable cast in vchiq_copy_from_user
Date: Mon, 24 Oct 2016 06:56:46 -0700 [thread overview]
Message-ID: <1477317406.8424.1.camel@crowfest.net> (raw)
In-Reply-To: <20161024132341.GA20116@kroah.com>
On Mon, 2016-10-24 at 15:23 +0200, Greg KH wrote:
> On Sun, Oct 23, 2016 at 10:29:18PM -0700, mzoran@crowfest.net wrote:
> > From: Michael Zoran <mzoran@crowfest.net>
> >
> > Signed-off-by: Michael Zoran <mzoran@crowfest.net>
> > ---
> > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
> > | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git
> > a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.
> > c
> > b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.
> > c
> > index 32d12e6..98c6819 100644
> > ---
> > a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.
> > c
> > +++
> > b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.
> > c
> > @@ -219,7 +219,7 @@ remote_event_signal(REMOTE_EVENT_T *event)
> > int
> > vchiq_copy_from_user(void *dst, const void *src, int size)
> > {
> > - if ((uint32_t)src < TASK_SIZE) {
> > + if ((unsigned long)src < TASK_SIZE) {
> > return copy_from_user(dst, src, size);
> > } else {
> > memcpy(dst, src, size);
>
> Ick, that's horrid.
>
> And I can't take patches without a changelog text.
>
> Please fix up the callers to do the right thing, this shouldn't be a
> wrapper function at all, especially given the mess of a cast as Dan
> points out. Just call the correct copy_from_user() call and handle
> the
> correct error return value.
>
> thanks,
>
> greg k-h
OK, this is getting a wee bit outside the scope of checking in arm64
fixes. I was simply invited to submit my arm64 specific changes to the
stagging tree.
I'm starting to wonder if perhaps the "proper" maintainers should take
over this issue at this point. Perhaps some of the people that were
involved in checking this into the upstream tree to begin with.
I'm new to the whole kernel source code and we are getting into
architecture issues.
next prev parent reply other threads:[~2016-10-24 14:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 5:29 [PATCH 1/2] staging: vc04_services: Fix unportable cast in vchiq_copy_from_user mzoran
2016-10-24 10:54 ` Dan Carpenter
2016-10-24 11:09 ` Michael Zoran
2016-10-24 11:36 ` Dan Carpenter
2016-10-24 11:39 ` Michael Zoran
2016-10-24 11:58 ` Dan Carpenter
2016-10-24 12:12 ` Michael Zoran
2016-10-24 12:30 ` Dan Carpenter
2016-10-24 13:23 ` Greg KH
2016-10-24 13:56 ` Michael Zoran [this message]
2016-10-24 14:46 ` Dan Carpenter
2016-10-24 15:13 ` Michael Zoran
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=1477317406.8424.1.camel@crowfest.net \
--to=mzoran@crowfest.net \
--cc=daniels@collabora.com \
--cc=devel@driverdev.osuosl.org \
--cc=eric@anholt.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=noralf@tronnes.org \
--cc=popcornmix@gmail.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 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.