From 7e4f12743f41c560e32ee4886d1cb8849c83475f Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 17 Aug 2023 18:44:06 +0300 Subject: [PATCH] [NTOS:PS/x64] Use KiGetTrapContext from PspGetOrSetContextKernelRoutine --- ntoskrnl/ps/amd64/psctx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ntoskrnl/ps/amd64/psctx.c b/ntoskrnl/ps/amd64/psctx.c index c58ca65c3b7..7c45bb9ec7b 100644 --- a/ntoskrnl/ps/amd64/psctx.c +++ b/ntoskrnl/ps/amd64/psctx.c @@ -58,10 +58,8 @@ PspGetOrSetContextKernelRoutine( } else { - /* Convert the trap frame to a context */ - KeTrapFrameToContext(TrapFrame, - NULL, - &GetSetContext->Context); + /* Get the nonvolatiles from the stack */ + KiGetTrapContext(TrapFrame, &GetSetContext->Context); } /* Notify the Native API that we are done */