SMSS里面的 MiniNT Boot

smss!SmpInit

kd> g

SMSS: !!! MiniNT Boot !!!

GDI: VerifierInitialization: failed to get info from ntoskrnl

E:\srv03rtm>grep "!!! MiniNT Boot !!!" -nr E:\srv03rtm\base\subsys |grep -v "inary"

E:\srv03rtm\base\subsys/sm/server/sminit.c:893: DbgPrint("SMSS: !!! MiniNT Boot !!!\n");

NTSTATUS

SmpLoadDataFromRegistry(

OUT PUNICODE_STRING InitialCommand

)

{

RtlInitUnicodeString( &KeyName, L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\MiniNT" );

InitializeObjectAttributes( &ObjectAttributes,

&KeyName,

OBJ_CASE_INSENSITIVE,

NULL,

NULL

);

Status = NtOpenKey( &Key, KEY_ALL_ACCESS, &ObjectAttributes );

if (NT_SUCCESS( Status )) {

NtClose( Key );

MiniNTBoot = TRUE;

}

if (MiniNTBoot) {

DbgPrint("SMSS: !!! MiniNT Boot !!!\n");

}

NTSTATUS

SmpInit(

OUT PUNICODE_STRING InitialCommand,

OUT PHANDLE WindowsSubSystem

)

{

//

// Configure the system

//

Status = SmpLoadDataFromRegistry( InitialCommand );

if (NT_SUCCESS( Status )) {

*WindowsSubSystem = SmpWindowsSubSysProcess;

}

void

__cdecl main(

int argc,

char *argv[],

char *envp[],

ULONG DebugParameter OPTIONAL

)

{

Status = SmpInit( &InitialCommand, &ProcessHandles[ 0 ] );

if (NT_SUCCESS( Status )) {

Status = SmpExecuteInitialCommand( 0L, &InitialCommand, &ProcessHandles[ 1 ], NULL );

}

kd> x smss!SmpWindowsSubSysProcess

4858f380 smss!SmpWindowsSubSysProcess = 0x0000022c

kd> !handle 22c

PROCESS 829d9d88 SessionId: none Cid: 0090 Peb: 7ffdf000 ParentCid: 0004

DirBase: 01450000 ObjectTable: e1052b60 HandleCount: 11.

Image: SMSS.EXE

Handle table at e1052b60 with 11 entries in use

022c: Object: 82ac26f0 GrantedAccess: 001f0fff Entry: e1234458

Object: 82ac26f0 Type: (82df8ac0) Process

ObjectHeader: 82ac26d8 (old version)

HandleCount: 1 PointerCount: 7

kd> !process 0 0

**** NT ACTIVE PROCESS DUMP ****

PROCESS 82df7020 SessionId: none Cid: 0004 Peb: 00000000 ParentCid: 0000

DirBase: 03a80000 ObjectTable: e1003b78 HandleCount: 148.

Image: System

PROCESS 829d9d88 SessionId: none Cid: 0090 Peb: 7ffdf000 ParentCid: 0004

DirBase: 01450000 ObjectTable: e1052b60 HandleCount: 11.

Image: SMSS.EXE

PROCESS 82ac26f0 SessionId: 0 Cid: 00b8 Peb: 7ffdf000 ParentCid: 0090

DirBase: 012b5000 ObjectTable: e1068740 HandleCount: 24.

Image: CSRSS.EXE