mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: peterius@durandal.simons-rock.edu
Cc: linux-kernel@vger.kernel.org
Subject: Re: memory and current macro
Date: Thu, 3 May 2001 10:21:39 +0100 (BST)	[thread overview]
Message-ID: <E14vFIr-0005EC-00@the-village.bc.nu> (raw)
In-Reply-To: <p04320402b7166eda68f2@[64.210.111.70]> from "peterius@mail.simons-rock.edu" at May 02, 2001 10:20:33 PM

> 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


      reply	other threads:[~2001-05-03  9:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-03  2:20 peterius
2001-05-03  9:21 ` Alan Cox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E14vFIr-0005EC-00@the-village.bc.nu \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterius@durandal.simons-rock.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®