mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ying Chu" <xjtuychu@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: sysenter cause a segmentation fault.
Date: Sun, 18 Mar 2007 16:08:43 +0800	[thread overview]
Message-ID: <b965e8580703180108t6bc50b0eg895c5464463ab09@mail.gmail.com> (raw)

A simple code running on PIII 800,kernel 2.6.20 with SEP enabled
causes  a  segmentation fault.
The slice is as following.

#include <stdio.h>
#include <sys/syacall.h>

int main()
{
    unsigned long ret=0;
    __asm__ __volatile__ ("movl %1,%%eax\n\tpushl %%ecx\n\t"
     "pushl %%edx\n\tpush %%ebp\n\t"
     "movl %%esp,%%ebp\n\t"     "sysenter\n\t"
     "movl %%eax,%0"
     :"=m"(ret)
     :"b"(SYS_getuid));
   printf("%d\n",ret);
   return 0;
}

More, when i enabled Kdb and set "bp sysenter_entry",it went with a
catastrophic error errupted.

             reply	other threads:[~2007-03-18  8:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-18  8:08 Ying Chu [this message]
2007-03-18 15:51 ` Andi Kleen

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=b965e8580703180108t6bc50b0eg895c5464463ab09@mail.gmail.com \
    --to=xjtuychu@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

all inboxes | Powered by JetHome®