Commit graph

15 commits

Author SHA1 Message Date
Serge Gautherie c03b2ed9be
[HDAUDBUS][KS][WDMAUD] Use ExAllocatePoolZero() and ExFreePoolWithTag() (#5792)
And promote/fix 2 DPRINTs as well.
2023-10-20 18:09:03 +02:00
Oleg Dubinskiy a6b281c228
[KS] KsRead/WriteFile: finish IRP initialization and properly setup I/O stack location for it (#5784)
- Initialize the rest of IRP data which is not initialized by IoBuildSynchronousFsdRequest.
- Setup an IO_STACK_LOCATION structure for the IRP before calling the driver's read/write routine.
- Do this for both KsReadFile and KsWriteFile functions in our Kernel Streaming driver (ks.sys).
This fixes several problems when calling these functions from outside, so now they are working correctly, as expected.
Discovered during my audio investigations.
CORE-19232
2023-10-10 13:30:00 -07:00
Oleg Dubinskiy d96b3cd45c
[KS] Fix bug in KsStreamIo (#4663)
Properly set output buffer length in IO Stack Location of the current IRP, since it is passed to KsProbeStreamIrp when calling KsStreamIo, so it fails if the length isn't set properly.

Don't set an input buffer length and the buffer itself, since it isn't passed anywhere, so setting it makes no sense. Moreover, MSDN says that for IOCTL_KS_READ/WRITE_STREAM, only output buffer (and its length) is needed to be set, but not an input one. So it indeed is more correct.

It fixes buffer overflow in KsProbeStreamIrp when attempting to perform the streaming via KsStreamIo. I discovered this bug during my audio refactoring from PR #4660.
2023-10-06 12:36:09 +02:00
Serge Gautherie 46db6573ab
[DRIVERS] Add some missing OBJ_KERNEL_HANDLE (#4493)
Match Zw*() uses. CORE-10207
2022-05-07 22:12:19 +03:00
Serge Gautherie cba4fd57d0 [KS] KsServiceBusEnumPnpRequest(): Remove a redundant ASSERT()
Addendum to c6b26fa (r50531).
2022-01-08 18:00:38 +03:00
Victor Perevertkin 7ed1883c8e
[DRIVERS] Use IoForwardIrpSynchronously in drivers
Instead of having an own routine in each driver
IoForwardIrpSynchronously can be used.
2022-01-05 02:17:56 +03:00
Victor Perevertkin 34593d933b
[FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
Serge Gautherie b326312d52 [KS] KsQueryInformationFile(): Fallback to IRP if FastIO failed
Or, if it succeeded, return the actual NTSTATUS, not an unrelated BOOLEAN.

Addendum to commit 4725a4fd9c (r42117).

CORE-16618
2020-02-17 19:08:57 +03:00
Serge Gautherie 7405dc36b6 [KS] KsQueryInformationFile(): Merge IoStatus and StatusBlock
Addendum to commit 9061b8ee40 (r42334).
2020-02-17 19:08:57 +03:00
Serge Gautherie e2b536bcb1 [KS] KsQueryInformationFile(): Fix 'FastIoQueryBasicInfo' copypasta (#2236)
Addendum to commit 4725a4fd (r42117).
2020-01-07 15:13:40 +01:00
Victor Perevertkin 1d9e03b708
[KS] Use KeQueryTickCount for timeouts instead of KeQuerySystemTime
This avoids overflow when system time is changed between calls (for example, via NTP)
2019-12-16 02:28:41 +03:00
Jérôme Gardou 23373acbb9 [CMAKE] Use modules instead of shared libraries
There is no need to compile our DLLs as shared libraries since we are
managing symbols exports and imports through spec files.

On my system, this reduces the configure-time by a factor of two.
2019-04-06 17:43:38 +02:00
Jason Wendt 0fdb5d9b63 [SWENUM] Add version information. CORE-14112
Improves setup of DirectX 9.0b 4.09.00.0902 (which the game Halo wants
to install) after manually lowering DirectX version in registry.
2017-12-17 02:22:28 +01:00
Hermès Bélusca-Maïto 221ed4cefe Remove unwanted .gitignore files. 2017-10-04 10:28:36 +02: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