use ZwQueryInformationFile and ZwSetInformationFile instead of the Nt version since we're passing kernel pointers to them which cause a probe failure in UserMode. This should fix the 1st stage setup

svn path=/trunk/; revision=16708
This commit is contained in:
Thomas Bluemel 2005-07-24 09:11:30 +00:00
parent 6bdd4f6993
commit 1375ddbb83
2 changed files with 20 additions and 4 deletions

View file

@ -3039,8 +3039,16 @@ failfreeirp:
PreviousMode, PreviousMode,
FileObject->Flags & FO_ALERTABLE_IO, FileObject->Flags & FO_ALERTABLE_IO,
NULL); NULL);
_SEH_TRY
{
Status = IoStatusBlock->Status; Status = IoStatusBlock->Status;
} }
_SEH_HANDLE
{
Status = _SEH_GetExceptionCode();
}
_SEH_END;
}
else else
{ {
KeWaitForSingleObject(&FileObject->Event, KeWaitForSingleObject(&FileObject->Event,
@ -3048,8 +3056,16 @@ failfreeirp:
PreviousMode, PreviousMode,
FileObject->Flags & FO_ALERTABLE_IO, FileObject->Flags & FO_ALERTABLE_IO,
NULL); NULL);
_SEH_TRY
{
Status = FileObject->FinalStatus; Status = FileObject->FinalStatus;
} }
_SEH_HANDLE
{
Status = _SEH_GetExceptionCode();
}
_SEH_END;
}
} }
/* Return the Status */ /* Return the Status */

View file

@ -2308,7 +2308,7 @@ MmCreateDataFileSection(PSECTION_OBJECT *SectionObject,
* (as in case of the EXT2FS driver by Manoj Paul Joseph where the * (as in case of the EXT2FS driver by Manoj Paul Joseph where the
* standard file information is filled on first request). * standard file information is filled on first request).
*/ */
Status = NtQueryInformationFile(FileHandle, Status = ZwQueryInformationFile(FileHandle,
&Iosb, &Iosb,
&FileInfo, &FileInfo,
sizeof(FILE_STANDARD_INFORMATION), sizeof(FILE_STANDARD_INFORMATION),
@ -2342,7 +2342,7 @@ MmCreateDataFileSection(PSECTION_OBJECT *SectionObject,
if (MaximumSize.QuadPart > FileInfo.EndOfFile.QuadPart) if (MaximumSize.QuadPart > FileInfo.EndOfFile.QuadPart)
{ {
Status = NtSetInformationFile(FileHandle, Status = ZwSetInformationFile(FileHandle,
&Iosb, &Iosb,
&MaximumSize, &MaximumSize,
sizeof(LARGE_INTEGER), sizeof(LARGE_INTEGER),