OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file holds definitions related to the ntdll API. | 5 // This file holds definitions related to the ntdll API. |
6 | 6 |
7 #ifndef SANDBOX_WIN_SRC_NT_INTERNALS_H__ | 7 #ifndef SANDBOX_WIN_SRC_NT_INTERNALS_H__ |
8 #define SANDBOX_WIN_SRC_NT_INTERNALS_H__ | 8 #define SANDBOX_WIN_SRC_NT_INTERNALS_H__ |
9 | 9 |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
243 typedef struct _SECTION_BASIC_INFORMATION { | 243 typedef struct _SECTION_BASIC_INFORMATION { |
244 PVOID BaseAddress; | 244 PVOID BaseAddress; |
245 ULONG Attributes; | 245 ULONG Attributes; |
246 LARGE_INTEGER Size; | 246 LARGE_INTEGER Size; |
247 } SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION; | 247 } SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION; |
248 | 248 |
249 typedef NTSTATUS (WINAPI *NtQuerySectionFunction)( | 249 typedef NTSTATUS (WINAPI *NtQuerySectionFunction)( |
250 IN HANDLE SectionHandle, | 250 IN HANDLE SectionHandle, |
251 IN SECTION_INFORMATION_CLASS SectionInformationClass, | 251 IN SECTION_INFORMATION_CLASS SectionInformationClass, |
252 OUT PVOID SectionInformation, | 252 OUT PVOID SectionInformation, |
253 IN SIZE_T SectionInformationLength, | 253 IN SIZE_T SectionInformationLength, |
Nico
2015/02/16 06:58:00
this is ULONG in dynamorio
Will Harris
2015/02/17 03:05:46
sources differ on this - some say ULONG and some s
Reid Kleckner
2015/02/19 01:57:06
Done.
| |
254 OUT PSIZE_T ReturnLength OPTIONAL); | 254 OUT PSIZE_T ReturnLength OPTIONAL); |
Nico
2015/02/16 06:58:00
this is PULONG in dynamorio
Will Harris
2015/02/17 03:05:46
I agree this should be PULONG
Reid Kleckner
2015/02/19 01:57:06
Done.
| |
255 | 255 |
256 // ----------------------------------------------------------------------- | 256 // ----------------------------------------------------------------------- |
257 // Process and Thread | 257 // Process and Thread |
258 | 258 |
259 typedef struct _CLIENT_ID { | 259 typedef struct _CLIENT_ID { |
260 PVOID UniqueProcess; | 260 PVOID UniqueProcess; |
261 PVOID UniqueThread; | 261 PVOID UniqueThread; |
262 } CLIENT_ID, *PCLIENT_ID; | 262 } CLIENT_ID, *PCLIENT_ID; |
263 | 263 |
264 typedef NTSTATUS (WINAPI *NtOpenThreadFunction) ( | 264 typedef NTSTATUS (WINAPI *NtOpenThreadFunction) ( |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
417 | 417 |
418 typedef BOOLEAN (WINAPI *RtlFreeHeapFunction)( | 418 typedef BOOLEAN (WINAPI *RtlFreeHeapFunction)( |
419 IN PVOID HeapHandle, | 419 IN PVOID HeapHandle, |
420 IN ULONG Flags, | 420 IN ULONG Flags, |
421 IN PVOID HeapBase); | 421 IN PVOID HeapBase); |
422 | 422 |
423 typedef NTSTATUS (WINAPI *NtAllocateVirtualMemoryFunction) ( | 423 typedef NTSTATUS (WINAPI *NtAllocateVirtualMemoryFunction) ( |
424 IN HANDLE ProcessHandle, | 424 IN HANDLE ProcessHandle, |
425 IN OUT PVOID *BaseAddress, | 425 IN OUT PVOID *BaseAddress, |
426 IN ULONG_PTR ZeroBits, | 426 IN ULONG_PTR ZeroBits, |
427 IN OUT PSIZE_T RegionSize, | 427 IN OUT PSIZE_T RegionSize, |
Nico
2015/02/16 06:58:00
This is a PULONG in the dynamorio code
Will Harris
2015/02/17 03:05:46
I think this should remain PSIZE_T
Reid Kleckner
2015/02/19 01:57:06
Left as PSIZE_T
| |
428 IN ULONG AllocationType, | 428 IN ULONG AllocationType, |
429 IN ULONG Protect); | 429 IN ULONG Protect); |
430 | 430 |
431 typedef NTSTATUS (WINAPI *NtFreeVirtualMemoryFunction) ( | 431 typedef NTSTATUS (WINAPI *NtFreeVirtualMemoryFunction) ( |
432 IN HANDLE ProcessHandle, | 432 IN HANDLE ProcessHandle, |
433 IN OUT PVOID *BaseAddress, | 433 IN OUT PVOID *BaseAddress, |
434 IN OUT PSIZE_T RegionSize, | 434 IN OUT PSIZE_T RegionSize, |
435 IN ULONG FreeType); | 435 IN ULONG FreeType); |
436 | 436 |
437 typedef enum _MEMORY_INFORMATION_CLASS { | 437 typedef enum _MEMORY_INFORMATION_CLASS { |
438 MemoryBasicInformation = 0, | 438 MemoryBasicInformation = 0, |
439 MemoryWorkingSetList, | 439 MemoryWorkingSetList, |
440 MemorySectionName, | 440 MemorySectionName, |
441 MemoryBasicVlmInformation | 441 MemoryBasicVlmInformation |
442 } MEMORY_INFORMATION_CLASS; | 442 } MEMORY_INFORMATION_CLASS; |
443 | 443 |
444 typedef struct _MEMORY_SECTION_NAME { // Information Class 2 | 444 typedef struct _MEMORY_SECTION_NAME { // Information Class 2 |
445 UNICODE_STRING SectionFileName; | 445 UNICODE_STRING SectionFileName; |
446 } MEMORY_SECTION_NAME, *PMEMORY_SECTION_NAME; | 446 } MEMORY_SECTION_NAME, *PMEMORY_SECTION_NAME; |
447 | 447 |
448 typedef NTSTATUS (WINAPI *NtQueryVirtualMemoryFunction)( | 448 typedef NTSTATUS (WINAPI *NtQueryVirtualMemoryFunction)( |
449 IN HANDLE ProcessHandle, | 449 IN HANDLE ProcessHandle, |
450 IN PVOID BaseAddress, | 450 IN PVOID BaseAddress, |
451 IN MEMORY_INFORMATION_CLASS MemoryInformationClass, | 451 IN MEMORY_INFORMATION_CLASS MemoryInformationClass, |
452 OUT PVOID MemoryInformation, | 452 OUT PVOID MemoryInformation, |
453 IN ULONG MemoryInformationLength, | 453 IN SIZE_T MemoryInformationLength, |
454 OUT PULONG ReturnLength OPTIONAL); | 454 OUT PSIZE_T ReturnLength OPTIONAL); |
rvargas (doing something else)
2015/02/17 20:47:30
We run elf on x64, don't we?. Which means that if
robertshield
2015/02/17 23:54:43
Yep.
Reid Kleckner
2015/02/19 01:57:06
It might not fail at all if there is no useful dat
rvargas (doing something else)
2015/02/19 02:09:55
My point was that looking at the code of GetBackin
| |
455 | 455 |
456 typedef NTSTATUS (WINAPI *NtProtectVirtualMemoryFunction)( | 456 typedef NTSTATUS (WINAPI *NtProtectVirtualMemoryFunction)( |
457 IN HANDLE ProcessHandle, | 457 IN HANDLE ProcessHandle, |
458 IN OUT PVOID* BaseAddress, | 458 IN OUT PVOID* BaseAddress, |
459 IN OUT PSIZE_T ProtectSize, | 459 IN OUT PSIZE_T ProtectSize, |
Nico
2015/02/16 06:58:00
This is a PULONG in dynamorio
Will Harris
2015/02/17 03:05:46
I think this should remain PSIZE_T
Reid Kleckner
2015/02/19 01:57:06
Left as PSIZE_T
| |
460 IN ULONG NewProtect, | 460 IN ULONG NewProtect, |
461 OUT PULONG OldProtect); | 461 OUT PULONG OldProtect); |
462 | 462 |
463 // ----------------------------------------------------------------------- | 463 // ----------------------------------------------------------------------- |
464 // Objects | 464 // Objects |
465 | 465 |
466 typedef enum _OBJECT_INFORMATION_CLASS { | 466 typedef enum _OBJECT_INFORMATION_CLASS { |
467 ObjectBasicInformation, | 467 ObjectBasicInformation, |
468 ObjectNameInformation, | 468 ObjectNameInformation, |
469 ObjectTypeInformation, | 469 ObjectTypeInformation, |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
651 POBJECT_ATTRIBUTES ObjectAttributes); | 651 POBJECT_ATTRIBUTES ObjectAttributes); |
652 | 652 |
653 #define DIRECTORY_QUERY 0x0001 | 653 #define DIRECTORY_QUERY 0x0001 |
654 #define DIRECTORY_TRAVERSE 0x0002 | 654 #define DIRECTORY_TRAVERSE 0x0002 |
655 #define DIRECTORY_CREATE_OBJECT 0x0004 | 655 #define DIRECTORY_CREATE_OBJECT 0x0004 |
656 #define DIRECTORY_CREATE_SUBDIRECTORY 0x0008 | 656 #define DIRECTORY_CREATE_SUBDIRECTORY 0x0008 |
657 #define DIRECTORY_ALL_ACCESS 0x000F | 657 #define DIRECTORY_ALL_ACCESS 0x000F |
658 | 658 |
659 #endif // SANDBOX_WIN_SRC_NT_INTERNALS_H__ | 659 #endif // SANDBOX_WIN_SRC_NT_INTERNALS_H__ |
660 | 660 |
OLD | NEW |