Messages in this thread | | | Subject | Re: memory and current macro | Date | Thu, 3 May 2001 10:21:39 +0100 (BST) | From | Alan Cox <> |
| |
> problems. First, the current macro. I wanted to get the uid of the > calling process but "current->uid" does NOT work it returns some > other number. Same with "current->pid" and many others. I figured > these numbers weren't random and decided to print out a particular > processes's descriptor and check out what was going on. I found that > "&(current->uid)" is 0x1d lower than the address that holds the user > id. In addition, adding 0x1d to that address added it twice??? So > to get the uid I ended up adding half...or "&(current->uid) + 0x0f". > Does anyone know why this is? I have an i686 processor, IBM thinkpad
You are compiling with headers that dont match the kernel you are running or with options not matching. You should be using module versioning if possible btw on both the kernel and the module that would catch most such slips
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |