From: Vincent Hanquez <tab@snarc.org>
To: Fabiano Ramos <fabiano.ramos@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: pid offset into task structre
Date: Fri, 22 Oct 2004 17:19:07 +0200 [thread overview]
Message-ID: <20041022151907.GA6209@snarc.org> (raw)
In-Reply-To: <5afb2c65041021163441c1e1b4@mail.gmail.com>
On Thu, Oct 21, 2004 at 09:34:48PM -0200, Fabiano Ramos wrote:
> Hi All. Some newbie question.
> 1) Considering that I provided the correct value in PID_OFFSET, will
> ebx contain the pid of the task that issued the syscall, at the end of the
> fragment?
yes
> 2) By taking some address arithmetic (&tsk.pid - &tsk) I got 144. Is this
> offset always the same? Is that an easy way to get it directly from
> assembly code?
Generate it from arch/$ARCH/kernel/asm-offset.c with the same mecanism that
TI_task uses.
something like:
OFFSET(TASK_pid, task_struct, pid);
--
Tab
prev parent reply other threads:[~2004-10-22 15:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-21 23:34 pid offset into task structre Fabiano Ramos
2004-10-22 15:19 ` Vincent Hanquez [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=20041022151907.GA6209@snarc.org \
--to=tab@snarc.org \
--cc=fabiano.ramos@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).