Handle the trap flags as the result of interception of the return of the system-call.
288{
289 RFLAGS Rflags = {0};
296
297
298
299
301
302 if (!Rflags.TrapFlag)
303 {
304
305
306
308 }
309
310
311
312
315
316
317
318
320
321
322
323
326 &Index,
328
329
330
331
332
333 if (Result)
334 {
335
336
337
339
340
341
342
344
345
346
347
349
350
351
352
355 Index);
356
357
358
359
360 ResultToReturn =
TRUE;
361
362 goto ReturnResult;
363 }
364 else
365 {
366
367
368
369 ResultToReturn =
FALSE;
370
371 goto ReturnResult;
372 }
373
374ReturnResult:
375
376
377
378
380
381
382
383
384
385
386 if (ResultToReturn)
387 {
389 }
390
391 return ResultToReturn;
392}
BOOLEAN BinarySearchPerformSearchItem(UINT64 ArrayPtr[], UINT32 NumberOfItems, UINT32 *ResultIndex, UINT64 Key)
A utility function to perform the binary search.
Definition BinarySearch.c:46
UINT64 HvGetRflags()
Read guest's RFLAGS.
Definition Hv.c:1197
VOID HvSetRflagTrapFlag(BOOLEAN Set)
Set the rflag's trap flag.
Definition Hv.c:377
BOOLEAN InsertionSortDeleteItem(UINT64 ArrayPtr[], UINT32 *NumberOfItems, UINT32 Index)
Function to implement insertion sort.
Definition InsertionSort.c:69
VOID SpinlockLock(volatile LONG *Lock)
Tries to get the lock and won't return until successfully get the lock.
Definition Spinlock.c:53
VOID SpinlockUnlock(volatile LONG *Lock)
Release the lock.
Definition Spinlock.c:162
volatile LONG SyscallCallbackModeTrapListLock
The lock for modifying list of process/thread for syscall callback trap flags.
Definition SyscallCallback.h:24
struct _SYSCALL_CALLBACK_PROCESS_THREAD_INFORMATION SYSCALL_CALLBACK_PROCESS_THREAD_INFORMATION
The thread/process information.
IMPORT_EXPORT_HYPEREVADE VOID TransparentCallbackHandleAfterSyscall(GUEST_REGS *Regs, UINT32 ProcessId, UINT32 ThreadId, UINT64 Context, SYSCALL_CALLBACK_CONTEXT_PARAMS *Params)
Callback function to handle returns from the syscall.
Definition SyscallFootprints.c:1768
UINT32 ProcessId
Definition SyscallCallback.h:53
struct _SYSCALL_CALLBACK_PROCESS_THREAD_INFORMATION::@244024325212031003046334246141250140302062174051::@007354050331305204056110162336245215053072211114 Fields
UINT64 asUInt
Definition SyscallCallback.h:49
UINT32 ThreadId
Definition SyscallCallback.h:54
GUEST_REGS * Regs
Definition State.h:326