From: linux@MichaelGeng.de (Michael Geng)
To: Gerd Knorr <kraxel@bytesex.org>
Cc: linux-kernel@vger.kernel.org
Subject: video_usercopy() enforces change of VideoText IOCTLs since 2.6.8
Date: Thu, 7 Oct 2004 18:54:10 +0200 [thread overview]
Message-ID: <20041007165410.GA2306@t-online.de> (raw)
Hello Gerd,
from kernel 2.6.7 to 2.6.8 function video_usercopy() in
videodev.c was modified in a way that IOCTLs which do not
use the _IO macros defined in linux/ioctl.h will get their
driver's ioctl function called with arg = 0.
This means that the videotext drivers (saa5246a and saa5249)
only produce segmentation faults in kernel version >= 2.6.8.
Shall we change the IOCTL definitions in include/linux/videotext.h?
This would mean that existing userspace programs will have to be
recompiled in order to work with the latest kernel version.
Nevertheless I suggest changing these IOCTLs to the new method.
I will work out a patch if you agree.
Below is the change I'm talking about:
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))
{
char sbuf[128];
void *mbuf = NULL;
void *parg = NULL;
int err = -EINVAL;
cmd = video_fix_command(cmd);
/* Copy arguments into temp kernel buffer */
switch (_IOC_DIR(cmd)) {
case _IOC_NONE:
===> 2.6.7:
parg = (void *)arg;
===> 2.6.8:
parg = NULL;
...
/* call driver */
err = func(inode, file, cmd, parg);
Bye,
Michael
next reply other threads:[~2004-10-07 17:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-07 16:54 Michael Geng [this message]
2004-10-08 10:52 ` video_usercopy() enforces change of VideoText IOCTLs since 2.6.8 Gerd Knorr
2004-10-08 21:00 ` Andrew Morton
2004-10-09 9:28 ` Gerd Knorr
2004-10-09 11:28 ` Michael Geng
2004-10-09 12:18 ` Gerd Knorr
2004-10-10 8:55 ` Michael Geng
2004-10-11 15:14 ` Gerd Knorr
2004-10-11 16:21 ` Michael Geng
2004-10-13 11:00 ` Alan Cox
2004-10-13 14:42 ` Michael Geng
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=20041007165410.GA2306@t-online.de \
--to=linux@michaelgeng.de \
--cc=kraxel@bytesex.org \
--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