[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160320191156.GA4691@pd.tnic>
Date: Sun, 20 Mar 2016 20:11:56 +0100
From: Borislav Petkov <bp@...en8.de>
To: David Kaplan <davkaplan@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: RtlCaptureContext equivalent
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.
Powered by blists - more mailing lists