mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Roland McGrath <roland@redhat.com>
Cc: Andi Kleen <ak@suse.de>, Andrew Morton <akpm@osdl.org>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86_64: handle iret faults better
Date: Mon, 25 Apr 2005 21:06:28 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0504252102180.18901@ppc970.osdl.org> (raw)
In-Reply-To: <200504260157.j3Q1vV6M011223@magilla.sf.frob.com>



On Mon, 25 Apr 2005, Roland McGrath wrote:
>
> What would you think about a general hack to let given fixup table entries
> say the code wants the trap and error info made available (pushed on the
> stack or whatever)?

Yes, that sounds fine, if there is just some sane way to indicate that 
(normally the fixup eip is close to the faulting eip, so there should be 
tons of bits available, but it would need to be something clean? For iret, 
I guess we could just set fixup-eip to zero, which would mean "return to 
eip+1 and set error", but that sounds pretty hacky too)

> Conversely, would there be any harm in always setting
> ->thread.error_code and ->thread.trap_no for a kernel trap?  

Page-ins etc in kernel mode are normal, and they shouldn't set the thread 
state. So I think the "turn it into a trap" thing is nicer.

		Linus

  reply	other threads:[~2005-04-26  4:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-24  0:50 Roland McGrath
2005-04-25 15:33 ` Andi Kleen
2005-04-25 15:55   ` Linus Torvalds
2005-04-25 22:31     ` Roland McGrath
2005-04-25 22:51       ` Linus Torvalds
2005-04-26  1:57         ` Roland McGrath
2005-04-26  4:06           ` Linus Torvalds [this message]
2005-04-29  3:40             ` [PATCH] i386: " Roland McGrath
2005-04-29 15:01               ` Andi Kleen
2005-04-29 16:44               ` Linus Torvalds
2005-05-02 19:56                 ` Andi Kleen
2005-04-29  3:45             ` [PATCH] x86_64: " Roland McGrath
2005-04-29 15:02               ` 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=Pine.LNX.4.58.0504252102180.18901@ppc970.osdl.org \
    --to=torvalds@osdl.org \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@redhat.com \
    /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®