当前位置: 首页 > news >正文

nt!KiInsertQueueApc函数中的KiRequestApcInterrupt到hal!HalRequestSoftwareInterrupt

nt!KiInsertQueueApc函数中的KiRequestApcInterrupt到hal!HalRequestSoftwareInterrupt

第一部分:

VOID
FASTCALL
KiInsertQueueApc (
IN PKAPC InApc,
IN KPRIORITY Increment
)
{

if (ApcMode == KernelMode) {

//
// Thread transitions from the standby state to the running
// state can occur from the idle thread without holding the
// dispatcher lock. Reading the thread state after setting
// the kernel APC pending flag prevents the code from not
// delivering the APC interrupt in this case.
//

ASSERT((Thread != KeGetCurrentThread()) || (Thread->State == Running));

KeMemoryBarrier();
Thread->ApcState.KernelApcPending = TRUE;
KeMemoryBarrier();
ThreadState = Thread->State;
if (ThreadState == Running) {
KiRequestApcInterrupt(Thread->NextProcessor);

} else if ((ThreadState == Waiting) &&
(Thread->WaitIrql == 0) &&
(Thread->SpecialApcDisable == 0) &&
((Apc->NormalRoutine == NULL) ||
((Thread->KernelApcDisable == 0) &&
(Thread->ApcState.KernelApcInProgress == FALSE)))) {

KiUnwaitThread(Thread, STATUS_KERNEL_APC, Increment);
}


第二部分:


#if defined(NT_UP)

#define KiRequestApcInterrupt(Processor) KiRequestSoftwareInterrupt(APC_LEVEL)

#else

#define KiRequestApcInterrupt(Processor) \
if (KeGetCurrentProcessorNumber() == Processor) { \
KiRequestSoftwareInterrupt(APC_LEVEL); \
} else { \
KiIpiSend(AFFINITY_MASK(Processor), IPI_APC); \
}

#endif


第三部分:

1: kd> kc
#
00 hal!HalRequestSoftwareInterrupt
01 nt!KiInsertQueueApc
02 nt!KeInsertQueueApc
03 nt!IopCompleteRequest
04 nt!IopSynchronousServiceTail
05 nt!NtReadFile
06 nt!_KiSystemService
07 nt!ZwReadFile
08 win32k!StartDeviceRead
09 win32k!InputApc
0a nt!KiDeliverApc
0b nt!KiSwapThread
0c nt!KeWaitForMultipleObjects
0d win32k!xxxMsgWaitForMultipleObjects
0e win32k!xxxDesktopThread
0f win32k!xxxCreateSystemThreads
10 win32k!NtUserCallOneParam
11 nt!_KiSystemService
12 SharedUserData!SystemCallStub
13 winsrv!NtUserCallOneParam
1: kd> kv
# ChildEBP RetAddr Args to Child
00 f75f6698 80a3cbd6 8957da28 8989e048 00000000 hal!HalRequestSoftwareInterrupt (FPO: [0,0,0]) [d:\srv03rtm\base\hals\halmps\i386\mpswint.asm @ 84]
01 f75f66b8 80a3758e 8989e048 8989e008 00000000 nt!KiInsertQueueApc+0x13e (FPO: [Non-Fpo]) (CONV: fastcall) [d:\srv03rtm\base\ntos\ke\apcsup.c @ 578]
02 f75f66d4 80a2c076 8989e048 e163d238 00000000 nt!KeInsertQueueApc+0x80 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\ke\apcobj.c @ 302]
03 f75f6730 80c70c45 8989e048 f75f6778 f75f6770 nt!IopCompleteRequest+0x368 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\iomgr\internal.c @ 1476]
04 f75f675c 80c6c1a2 894156b0 00000000 8957da28 nt!IopSynchronousServiceTail+0x1b1 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\iomgr\internal.c @ 7409]
05 f75f67f4 80afbcb2 00000224 00000000 bf8e7891 nt!NtReadFile+0x6be (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\iomgr\read.c @ 734]
06 f75f67f4 80a3ddd5 00000224 00000000 bf8e7891 nt!_KiSystemService+0x13f (FPO: [0,3] TrapFrame @ f75f682c) (CONV: cdecl) [d:\srv03rtm\base\ntos\ke\i386\trap.asm @ 1328]
07 f75f689c bf8fc2db 00000224 00000000 bf8e7891 nt!ZwReadFile+0x11 (FPO: [9,0,0]) [d:\srv03rtm\base\ntos\ke\mp\obj\i386\sysstubs.asm @ 1651]
08 f75f68d8 bf8e796d 000000f0 89804020 8989e048 win32k!StartDeviceRead+0x270 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\windows\core\ntuser\kernel\pnp.c @ 1827]
09 f75f68f0 80a3c8d4 e163d210 e163d238 00000000 win32k!InputApc+0xdc (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\windows\core\ntuser\kernel\ntinput.c @ 2084]
0a f75f6938 80a44106 00000000 00000000 00000000 nt!KiDeliverApc+0x15e (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\ke\apcsup.c @ 337]
0b f75f697c 80a358c7 00000000 e1639460 00000002 nt!KiSwapThread+0x642 (FPO: [Non-Fpo]) (CONV: fastcall) [d:\srv03rtm\base\ntos\ke\thredsup.c @ 2004]
0c f75f69b4 bf8a4685 00000003 89804b50 00000001 nt!KeWaitForMultipleObjects+0x3b5 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\ke\wait.c @ 816]
0d f75f6a04 bf8b123e 00000002 89804b50 bf8fe215 win32k!xxxMsgWaitForMultipleObjects+0xeb (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\windows\core\ntuser\kernel\queue.c @ 4540]
0e f75f6d1c bf8b21ba bfa70aa0 00000001 f75f6d48 win32k!xxxDesktopThread+0x437 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\windows\core\ntuser\kernel\desktop.c @ 594]
0f f75f6d2c bf806d52 bfa70aa0 f75f6d58 008cfff4 win32k!xxxCreateSystemThreads+0x9c (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\windows\core\ntuser\kernel\desktop.c @ 347]
10 f75f6d48 80afbcb2 00000000 00000022 80afb956 win32k!NtUserCallOneParam+0xa0 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\windows\core\ntuser\kernel\ntstubs.c @ 4789]
11 f75f6d48 7ffe0304 00000000 00000022 80afb956 nt!_KiSystemService+0x13f (FPO: [0,3] TrapFrame @ f75f6d64) (CONV: cdecl) [d:\srv03rtm\base\ntos\ke\i386\trap.asm @ 1328]
12 008cffe0 75340774 75318a89 00000000 00000022 SharedUserData!SystemCallStub+0x4 (FPO: [0,0,0])
13 008cffe8 00000000 00000022 00000004 00000000 winsrv!NtUserCallOneParam+0xc (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\windows\core\umode\daytona\obj\i386\usrstubs.c @ 2683]

