mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: current as segment register was Re: Using %cr2 to reference "current"
Date: Wed, 07 Nov 2001 14:42:16 +1100	[thread overview]
Message-ID: <26808.1005104536@kao2.melbourne.sgi.com> (raw)
In-Reply-To: Your message of "06 Nov 2001 20:02:09 BST." <p73lmhjyb7y.fsf_-_@amdsim2.suse.de>

On 06 Nov 2001 20:02:09 +0100, 
Andi Kleen <ak@suse.de> wrote:
>One nasty thing is that lea doesn't work on segment registers. It needs
>an quite ugly inline assembly mess similar to get/put_user to implement
>read/write/add_pda functions for the fundamental types. To implement
>that properly without hardcoded offsets it is also needed to have an
>offset.c like many other ports that puts structure offsets at compile
>time into an include file.

Already done in kbuild 2.5, it creates arch/i386/asm-offsets.h.
Currently containing this list, which can easily be expanded.

#ifndef __ASM_OFFSETS_H__
#define __ASM_OFFSETS_H__
/*
 * DO NOT MODIFY
 *
 * This file was generated by arch/i386/Makefile.in.
 *
 */

state                =   0                      /* 0x0     offsetof(struct task_struct, state) */
flags                =   4                      /* 0x4     offsetof(struct task_struct, flags) */
sigpending           =   8                      /* 0x8     offsetof(struct task_struct, sigpending) */
addr_limit           =  12                      /* 0xc     offsetof(struct task_struct, addr_limit) */
exec_domain          =  16                      /* 0x10    offsetof(struct task_struct, exec_domain) */
need_resched         =  20                      /* 0x14    offsetof(struct task_struct, need_resched) */
tsk_ptrace           =  24                      /* 0x18    offsetof(struct task_struct, ptrace) */
processor            =  52                      /* 0x34    offsetof(struct task_struct, processor) */

ENOSYS               =  38                      /* 0x26    ENOSYS */

#endif


      reply	other threads:[~2001-11-07  3:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E161AkQ-0001Fp-00@the-village.bc.nu.suse.lists.linux.kernel>
     [not found] ` <Pine.LNX.4.33.0111061006150.2222-100000@penguin.transmeta.com.suse.lists.linux.kernel>
2001-11-06 19:02   ` Andi Kleen
2001-11-07  3:42     ` Keith Owens [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=26808.1005104536@kao2.melbourne.sgi.com \
    --to=kaos@ocs.com.au \
    --cc=ak@suse.de \
    --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

all inboxes | Powered by JetHome®