-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SDK] CORE-12596 fix NT6 building issues. #356
Conversation
Better commit name:
|
8eca0b9
to
0fd10b8
Compare
sdk/include/ndk/peb_teb.h
Outdated
@@ -357,11 +357,6 @@ typedef struct STRUCT(_TEB) | |||
UCHAR IdealProcessor; | |||
}; | |||
}; | |||
#elif (NTDDI_VERSION >= NTDDI_LONGHORN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a Vista kernel to check with, but Win7 uses the version above in the >= NTDDI_WIN10 block. What information is your change based on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I not found no any usage of SpareBool0-SpareBool2 and from thier names it looks like stubs for unknown flags just to keep offset for IdealProcessor.
In all places InDbgPrint and next two are used. Also building with winver=0x600 failed because of lack InDbgPrint field.
Maybe comment out this NTDDI_LONGHORN block now instead of deleting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I checked, and this block is correct for Vista. However the WIN10 check above should say WIN7 as I mentioned.
The InDbgPrint and HasFiberData members do not exist in newer versions. The DbgInDebugPrint and DbgHasFiberData in SameTebFlags below seem to be their replacements (they don't have the Dbg- prefix though)
+0x17ee SameTebFlags : Uint2B
+0x17ee SafeThunkCall : Pos 0, 1 Bit
+0x17ee InDebugPrint : Pos 1, 1 Bit
+0x17ee HasFiberData : Pos 2, 1 Bit
+0x17ee SkipThreadAttach : Pos 3, 1 Bit
+0x17ee WerInShipAssertCode : Pos 4, 1 Bit
+0x17ee RanProcessInit : Pos 5, 1 Bit
+0x17ee ClonedThread : Pos 6, 1 Bit
+0x17ee SuppressDebugMsg : Pos 7, 1 Bit
+0x17ee DisableUserStackWalk : Pos 8, 1 Bit
+0x17ee RtlExceptionAttached : Pos 9, 1 Bit
+0x17ee InitialThread : Pos 10, 1 Bit
+0x17ee SpareSameTebBits : Pos 11, 5 Bits
This means the absence of InDbgPrint & friends is the desired behavior, as the structure must be compatible with Windows. If the kernel doesn't compile with NTDDI_VERSION=NTDDI_VISTA, I'm not sure I'd even consider that a bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
damn, you right( ok, roll it back
found it on http://terminus.rewolf.pl/terminus/structures/ntdll/_TEB_combined.html
sdk/include/ndk/i386/asm.h
Outdated
// | ||
// HYPERVISOR | ||
// | ||
#define HV_MMU_USE_HYPERCALL_FOR_ADDRESS_SWITCH 0x01 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're in the middle of CPU-defined flags here. I think it would make more sense elsewhere, e.g. above the CPU feature flags starting in line 640/659
sdk/include/ndk/i386/asm.h
Outdated
@@ -471,6 +471,17 @@ Header Name: | |||
#endif | |||
#define EFLAGS_USER_SANITIZE 0x3F4DD7 | |||
|
|||
|
|||
// | |||
// HYPERVISOR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description doesn't need to be all-caps, and can be a bit more elaborate. E.g. "Hypervisor enlightenment flags", or "Hypervisor Enlightenment Definitions" as is used in kd386.template.h
8434104
to
dbb1b56
Compare
sdk/include/ndk/peb_teb.h
Outdated
BOOLEAN SpareBool0; | ||
BOOLEAN SpareBool1; | ||
BOOLEAN SpareBool2; | ||
UCHAR IdealProcessor; | ||
UCHAR IdealProcessor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unwanted extra space.
sdk/include/asm/ksx.template.h
Outdated
@@ -797,7 +797,9 @@ SIZE(KernelThreadObjectLength, KTHREAD), | |||
HEADER("KTIMER"), | |||
OFFSET(TiType, KTIMER, Header.Type), | |||
OFFSET(TiSize, KTIMER, Header.Size), | |||
OFFSET(TiInserted, KTIMER, Header.Inserted), // not in win 10 | |||
#if (NTDDI_VERSION < NTDDI_WIN7) | |||
OFFSET(TiInserted, KTIMER, Header.Inserted), // not in win 7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth keeping the comment?
139ec23
to
4020eeb
Compare
updated winuser.h and fcb.h |
b4d8e0a
to
2386cbc
Compare
sdk/include/psdk/winuser.h
Outdated
@@ -3446,6 +3446,14 @@ typedef struct tagSOUNDSENTRYW { | |||
DWORD iWindowsEffectOrdinal; | |||
} SOUNDSENTRYW,*LPSOUNDSENTRYW; | |||
|
|||
#if(_WIN32_WINNT >= 0x0600) | |||
typedef struct tagAUDIODESCRIPTION { | |||
UINT cbSize; // sizeof(AudioDescriptionType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copying from Microsoft's headers is not okay. Please delete this, type it yourself (without the comments), and match the formatting in the rest of this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, i thought we can use public headers and what can be found on MSDN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can learn from publicly available information, but copying without permission is still copyright infringement.
Purpose
fixing issue and some more SDK headers NT6 improvements
JIRA issue: CORE-12596