第四部分:

1: kd> g
Breakpoint 50 hit
eax=00000000 ebx=00000000 ecx=00000000 edx=00000000 esi=8989e008 edi=00000103
eip=804ee7d8 esp=f75f673c ebp=f75f675c iopl=0 nv up di pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000046
hal!HalpApcInterrupt:
804ee7d8 54 push esp
1: kd> kc
#
00 hal!HalpApcInterrupt
WARNING: Frame IP not in any known module. Following frames may be wrong.
01 0x0
02 0x0

http://www.cnnetsun.cn/news/168654.html

相关文章:

  • 智慧城市之城市环境智能监管 非法倾倒行为自动识别 环保执法证据采 垃圾倾倒倾倒物品类型识别数据据 垃圾堆识别数据集 公路垃圾识别10315期
  • Chromium143原生支持HLS
  • 玩轮胎仿真不上手?老司机带你飙车。今天咱们用ABAQUS搞点硬核操作,从过盈充气到滚动传涵,手把手教你怎么让虚拟轮胎活起来
  • 当风电遇上“太极推手“:混合储能如何化解功率波动
  • MIPI DSI DPHY FPGA工程源码:Artix7-100t彩条驱动1024*600像...
  • 最近在折腾四旋翼导航时踩了不少坑,发现真正让无人机听话飞行的核心都在代码细节里。今天就拿手头正在调试的飞控项目举例,聊聊怎么用代码让四旋翼实现基础导航
  • 永磁同步电机全速域无传感器控制探索
  • Linly-Talker生成视频的镜头拉近推远动态效果实现
  • SpringBoot+Vue +线上教育培训办公系统管理平台源码【适合毕设/课设/学习】Java+MySQL
  • 36、Windows Server 2008 网络中的打印与网络策略服务介绍
  • 44、深入解析Windows Server 2008的安全保障与管理监控
  • 【python | pytorch | scipy】scipy scikit-learn库相互依赖?
  • 【python| pytorch】卸载py库,手动法
  • 30、活动目录安全审计策略的实施与管理
  • Linly-Talker能否接入Unity引擎实现游戏内NPC对话?
  • Linly-Talker在智能家居控制中的视觉反馈机制
  • Linly-Talker能否实现AR眼镜端实时渲染?近眼显示优化
  • 力扣hot100:旋转排序数组中找目标值
  • Linly-Talker能否导出音频单独使用?资源复用建议
  • Linly-Talker如何保证用户上传肖像的安全性?
  • Linly-Talker如何处理专业术语发音准确性问题?
  • Linly-Talker如何平衡生成速度与画质清晰度?
  • 基于springboot+vue3的企业人事管理系统设计与实现
  • Linly-Talker支持实时摄像头推流吗?直播推流配置指南
  • Java之网络编程,新书小白入门教学,收藏这篇就够了
  • Linly-Talker能否识别方言输入?ASR模块能力测试
  • Linly-Talker在短视频平台的内容生产提效实证
  • +高校线上心理咨询室设计与实现pf信息管理系统源码-SpringBoot后端+Vue前端+MySQL【可直接运行】
  • SpringBoot+Vue +疫情物资捐赠和分配系统平台完整项目源码+SQL脚本+接口文档【Java Web毕设】
  • 企业级+高校线上心理咨询室设计与实现pf管理系统源码|SpringBoot+Vue+MyBatis架构+MySQL数据库【完整版】