From: Borislav Petkov <bp@alien8.de>
To: David Kaplan <davkaplan@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: RtlCaptureContext equivalent
Date: Sun, 20 Mar 2016 20:11:56 +0100 [thread overview]
Message-ID: <20160320191156.GA4691@pd.tnic> (raw)
In-Reply-To: <CA+zw6anNDjQG7vbfii9HPeEAwSjNE7691fa_6AKVesCGJCZMyw@mail.gmail.com>
On Sun, Mar 20, 2016 at 03:54:58PM +0200, David Kaplan wrote:
> Hi all
>
> i'm looking for a function within the kernel (for x86_64/amd64) that I
> can use from my module to save/load cpu context (something like
> Windows' RtlCaptureContext fcn).
>
> I assume there's something like that available but having a hard time
> tracking it down.
Something like arch/x86/power/cpu.c::save_processor_state() maybe?
I'm assuming you'll want to supply your own struct saved_context
though... And it doesn't save arch regs. There's also __show_regs()
which dumps arch regs and the rest but that is probably not what you
want...
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
prev parent reply other threads:[~2016-03-20 19:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-20 13:54 RtlCaptureContext equivalent David Kaplan
2016-03-20 19:11 ` Borislav Petkov [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=20160320191156.GA4691@pd.tnic \
--to=bp@alien8.de \
--cc=davkaplan@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.