* RtlCaptureContext equivalent
@ 2016-03-20 13:54 David Kaplan
2016-03-20 19:11 ` Borislav Petkov
0 siblings, 1 reply; 2+ messages in thread
From: David Kaplan @ 2016-03-20 13:54 UTC (permalink / raw)
To: linux-kernel
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.
Any pointers int he right direction would greatly be apprecaited!
Many thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: RtlCaptureContext equivalent
2016-03-20 13:54 RtlCaptureContext equivalent David Kaplan
@ 2016-03-20 19:11 ` Borislav Petkov
0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2016-03-20 19:11 UTC (permalink / raw)
To: David Kaplan; +Cc: linux-kernel
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-20 19:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-20 13:54 RtlCaptureContext equivalent David Kaplan
2016-03-20 19:11 ` Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox