reactos/ntoskrnl/include/internal/icif.h
George Bișoc 2791ecd303
[NTOS:PS] Fix several issues within info classes in AMD64 build
ProcessUserModeIOPL, ProcessWow64Information and ThreadZeroTlsCell classes fail on AMD64 build because of wrong IQS values assigned to them. Also explicitly tell the compiler that ProcessUserModeIOPL is strictly for x86 as user mode I/O privilege level is 32-bit stuff.
In addition to that, implement IQS_NO_TYPE_LENGTH macro which it'll be used for classes such as ProcessUserModeIOPL where type length is not required and that it should be 0. With that said, we indirectly fix a size length mismatch issue with ProcessUserModeIOPL on 32-bit of ReactOS as well.
2021-06-25 10:33:18 +02:00

44 lines
1.4 KiB
C

/*
* PROJECT: ReactOS Kernel
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Internal header for information classes info interface
* COPYRIGHT: Copyright ???
* Copyright 2020-2021 George Bișoc <george.bisoc@reactos.org>
*/
#pragma once
/*
* Implement generic information class probing code in a
* separate header within the NT kernel header internals.
* This makes it accessible to other sources by including
* the header.
*/
#define ICIF_NONE 0x0
#define ICIF_QUERY 0x1
#define ICIF_SET 0x2
#define ICIF_QUERY_SIZE_VARIABLE 0x4
#define ICIF_SET_SIZE_VARIABLE 0x8
#define ICIF_SIZE_VARIABLE (ICIF_QUERY_SIZE_VARIABLE | ICIF_SET_SIZE_VARIABLE)
typedef struct _INFORMATION_CLASS_INFO
{
USHORT RequiredSizeQUERY;
UCHAR AlignmentQUERY;
USHORT RequiredSizeSET;
UCHAR AlignmentSET;
USHORT Flags;
} INFORMATION_CLASS_INFO, *PINFORMATION_CLASS_INFO;
#define IQS_SAME(Type, Alignment, Flags) \
{ sizeof(Type), sizeof(Alignment), sizeof(Type), sizeof(Alignment), Flags }
#define IQS(TypeQuery, AlignmentQuery, TypeSet, AlignmentSet, Flags) \
{ sizeof(TypeQuery), sizeof(AlignmentQuery), sizeof(TypeSet), sizeof(AlignmentSet), Flags }
#define IQS_NO_TYPE_LENGTH(Alignment, Flags) \
{ 0, sizeof(Alignment), 0, sizeof(Alignment), Flags }
#define IQS_NONE \
{ 0, sizeof(CHAR), 0, sizeof(CHAR), ICIF_NONE }