[RE: [Q] MEMGETREGIONxxx ioctls]
Eric
ebrower at usa.net
Fri Apr 20 17:11:59 EDT 2001
Can we add the following patch as well? It seems we are
directly dereferencing userspace w/o calling get_from_user().
I should have caught this with the original post.
Thanks!
E
Kári Davíðsson <kd at flaga.is> wrote:
Hi,
Corrected these errors and commited.
Thanks,
K.D.
-----Original Message-----
From: Eric
Sent: Thu 4/12/2001 7:27 PM
To: mtd at infradead.org
Cc:
Subject: [Q] MEMGETREGIONxxx ioctls
Here are a few questions related to the MEMGETREGIONxxx ioctls.
I'd simply submit a patch, but I am not sure about the reasoning
and I'm not near a build system for verification:
1) Why is MEMGETREGIONCOUNT declared with _IOW
instead of _IOR in mtd.h? It seems to be a
read from kernelspace, rather than a write to
kernelspace in mtdchar.c.
2) Why is MEMGETREGIONINFO declared likewise with _IOW
instead of _IOWR? The ioctl in mtdchar.c reads the
regionindex member and then populates the rest of the
struct accordingly.
3) Do we need the declaration of
"struct mtd_erase_region_info *kr"
inside the MEMGETREGIONINFO ioctl handler? It is
initialized but never used, so I doubt it is necessary.
Thanks,
E
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org
> ---------------------------------------------
> Attachment: winmail.dat
> MIME Type: application/ms-tnef
> ---------------------------------------------
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mtdchar.patch
Type: application/octet-stream
Size: 723 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20010420/4c8ff5a0/attachment.obj
More information about the linux-mtd
mailing list