From: Raja R Harinath <harinath@cs.umn.edu>
To: linux-kernel@vger.kernel.org
Subject: Re: [CHECKER][PATCH] cmpci user-pointer fix
Date: Wed, 28 May 2003 18:06:32 -0500 [thread overview]
Message-ID: <d98ysqk6x3.fsf@cs.umn.edu> (raw)
In-Reply-To: 5C5CFB74-9149-11D7-8297-000A95A0560C@us.ibm.com
Hi,
Hollis Blanchard <hollisb@us.ibm.com> writes:
[snip]
> I believe the attached patch fixes it. cm_write was calling access_ok,
> but after that you must still access user space through the
> get/put/copy*_user functions. It should be safe to return -EFAULT at
> these points in cm_write, since there are other returns already in the
> code above and below that. Compile-tested only.
[snip]
> --- linux-2.5.70/sound/oss/cmpci.c.orig Sat May 24 19:00:00 2003
> +++ linux-2.5.70/sound/oss/cmpci.c Wed May 28 14:53:15 2003
> @@ -580,15 +580,17 @@
> spin_unlock_irqrestore(&s->lock, flags);
> }
>
> -static void trans_ac3(struct cm_state *s, void *dest, const char *source, int size)
> +static int trans_ac3(struct cm_state *s, void *dest, const char *source, int size)
Shouldn't 'source' get the new __user annotation, then:
const char * __user source
IIRC.
> {
> int i = size / 2;
> + int err;
> unsigned long data;
> unsigned long *dst = (unsigned long *) dest;
> unsigned short *src = (unsigned short *)source;
Likewise with 'src'.
- Hari
--
Raja R Harinath ------------------------------ harinath@cs.umn.edu
prev parent reply other threads:[~2003-05-28 22:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-28 20:17 [CHECKER][PATCH] cmpci user-pointer fix Hollis Blanchard
2003-05-28 20:31 ` Junfeng Yang
2003-05-28 23:06 ` Raja R Harinath [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=d98ysqk6x3.fsf@cs.umn.edu \
--to=harinath@cs.umn.edu \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox