Author: tkreuzer
Date: Fri Dec 5 10:42:35 2008
New Revision: 37870
URL:
http://svn.reactos.org/svn/reactos?rev=37870&view=rev
Log:
- cleanup merge mess
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ntoskrnl.h
branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/probe.h
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ntoskrnl.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ntoskrnl.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ntoskrnl.h [iso-8859-1]
Fri Dec 5 10:42:35 2008
@@ -141,131 +141,6 @@
#define IQS(TypeQuery, TypeSet, AlignmentQuery, AlignmentSet, Flags) \
{ sizeof(TypeQuery), sizeof(TypeSet), sizeof(AlignmentQuery), sizeof(AlignmentSet),
Flags }
-<<<<<<< .working
-#ifndef _M_AMD64
-FORCEINLINE
-#else
-static inline
-#endif
-NTSTATUS
-DefaultSetInfoBufferCheck(ULONG Class,
- const INFORMATION_CLASS_INFO *ClassList,
- ULONG ClassListEntries,
- PVOID Buffer,
- ULONG BufferLength,
- KPROCESSOR_MODE PreviousMode)
-{
- NTSTATUS Status = STATUS_SUCCESS;
-
- if (Class < ClassListEntries)
- {
- if (!(ClassList[Class].Flags & ICIF_SET))
- {
- Status = STATUS_INVALID_INFO_CLASS;
- }
- else if (ClassList[Class].RequiredSizeSET > 0 &&
- BufferLength != ClassList[Class].RequiredSizeSET)
- {
- if (!(ClassList[Class].Flags & ICIF_SET_SIZE_VARIABLE))
- {
- Status = STATUS_INFO_LENGTH_MISMATCH;
- }
- }
-
- if (NT_SUCCESS(Status))
- {
- if (PreviousMode != KernelMode)
- {
- _SEH_TRY
- {
- ProbeForRead(Buffer,
- BufferLength,
- ClassList[Class].AlignmentSET);
- }
- _SEH_HANDLE
- {
- Status = _SEH_GetExceptionCode();
- }
- _SEH_END;
- }
- }
- }
- else
- Status = STATUS_INVALID_INFO_CLASS;
-
- return Status;
-}
-
-#ifndef _M_AMD64
-FORCEINLINE
-#else
-static inline
-#endif
-NTSTATUS
-DefaultQueryInfoBufferCheck(ULONG Class,
- const INFORMATION_CLASS_INFO *ClassList,
- ULONG ClassListEntries,
- PVOID Buffer,
- ULONG BufferLength,
- PULONG ReturnLength,
- PULONG_PTR ReturnLengthLong,
- KPROCESSOR_MODE PreviousMode)
-{
- NTSTATUS Status = STATUS_SUCCESS;
-
- if (Class < ClassListEntries)
- {
- if (!(ClassList[Class].Flags & ICIF_QUERY))
- {
- Status = STATUS_INVALID_INFO_CLASS;
- }
- else if (ClassList[Class].RequiredSizeQUERY > 0 &&
- BufferLength != ClassList[Class].RequiredSizeQUERY)
- {
- if (!(ClassList[Class].Flags & ICIF_QUERY_SIZE_VARIABLE))
- {
- Status = STATUS_INFO_LENGTH_MISMATCH;
- }
- }
-
- if (NT_SUCCESS(Status))
- {
- if (PreviousMode != KernelMode)
- {
- _SEH_TRY
- {
- if (Buffer != NULL)
- {
- ProbeForWrite(Buffer,
- BufferLength,
- ClassList[Class].AlignmentQUERY);
- }
-
- if (ReturnLength != NULL)
- {
- ProbeForWriteUlong(ReturnLength);
- }
- if (ReturnLengthLong != NULL)
- {
- ProbeForWrite(ReturnLengthLong, sizeof(ULONG_PTR),
sizeof(ULONG_PTR));
- }
- }
- _SEH_HANDLE
- {
- Status = _SEH_GetExceptionCode();
- }
- _SEH_END;
- }
- }
- }
- else
- Status = STATUS_INVALID_INFO_CLASS;
-
- return Status;
-}
-
-=======
->>>>>>> .merge-rechts.r37853
/*
* Use IsPointerOffset to test whether a pointer should be interpreted as an offset
* or as a pointer
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/probe.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/probe.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/probe.h [iso-8859-1] Fri
Dec 5 10:42:35 2008
@@ -63,6 +63,7 @@
PVOID Buffer,
ULONG BufferLength,
PULONG ReturnLength,
+ PULONG_PTR ReturnLengthLong,
KPROCESSOR_MODE PreviousMode)
{
NTSTATUS Status = STATUS_SUCCESS;
@@ -99,6 +100,10 @@
{
ProbeForWriteUlong(ReturnLength);
}
+ if (ReturnLengthLong != NULL)
+ {
+ ProbeForWrite(ReturnLengthLong, sizeof(ULONG_PTR),
sizeof(ULONG_PTR));
+ }
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{