[RE: [Q] MEMGETREGIONxxx ioctls]

Kári Davíðsson kd at flaga.is
Sat Apr 21 14:01:20 EDT 2001


Hi,

I though that these kind of errors, i.e. referencing
user space directly from the kernel would trigger a
seg fault?

Anyways, It is now fixed.

Thanks,

K.D.

-----Original Message-----
From:	Eric
Sent:	Fri 4/20/2001 9:11 PM
To:	Kári Davíðsson
Cc:	mtd at infradead.org; dwmw2 at infradead.org
Subject:	Re: [RE: [Q] MEMGETREGIONxxx ioctls]

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: not available
Type: application/ms-tnef
Size: 3309 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20010421/37782ec1/attachment.bin 


More information about the linux-mtd mailing list