size-differences of long(userspace) / long(kernel)

2005-02-18 Thread Jurzitza, Dieter
Dear listmembers, one more came to my head, when doing either kmalloc() or compat_alloc_user_space in arch/sparc64/kernel/sys_sparc32.c, another error stems from the fact that in len * sizeof (struct kernel_syms) the sizeof operator returns 64 Byte (60 char + one long(=4)) whereas in the 64 Bit

RE: size-differences of long(userspace) / long(kernel)

2005-02-18 Thread Jurzitza, Dieter
, 2005 5:44 PM To: Jurzitza, Dieter Cc: sparclinux@vger.kernel.org Subject: Re: size-differences of long(userspace) / long(kernel) ** We don't use kmalloc() always, in fact most often we use alloc_user_space() (named compat_alloc_user_space()) so that the limits are the

Re: size-differences of long(userspace) / long(kernel)

2005-02-14 Thread Ben Collins
32-bit applications communicating with the kernel using standard calls like ioctl() pass through a translation layer that converts the 32-bit information into 64-bit counterparts, processes them, and converts them back again before passing them back to userspace. This is pretty common in sparc64,

Re: size-differences of long(userspace) / long(kernel)

2005-02-14 Thread David S. Miller
On Mon, 14 Feb 2005 17:32:07 +0100 "Jurzitza, Dieter" <[EMAIL PROTECTED]> wrote: > nevertheless we may run into space issues because structures may grow on > their way from userland to kernel-country, thereby kmalloc() calls are > subject to earlier failures, as the maximum size of allocable mem

RE: size-differences of long(userspace) / long(kernel)

2005-02-14 Thread Jurzitza, Dieter
: size-differences of long(userspace) / long(kernel) See arch/sparc64/kernel/ioctl32.c, we translate all of the structures on the way in and out of userspace when 64-bit kernel runs 32-bit applications. - To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of

Re: size-differences of long(userspace) / long(kernel)

2005-02-14 Thread Michael Tautschnig
See arch/sparc64/kernel/ioctl32.c, we translate all of the structures on the way in and out of userspace when 64-bit kernel runs 32-bit applications. Hmm - I don't really get the point - would you mind explaining a little? Is it the following lines or did I overlook anything: #define COMPATIBLE_IOC

Re: size-differences of long(userspace) / long(kernel)

2005-02-14 Thread David S. Miller
See arch/sparc64/kernel/ioctl32.c, we translate all of the structures on the way in and out of userspace when 64-bit kernel runs 32-bit applications. - To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to [EMAIL PROTECTED] More majordomo info at http:/

size-differences of long(userspace) / long(kernel)

2005-02-14 Thread Michael Tautschnig
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 caus