Re: how to detect a 32 bit process on 64 bit kernel

Jan Engelhardt
2004-12-13T21:03:12Z

>> > If no - would not it make a sence to add e.g. a flag in the
>> > task struct, to make it possible?
>>
>> The kernel code shouldn't know. If your driver needs this information
>> something is seriously wrong with it.
>
>A character driver I am working on gets passed a structure
>from user space by implementing a write file operation.
>The structure includes a pointer and so the format varies
>between a 32 and 64 bit processes.

Do it like Glibc does. Use uint32_t and uint64_t when transferring things
to/from kernelspace.

Jan Engelhardt
--
ENOSPC