Update comments

This commit is contained in:
Satoshi Tanda
2020-03-07 10:47:18 -08:00
parent adf09d85af
commit cd56f77bc0
32 changed files with 276 additions and 229 deletions

View File

@@ -10,7 +10,7 @@
.code
;
; @brief Read the value from LDTR.
; @brief Reads the value of LDTR.
;
; @return The value of LDTR.
;
@@ -20,7 +20,7 @@ AsmReadLdtr proc
AsmReadLdtr endp
;
; @brief Read the value from TR.
; @brief Reads the value of TR.
;
; @return The value of TR.
;
@@ -30,7 +30,7 @@ AsmReadTr proc
AsmReadTr endp
;
; @brief Read the value from ES.
; @brief Reads the value of ES.
;
; @return The value of ES.
;
@@ -40,7 +40,7 @@ AsmReadEs proc
AsmReadEs endp
;
; @brief Read the value from CS.
; @brief Reads the value of CS.
;
; @return The value of CS.
;
@@ -50,7 +50,7 @@ AsmReadCs proc
AsmReadCs endp
;
; @brief Read the value from SS.
; @brief Reads the value of SS.
;
; @return The value of SS.
;
@@ -60,7 +60,7 @@ AsmReadSs proc
AsmReadSs endp
;
; @brief Read the value from DS.
; @brief Reads the value of DS.
;
; @return The value of DS.
;
@@ -70,7 +70,7 @@ AsmReadDs proc
AsmReadDs endp
;
; @brief Read the value from FS.
; @brief Reads the value of FS.
;
; @return The value of FS.
;
@@ -80,7 +80,7 @@ AsmReadFs proc
AsmReadFs endp
;
; @brief Read the value from GS.
; @brief Reads the value of GS.
;
; @return The value of GS.
;
@@ -90,7 +90,7 @@ AsmReadGs proc
AsmReadGs endp
;
; @brief Write the value to TR.
; @brief Writes the value to TR.
;
; @param[in] RCX - The new TR value to write.
;

View File

