File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -2335,6 +2335,35 @@ KdSystemDebugControl(
23352335
23362336 case SysDbgReadPhysical :
23372337 case SysDbgWritePhysical :
2338+ if (InputBufferLength != sizeof (SYSDBG_PHYSICAL ))
2339+ {
2340+ Status = STATUS_INFO_LENGTH_MISMATCH ;
2341+ }
2342+ else
2343+ {
2344+ SYSDBG_PHYSICAL Request = * (PSYSDBG_PHYSICAL )InputBuffer ;
2345+ PVOID LockedBuffer ;
2346+ PMDL LockVariable ;
2347+
2348+ Status = ExLockUserBuffer (Request .Buffer ,
2349+ Request .Request ,
2350+ PreviousMode ,
2351+ Command == SysDbgReadVirtual ? IoWriteAccess : IoReadAccess ,
2352+ & LockedBuffer ,
2353+ & LockVariable );
2354+ if (NT_SUCCESS (Status ))
2355+ {
2356+ Status = KdpCopyMemoryChunks (Request .Address .QuadPart ,
2357+ Request .Buffer ,
2358+ Request .Request ,
2359+ 0 ,
2360+ MMDBG_COPY_PHYSICAL | (Command == SysDbgReadVirtual ? 0 : MMDBG_COPY_WRITE ),
2361+ & Length );
2362+ ExUnlockUserBuffer (LockVariable );
2363+ }
2364+ }
2365+ break ;
2366+
23382367 case SysDbgReadControlSpace :
23392368 case SysDbgWriteControlSpace :
23402369 case SysDbgReadIoSpace :
You can’t perform that action at this time.
0 commit comments