Re: kernel stack challenge
From: Muli Ben-Yehuda (mulix_at_mulix.org)
Date: 04/04/04
- Previous message: Marcello Barnaba: "2.6.5-aa1: Badness in __remove_from_page_cache at mm/filemap.c:104 && page_remove_rmap at mm/objrmap.c:379"
- In reply to: Sergiy Lozovsky: "Re: kernel stack challenge"
- Next in thread: Helge Hafting: "Re: kernel stack challenge"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 4 Apr 2004 20:38:25 +0200 To: Sergiy Lozovsky <serge_lozovsky@yahoo.com>
On Sun, Apr 04, 2004 at 11:24:38AM -0700, Sergiy Lozovsky wrote:
> I wonder how it is possible to access task struct
> having current stack pointer. %esp points at the
> middle of the stack (when we are in the kernel) when
> interrupt occures.
Look at the curren()t and get_current() macros. Basically, the stack
is page aligned, so with the proper masking of %esp you can get to the
bottom of the stack.
See http://www.kernelnewbies.org/faq/, "how does get_current work?".
Cheers,
Muli
-- Muli Ben-Yehuda http://www.mulix.org | http://mulix.livejournal.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- application/pgp-signature attachment: Digital signature
- Previous message: Marcello Barnaba: "2.6.5-aa1: Badness in __remove_from_page_cache at mm/filemap.c:104 && page_remove_rmap at mm/objrmap.c:379"
- In reply to: Sergiy Lozovsky: "Re: kernel stack challenge"
- Next in thread: Helge Hafting: "Re: kernel stack challenge"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|