@@ -17,7 +17,6 @@
*/
UINT16
AsmReadLdtr (
VOID
);
/*!
@@ -27,7 +26,6 @@ AsmReadLdtr (
*/
UINT16
AsmReadTr (
VOID
);
/*!
@@ -37,7 +35,6 @@ AsmReadTr (
*/
UINT16
AsmReadEs (
VOID
);
/*!
@@ -47,7 +44,6 @@ AsmReadEs (
*/
UINT16
AsmReadCs (
VOID
);
/*!
@@ -57,7 +53,6 @@ AsmReadCs (
*/
UINT16
AsmReadSs (
VOID
);
/*!
@@ -67,7 +62,6 @@ AsmReadSs (
*/
UINT16
AsmReadDs (
VOID
);
/*!
@@ -77,7 +71,6 @@ AsmReadDs (
*/
UINT16
AsmReadFs (
VOID
);
/*!
@@ -87,7 +80,6 @@ AsmReadFs (
*/
UINT16
AsmReadGs (
VOID
);
/*!

View File

@@ -457,7 +457,7 @@ LogFlushThread (
LOGGER_CONTEXT* logger;
LARGE_INTEGER interval;
PAGED_CODE()
PAGED_CODE();
logger = (LOGGER_CONTEXT*)StartContext;
interval.QuadPart = -(10000ll * logger->FlushIntervalInMs);
@@ -562,13 +562,6 @@ CleanupPairedLogBuffer (
ExFreePoolWithTag(PairedLogBuffer->InactiveLogBuffer->LogEntries, LOGGER_POOL_TAG);
}
/*!
@brief Initializes the global logger.
@param[in] Configuration - The configuration for initialization.
@return STATUS_SUCCESS on success; otherwise, an appropriate error code.
*/
LOGGER_INIT
_Use_decl_annotations_
NTSTATUS
@@ -581,7 +574,7 @@ InitializeLogger (
HANDLE fileHandle;
HANDLE threadHandle;
PAGED_CODE()
PAGED_CODE();
MV_ASSERT(g_Logger == NULL);
@@ -615,7 +608,7 @@ InitializeLogger (
&filePath,
OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE,
NULL,
NULL)
NULL);
status = ZwCreateFile(&fileHandle,
FILE_APPEND_DATA | SYNCHRONIZE,
&objectAttributes,
@@ -709,7 +702,6 @@ InitializeLogger (
//
g_Logger = logger;
Exit:
if (NT_ERROR(status))
{
@@ -729,9 +721,6 @@ Exit:
return status;
}
/*!
@brief Clean up the logger.
*/
LOGGER_PAGED
_Use_decl_annotations_
VOID
@@ -742,7 +731,7 @@ CleanupLogger (
LOGGER_CONTEXT* logger;
SIZE_T maxOverflowedLogSize;
PAGED_CODE()
PAGED_CODE();
MV_ASSERT(g_Logger != NULL);

View File

@@ -69,6 +69,13 @@ typedef struct _LOGGER_CONFIGURATION
PCWSTR FilePath;
} LOGGER_CONFIGURATION;
/*!
@brief Initializes the global logger.
@param[in] Configuration - The configuration for initialization.
@return STATUS_SUCCESS on success; otherwise, an appropriate error code.
*/
_IRQL_requires_max_(PASSIVE_LEVEL)
_Must_inspect_result_
NTSTATUS
@@ -76,6 +83,9 @@ InitializeLogger (
_In_ CONST LOGGER_CONFIGURATION* Configuration
);
/*!
@brief Clean up the logger.
*/
_IRQL_requires_max_(PASSIVE_LEVEL)
VOID
CleanupLogger (

View File

@@ -97,7 +97,7 @@ ConvertNtToMvStatus (
@param[in] DriverObject - The driver's driver object.
@param[in] RegistryPath - A path to the driver's registry key.
@param[in] RegistryPath - The path to the driver's registry key.
@return STATUS_SUCCESS on success; otherwise, an appropriate error code.
*/
@@ -148,7 +148,7 @@ DriverUnload (
{
UNREFERENCED_PARAMETER(DriverObject);
PAGED_CODE()
PAGED_CODE();
//
// Start cross-platform clean up.
@@ -165,7 +165,7 @@ InitializePlatform (
NTSTATUS status;
LOGGER_CONFIGURATION loggerConfig;
PAGED_CODE()
PAGED_CODE();
//
// Initialize in-house logger. Enable all flags.
@@ -192,7 +192,7 @@ VOID
CleanupPlatform (
)
{
PAGED_CODE()
PAGED_CODE();
CleanupLogger();
}
@@ -206,7 +206,7 @@ Sleep (
{
LARGE_INTEGER interval;
PAGED_CODE()
PAGED_CODE();
interval.QuadPart = -(LONGLONG)(10000 * Milliseconds);
(VOID)KeDelayExecutionThread(KernelMode, FALSE, &interval);
@@ -296,7 +296,7 @@ ReserveVirtualAddress (
UINT64 PageCount
)
{
PAGED_CODE()
PAGED_CODE();
return MmAllocateMappingAddress(PageCount * PAGE_SIZE, MV_POOL_TAG);
}
@@ -309,7 +309,7 @@ FreeReservedVirtualAddress (
UINT64 PageCount
)
{
PAGED_CODE()
PAGED_CODE();
UNREFERENCED_PARAMETER(PageCount);
@@ -326,7 +326,7 @@ RunOnAllProcessors (
{
UINT32 numberOfProcessors;
PAGED_CODE()
PAGED_CODE();
numberOfProcessors = KeQueryActiveProcessorCountEx(ALL_PROCESSOR_GROUPS);
for (UINT32 index = 0; index < numberOfProcessors; ++index)