Hello!
Is there any generic way in situations, where (pointers to) structs are transferred from user- to kernelspace and vice versa? Any struct containing a long int or a pointer will have a different size in kernel space! This usually happens when doing ioctls ...
I'm not sure, whether it causes any troubles, but, e.g., ifreq contains another struct (ifmap) that in turn contains long ints . Thus the size of ifreq is 32 byte in userspace and 40 byte in kernelspace. If an application reserves sizeof(ifreq) bytes, then lets the kernel initialize the struct, which in turn copies it back to userspace - and thus might overwrite 8bytes that were not reserved for that struct ... Oops :-)
Any thoughts?
Michael
- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
