From: daw@mozart.cs.berkeley.edu (David Wagner)
To: linux-kernel@vger.kernel.org
Subject: Re: [RFC][2.5] generic_usercopy() function (resend, forgot the patches)
Date: 30 May 2003 00:25:54 GMT [thread overview]
Message-ID: <bb68ei$gk7$1@abraham.cs.berkeley.edu> (raw)
In-Reply-To: 3ECDEBC5.5030608@convergence.de
Michael Hunold wrote:
> /*
>- * helper function -- handles userspace copying for ioctl arguments
>- */
>-int
>-video_usercopy(struct inode *inode, struct file *file,
>- unsigned int cmd, unsigned long arg,
>- int (*func)(struct inode *inode, struct file *file,
>- unsigned int cmd, void *arg))
>-{
...
>- if (copy_from_user(parg, (void *)arg, _IOC_SIZE(cmd)))
...
>- err = func(inode, file, cmd, parg);
...
What about doubly-indirected pointers? i.e., arg is a pointer
to a structure that itself contains a pointer? Can this happen?
prev parent reply other threads:[~2003-05-30 0:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-23 9:37 [RFC][2.5] generic_usercopy() function (resend, forgot the patches) Michael Hunold
2003-05-23 9:47 ` Christoph Hellwig
2003-05-23 10:10 ` Michael Hunold
2003-05-23 10:19 ` Christoph Hellwig
2003-05-23 11:49 ` Gerd Knorr
2003-05-25 11:23 ` David Woodhouse
2003-05-23 11:17 ` Ingo Oeser
2003-05-30 0:25 ` David Wagner [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='bb68ei$gk7$1@abraham.cs.berkeley.edu' \
--to=daw@mozart.cs.berkeley.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