Eric Kohl
07e19a5e09
[NTOS:IO] Fail, if io completion port and an apc routine are used at the same time
...
Add checks to NtNotifyChangeDirectoryFile, NtLockFile, NtReadFile and NtWriteFile.
This fixes two ntdll tests.
2021-11-24 13:34:26 +01:00
Thomas Faber
34f2b7830d
[NTOS:IO] Correctly deal with exceptions when handling FileFsDriverPathInformation. CID 1476847
2021-11-13 21:23:39 -05:00
Thomas Faber
a74ff5be17
[NTOS:IO] Don't call IopCompleteRequest with uninitialized context values. CID 716761
...
NormalContext and NormalRoutine are just for good measure, but
SystemArgument2 is actually used by the function.
And yes, this appears to be a bug in Win 2003.
2021-11-13 21:23:39 -05:00
Hermès Bélusca-Maïto
9b1edceae1
[REACTOS] Fix some instances of DPRINTs with trailing whitespace before newlines.
2021-09-13 03:52:19 +02:00
Jérôme Gardou
2d3454a809
[NTOS:IO] VFAT sucks less now
2021-02-03 09:41:22 +01:00
Jérôme Gardou
ef4c7ae978
[NTOS:IO] Validate input parameters in NtQueryDirectoryFile
...
It turns out this is not the job of the FS driver
2020-12-22 11:06:38 +01:00
Jérôme Gardou
a6c0af2e21
[NTOS:IO] Do not pass bogus file offset to the FS in NtReadFile & NtWriteFile
2020-12-22 11:02:33 +01:00
Pierre Schweitzer
ef8b1a1907
[NTOSKRNL] We don't need an event if we don't issue an IRP
2019-03-29 21:47:34 +01:00
Pierre Schweitzer
28ba29e457
[NTOSKRNL] Implement support for FileFsDriverPathInformation in NtQueryVolumeInformationFile
2019-03-29 21:42:42 +01:00
Pierre Schweitzer
092c37f845
[NTOSKRNL] Do. Not. L. E. A. K.
2019-03-29 19:51:38 +01:00
Pierre Schweitzer
d75ccd01f7
[NTOSKRNL] Only allow direct device open for FileFsDeviceInformation
2019-03-28 22:39:38 +01:00
Pierre Schweitzer
ce6488df31
[NTOSKRNL] Add a quick path for FileFsDeviceInformation in NtQueryVolumeInformationFile
...
This allows querying volume information without issuing an IRP to the owner device.
The kernel is supposed to already have all the required information to return
to the caller.
Side effect: this allows querying volume information for devices not implementing
IRP_MJ_QUERY_VOLUME_INFORMATION such as null.sys
This fixes opening null device in Python.
Fix based on debugging by Maxim Smirnov in PR #1442
CORE-14551
2019-03-28 22:39:38 +01:00
Thomas Faber
63977328b1
[NTOSKRNL] Guard against negative InformationClass enum values. CORE-15651
2019-02-02 22:50:02 +01:00
Pierre Schweitzer
e19e907a2c
[NTOSKRNL] Quickly check for alignment in NtRead/WriteFile
...
This quick check based on bits and operation is for 2^ based
sector sizes (most of the cases) and will perform faster than
the modulo operation which is still used in fallback in case
the sector size wouldn't be a power of 2.
2018-10-04 10:45:10 +02:00
Pierre Schweitzer
44155053cd
[NTOSKRNL] Use captured variable to check parameters in NtRead/WriteFile
2018-10-04 10:45:10 +02:00
Pierre Schweitzer
bf59669065
[NTOSKRNL] On read/write, also check buffer respects device alignment requirements
2018-10-04 07:56:23 +02:00
Pierre Schweitzer
1bd25c5c24
[NTOSKRNL] When checking for byte offset alignment, tolerate some magic values
2018-10-04 07:53:12 +02:00
Eric Kohl
fd33402104
[NTOSKRNL] NtReadFile/NtWriteFile: If a file has been opened for non-cached access, Length and ByteOffset must be sector size aligned.
...
This fixed two ntdll apitests.
2018-10-04 01:17:58 +02:00
Pierre Schweitzer
15b9a6aa4c
[NTOSKRNL] Call IoCreateFileSpecifyDeviceObjectHint with the hint if it was specified
2018-10-03 21:29:12 +02:00
Thomas Faber
8fbc488050
[NTOS:IO] Implement IopAcquireFileObjectLock and use it to fix IopLockFileObject
2018-10-02 09:56:55 +02:00
Pierre Schweitzer
cf3b9d5b56
[NTOSKNRL] Only allocate a MDL if we have an output length
...
For user mode, when probing output buffer, if it's null, length
will also be set to 0.
This avoids user mode applications being able to trigger various
asserts in ReactOS (and thus BSOD when no debugger is plugged ;-)).
2018-07-29 13:58:30 +02:00
Pierre Schweitzer
a3c58ca76f
[NTOSKRNL] Implement the support for reserve IRP in IO
...
The reserve IRP is an IRP which is allocated on system boot and kept during
the whole system life. Its purpose is to allow page reads in case of
low-memory situations where the system doesn't have enough memory left
to allocate an IRP to read from the page file (would be catastrophic situation).
2018-02-24 14:52:04 +01:00
Pierre Schweitzer
9ac2e9855a
[NTOSKRNL] Add the CcDataFlushes and CcDataPages counters
2018-02-24 14:52:04 +01:00
Pierre Schweitzer
9ecbbe2a33
[NTOSKRNL] Use ExAllocatePoolWithQuotaTag() when allocating SystemBuffer for the IRP
...
That way, in case the system lacks memory, an exception is thrown and IRP isn't sent
to the device with NULL SystemBuffer.
CORE-14048
2017-11-26 14:03:30 +01:00
Pierre Schweitzer
d01184b164
[NTOSKRNL] Use cache aligned buffer for devioctrl
2017-11-26 14:03:30 +01:00
Pierre Schweitzer
1d777ffab5
[NTOSKNRL] In NtWriteFile, remove the check that is now redundant with ObReferenceFileObjectForWrite().
...
CORE-14003
2017-11-12 22:39:40 +01:00
Pierre Schweitzer
c3d5a3f2bd
[NTOSKRNL] In NtWriteFile, quit using ObReferenceObjectByHandle in favor of ObReferenceFileObjectForWrite().
...
This avoids RO FSDs being called for write operations.
CORE-14003
2017-11-12 22:39:40 +01:00
Pierre Schweitzer
1bef48796e
[NTOSKRNL] Add a FIXME in NtWriteFile() that explains how broken is our current implementation regarding read-only FSDs
2017-11-12 21:11:22 +01:00
Colin Finck
c2c66aff7d
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
2017-10-03 07:45:34 +00:00