Commit graph

594 commits

Author SHA1 Message Date
Timo Kreuzer 81bdf4e360 [CRT] Add missing posix error codes
These are required by latest mingw-w64 stl and we are mixing this with our crt headers.
Define _CRT_NO_POSIX_ERROR_CODES in all modules that define their own constants.
2019-05-27 13:22:40 +02:00
Hervé Poussineau 9a6eb70ff9 [HIDCLASS] Implement IRP_MJ_WRITE 2019-05-14 14:37:22 +02:00
Pierre Schweitzer 883b1f31ac
[BTRFS] Upgrade to 1.2.1
CORE-16004
2019-05-11 11:20:02 +02:00
Hervé Poussineau 2d5a230810 [MOUHID] Correctly detect tablet devices
Some mice give a logical min/logical max which is the maximum move
that they can provide. Those were wrongly detected as absolute mice,
and mouse pointer was mostly stuck at the upper left corner of the
screen.
2019-05-10 11:35:01 +02:00
Hervé Poussineau 2978d4b61b [HIDPARSE/HIDPARSER] Move HidP_* functions from hidparse.sys to hidparser library
Interface between both is not anymore the HidParser_* functions, but
the HidP_* functions and the AllocFunction/FreeFunction/DebugFunctions/
ZeroFunction/CopyFunction.
2019-05-02 20:06:47 +02:00
Hervé Poussineau bef39dd62e [SERIAL] Immediately complete read IRP if all requested bytes have been found in circular buffer
Previously, we had to wait to receive another byte to finish the first IRP.
2019-05-02 20:06:47 +02:00
Hervé Poussineau ebd39aa266 [I8042PRT] Do not assert on unknown IOCTL 2019-05-02 20:06:47 +02:00
Hervé Poussineau 501116b68f [HIDCLASS] Implement IOCTL_HID_GET_FEATURE/IOCTL_HID_SET_FEATURE 2019-04-19 22:46:03 +02:00
Thomas Faber a7634b8e1d
[USBHUB_NEW] Support NULL HubExtension in USBH_PdoRemoveDevice.
Device removal can happen multiple times for PDOs.
2019-04-14 15:32:18 +02:00
Thomas Faber 477cf902e4
[USBHUB_NEW] Fix inverted check in USBH_RestoreDevice.
This allows re-enabling a disabled device.
2019-04-14 15:32:16 +02:00
Thomas Faber 46b0f6d9de
[USBCCGP] Allow unconfiguring the device in USBCCGP_PDOSelectConfiguration.
Fixes device removal for USB audio devices.
2019-04-14 15:32:14 +02:00
Thomas Faber 528fc589c0
[USBCCGP] Do not try to unconfigure a device that is not configured.
Fixes handling failed IRP_MN_START_DEVICE.
2019-04-14 15:32:12 +02:00
Victor Perevertkin 5f4cf8a716 [USBHID] Do not assert if the device was unplugged during an operation. 2019-04-08 12:05:17 +03:00
Hervé Poussineau 902b86eecf [UDFS] Fix macros to support 'bit' being a complex expression
This is for example used in udf_info/mount.cpp:
    UDFSetUsedBits(new_bm, i & ~(d-1), d);
2019-04-07 19:28:18 +02:00
Hervé Poussineau 5f69f99ce2 [UDFS] Keep same includes/defines on x64 as on other architectures 2019-04-07 19:28:18 +02:00
Hervé Poussineau 33cf2c44c5 [MUP] Use _SEH2_AbnormalTermination() instead of _abnormal_termination()
We're already using SEH2 macros, so also use SEH2 functions
2019-04-07 19:28:18 +02:00
Hervé Poussineau 4c1cbd2b53 [EXT2] Add __REACTOS__ check around changes done in 76910c358f 2019-04-07 18:32:29 +02:00
Thomas Faber 89a587169b
[ACPICA] Update to version 20190405. CORE-15926 2019-04-07 10:59:52 +02: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
Pierre Schweitzer 2a104321ee [UDFS] Fix an integer overflow leading to a buffer overrun
Spotted by GCC7
2019-04-04 15:08:21 +02:00
Alexandr A. Telyatnikov 6d5a81013c [UNIATA] Fix for uninitialized Lun pointer
This fixes crash on Intel AHCI init. CORE-15886
2019-04-02 18:02:07 +02:00
Timo Kreuzer c334c17d69 [UDFS] Fix 64 bit issues 2019-04-02 10:53:23 +02:00
Hervé Poussineau 12c70fb4cf [UDFS] Really use 'logical or' when meant to
'binary or' was also working, but it is less clear.
2019-04-01 11:38:32 +02:00
Hervé Poussineau 76910c358f [EXT2] Correctly zero memory before using it 2019-04-01 11:38:32 +02:00
Thomas Faber ba1fb9ace9
[ACPICA] Update to version 20190329. CORE-15900 2019-03-30 14:57:35 +01:00
Maxim Smirnov 5570cde271
[NULL] Use correct device characteristics value for the null device 2019-03-28 22:46:04 +01:00
Thomas Faber b546130731
[UNIATA] Update to version 0.47. CORE-15870 2019-03-24 14:48:32 +01:00
Thomas Faber 526fc76cac
[SERIAL] Do not return NTSTATUS from an interrupt routine. 2019-03-24 09:25:17 +01:00
Thomas Faber b91cf860cd
[UNIATA] Update to version 46e8. CORE-15843 2019-03-14 13:16:43 +01:00
Thomas Faber 48870fe35e
[UNIATA] Remove an unnecessary ROS-diff. 2019-03-14 13:16:41 +01:00
Thomas Faber fc9d5d2f55
[USBUHCI_NEW] Fix an infinite loop. 2019-03-11 08:54:03 +01:00
Thomas Faber 026a12fe39
[USBPORT] Implement interface setting in USBPORT_OpenInterface. 2019-03-11 08:54:01 +01:00
Thomas Faber ac20ab031c
[USBPORT] Correctly handle alternate settings returned from USBPORT_ParseConfigurationDescriptor.
The last parameter of USBPORT_ParseConfigurationDescriptor is a pointer
to a boolean indicating whether any alternate interface settings were
found for the specified interface.
Interpreting it as an alternate setting value, as we did before,
would always override the alternate setting to '1' (if any alternate
descriptors were present), therefore selecting the wrong interface
setting, and possibly causing a buffer overflow on the InterfaceList's
Pipes array.

Found by Special Pool.
2019-03-11 08:53:55 +01:00
Thomas Faber 36c1cb0910
[USBPORT] Correctly find interface descriptor in USBPORT_ParseConfigurationDescriptor
There can be other descriptors between the config descriptor and the
first interface descriptor, so we specifically need to check for
the interface descriptor type and skip anything before that.
We also need to guard against bLength == 0, which would cause an
infinite loop, instead of doing a second bDescriptorType check.
2019-03-11 08:53:53 +01:00
Thomas Faber 1946f6bb25
[USBPORT] Acquire EndpointSpinLock in addition to MiniportSpinLock in USBPORT_ReopenPipe. 2019-03-11 08:53:52 +01:00
Thomas Faber e47240fb37
[USBPORT] Release StateChangeSpinLock before acquiring MiniportSpinLock.
Found by Driver Verifier.
2019-03-11 08:53:50 +01:00
Thomas Faber 267f5633ee
[USBPORT] Leave IRP status untouched for unhandled interfaces.
Found by Driver Verifier.
2019-03-11 08:53:49 +01:00
Thomas Faber 12a66769fc
[USBPORT] Don't change the status of IRP_MJ_SYSTEM_CONTROL requests.
Found by Driver Verifier.
2019-03-11 08:53:47 +01:00
Thomas Faber e10e6a85fb
[USBHUB_NEW] Don't leak IRP_MJ_SYSTEM_CONTROL requests.
Found by Driver Verifier.
2019-03-11 08:53:45 +01:00
Pierre Schweitzer 4e07b3b9f9
[AFD] Don't reallocate buffers if windows sizes didn't change 2019-03-10 12:27:30 +01:00
Timo Kreuzer f5f6ea2965 [REACTOS] Fix 64 bit issues 2019-03-04 21:58:42 +01:00
Timo Kreuzer 403fec1b27 [SACDRV] Fix CHECK_PARAMETER_WITH_STATUS error handling macro 2019-03-04 21:58:42 +01:00
Timo Kreuzer 05f4951b8c [CDROM_NEW] Fix SLIST_ENTRY vs SINGLE_LIST_ENTRY issues 2019-03-04 21:58:42 +01:00
Timo Kreuzer dfd876a96b [CLASSPNP] Fix SLIST_ENTRY vs SINGLE_LIST_ENTRY issues 2019-03-04 21:58:42 +01:00
Thomas Faber 1001e6089f
[HDAUDBUS] Wait until the correct number of responses was received. CORE-15465
We previously only gave the device a hard-coded amount of time to respond,
which could lead to interpreting the contents of uninitialized memory as
a response. This would lead to an unreasonably large number of audio function
groups being detected.

A KSEMAPHORE mirrors what Haiku uses here, though it may not be the optimal
synchronization primitive for this case under Windows.
2019-02-28 10:27:06 +01:00
Thomas Faber 8530ae9950
[HDAUDBUS] Handle responses in a DPC instead of the ISR. 2019-02-28 10:06:18 +01:00
Thomas Faber a7431880bd
[HDAUDBUS] Fix a DPRINT. 2019-02-28 10:05:53 +01:00
Thomas Faber 1f76fb738a
[HDAUDBUS] Prevent overflow of the AudioGroups array. CORE-14153 CORE-15465
This protects against crashing in case of faulty/malicious hardware,
but also works around a bug in HDA_SendVerbs that causes it to return
invalid data, thereby suggesting more groups than are actually present.
2019-02-27 11:04:23 +01:00
Thomas Faber a8414f665b
[HDAUDBUS] Implement HDA_Unload. Stub HDA_Power and HDA_SystemControl. 2019-02-26 09:58:53 +01:00
Thomas Faber 25b22131ca
[HDAUDBUS] Correctly mask register values.
See https://github.com/haiku/haiku/blob/master/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
and https://github.com/haiku/haiku/blob/master/src/add-ons/kernel/drivers/audio/hda/driver.h#L118-L140

This fixes various device reset failures and probably other issues.
2019-02-26 09:51:48 +01:00
Thomas Faber 584baf79d9
[HDAUDBUS] Implement PDO removal. CORE-14617 2019-02-26 09:51:38 +01:00
Thomas Faber c8c0fc8d64
[HDAUDBUS] Implement FDO removal. CORE-14617 2019-02-26 09:51:21 +01:00
Thomas Faber b05e5b0340
[HDAUDBUS] Use IoForwardIrpSynchronously instead of HDA_SyncForwardIrp. 2019-02-26 09:50:50 +01:00
Thomas Faber 789cfd3ddc
[HDAUDBUS] Forward FDO requests instead of completing them. 2019-02-26 09:20:47 +01:00
Thomas Faber ce6960b3f5
[HDAUDBUS] Use a switch for minor function codes. 2019-02-26 09:20:43 +01:00
Thomas Faber 9c7c2deff9
[HDAUDBUS] Split FDO/PDO PNP handling into separate functions. 2019-02-26 09:20:37 +01:00
Thomas Faber b65ec6ffba
[HDAUDBUS] Minor fixes:
* Add some forward-declarations
* Add some annotations
* Improve a DPRINT
2019-02-26 09:18:41 +01:00
Pierre Schweitzer 86483d6e22
[AFD] Don't allow caller to set broken values to window sizes
This will avoid 0-sized allocations, or -1-sized allocations.
So far, it's maxed by hard value stored in TCPIP.sys. I believe
this is not right and would deserve a true fix
2019-02-25 22:34:28 +01:00
Pierre Schweitzer bb9eec7537
[AFD] Add default window sizes on socket creation 2019-02-25 22:34:28 +01:00
Thomas Faber 9d53c935f2
[ACPI] Update ACPICA library to version 20190215. 2019-02-17 09:51:20 +01:00
Pierre Schweitzer 24b2d59ab6
[E1000] Remove useless null check
CID 512827
2019-02-16 10:02:29 +01:00
Pierre Schweitzer e1f4d2864a
[E1000] Don't attempt to free uninitialized pointer
CID 1442660
2019-02-16 10:02:28 +01:00
Pierre Schweitzer f36cbf75e3
[FASTFAT] On volume open, update share access if volume was already open
It was never updated afterwards, leading to a totally loss of share
access information amongst callers.
2019-02-14 10:48:32 +01:00
Andrew Cook 99ec8ff00c [RAMDISK] Fix unterminated query table 2019-02-13 09:33:10 +01:00
Hermès Bélusca-Maïto 38be848f68
[USBSTOR][USBSTOR_NEW] Fix a comparison made for assigning the ScsiInquiryData->RemovableMedia flag.
Now removable drives are really reported as such.

See https://github.com/reactos/reactos/pull/308/files#r163224294
for more details.
2019-02-10 22:40:59 +01:00
Hermès Bélusca-Maïto a56a2e95a2
[DISK.SYS] Add a HACK so that we can use NT5+ NTOS functions with this NT4 driver for removable devices.
This is needed in order to avoid an infinite recursive loop between
disk!UpdateRemovableGeometry() and ntos!IoReadPartitionTable().
This does not happen with NT5+ disk_new.sys because it doesn't call
IoReadPartitionTable() in that situation.
2019-02-10 22:39:12 +01:00
Pierre Schweitzer 6295cc506e
[OOPS] That was not meant to be pushed/commited 2019-02-10 20:52:55 +01:00
Pierre Schweitzer d2c71d761e
[CRYPTEX] Add French translation 2019-02-10 20:43:14 +01:00
Serge Gautherie 17af7f0c27 [UDFS] Correctly check SeSinglePrivilegeCheck() return value
SeSinglePrivilegeCheck() returns a BOOLEAN, not a NTSTATUS.

CORE-14271
2019-02-10 10:16:55 +01:00
Victor Perevertkin d9c4d28e59 [E1000] Finished an implementation of the driver.
Added PIDs for whole Intel 8254x family.
Note: this driver uses legacy interfaces for either receive and transmit descriptors.
CORE-14675
2019-02-07 19:48:54 +01:00
Mark Jansen 1b2ca28107 [NDIS] Improve debug output 2019-02-07 19:48:54 +01:00
Mark Jansen 3606404b2e [E1000] Initial send implementation.
CORE-14675
2019-02-07 19:48:54 +01:00
Mark Jansen ebad64bcfe [E1000] Implement basic sending.
Implement some interrupt recognition

CORE-14675
2019-02-07 19:48:54 +01:00
Mark Jansen d9b0601ceb [E1000] Basic initialization of the card
Initialize some registers, allocate basic resources

CORE-14675
2019-02-07 19:48:54 +01:00
Mark Jansen 4561998a45 [E1000] Create an initial driver skeleton
Based on the rtl8139 driver written by Cameron Gutman

CORE-14675
2019-02-07 19:48:54 +01:00
Alexandr A. Telyatnikov 0c7e9684bd [UNIATA] Add AHCI revision 1.3.1
Also explicitly print current AHCI revision in debug log. CORE-15643
2019-02-02 15:47:39 +01:00
Hermès Bélusca-Maïto b6c49bdff2
[MOUNTMGR] Fix MSVC build after commit 53abbb06. 2019-01-27 16:09:54 +01:00
Hermès Bélusca-Maïto 53abbb06b5
[MOUNTMGR][MUP] Use global definition of INIT_FUNCTION/INIT_SECTION (Addendum to 71fefa32). 2019-01-27 02:40:11 +01:00
Joachim Henze 3463b2db9f [CDFS] Addendum to last commit CORE-15659
#endif placed wrong.
Thx Pierre Schweitzer, Thomas Faber, Serge Gautherie
2019-01-22 19:20:47 +01:00
Joachim Henze bccad87f3c [CDFS] Make windows gcc release build compile, regression CORE-15659 2019-01-22 18:49:51 +01:00
Pierre Schweitzer 20ddde0a97
[MOUNTMGR] Misc. fixes to QueryDeviceInformation:
- Simplify failure path for DeviceName query failure
- Don't make stable query failure fail the whole function call

Based on a patch by Vadim Galiant

CORE-15550
2019-01-20 17:38:29 +01:00
Thomas Faber 363f5f26b1
[ACPICA] Update to version 20190108. CORE-15593 2019-01-12 16:27:54 +01:00
Thomas Faber ecbd6353cc
[ACPICA] Update to version 20181213. CORE-15593 2019-01-12 16:27:42 +01:00
Thomas Faber bc002f1708
[FASTFAT] Avoid a use after free in VfatCloseFile. 2019-01-12 16:27:37 +01:00
Thomas Faber bc8307205b
[FASTFAT] Avoid a use after free in VfatCheckForDismount. 2019-01-12 16:27:30 +01:00
Pierre Schweitzer d84ab9ec7c
[MOUNTMGR] Fix buffer length checking
Found by Vadim Galiant.

CORE-15549
2019-01-03 23:12:16 +01:00
Eric Kohl 8be4a871b1 Addendum to 60f018ae: Remove obsolete DPRINTs and fix a DPRINT. 2019-01-03 21:32:33 +01:00
Eric Kohl 60f018aea6 [ACPI] Add code to retrieve packet type data from ACPI methods. This will enable the cmbatt driver to retrieve _BIF (battery information) or _BST (battery status) data. Also fix the buffer size calculation for integer and string data. 2019-01-02 23:29:12 +01:00
Pierre Schweitzer 9d0eb9b7b8
[TCPIP] Don't trust the TEB
And trust the Russian hackers to exploit that.
2019-01-02 23:02:44 +01:00
Eric Kohl 34b0516ec4 [BATTC] Fixed an oops! 2019-01-01 13:48:43 +01:00
Eric Kohl 397fa2844e [BATTC] Some tiny fixes
- Add missing parameter to a DPRINT.
- Print pointers using %p instead of %x.
- Move all executable code behind a functions initial DPRINT.
- Do not use non-trivial initializers.
- Check for NULL instead of using !.
- Add missing parentheses.
2019-01-01 13:20:41 +01:00
Eric Kohl 04524fef3b [BATTC] Fix indentation. No code changes! 2019-01-01 13:20:39 +01:00
Pierre Schweitzer f76a097a25
[TCPIP] Check buffer before dereferencing it
CID 716664
2019-01-01 10:45:48 +01:00
Pierre Schweitzer 89a4cde14a
[TCPIP] Don't assume the TEB is always defined
Fixes the crash in kmtest:TcpIpConnect test.
2018-12-31 14:00:34 +01:00
Pierre Schweitzer 96985e0746
[TCPIP] Return the SubProcessTag when enumerating connections with owner class 2018-12-31 11:19:36 +01:00
Pierre Schweitzer d98001de17
[TCPIP] Save the SubProcessTag when an ADDRESS_FILE is created 2018-12-31 11:19:35 +01:00
Hermès Bélusca-Maïto f488102c86
[CDFS] Addendum to 5429771b, 6c733856 and 3c64b4cb (r75579): When the CDFS driver is used as a fixed disk FS,
the type of device it should return must not be FILE_DEVICE_CD_ROM, but must be the actual underlying one!

This fixes recognizing *removable* USB keys as disks and not CD-ROMs.

CORE-13184
2018-12-30 15:26:43 +01:00
Timo Kreuzer 71fefa32db
[NDK][NTOS] Add global definition of INIT_FUNCTION/INIT_SECTION (#779)
* Add an NDK header to define INIT_FUNCTION/INIT_SECTION globally
* Use _declspec(allocate(x)) and _declspec(code_seg(x)) on MSVC versions that support it
* Use INIT_FUNCTION on functions only and INIT_SECTION on data only (required by MSVC)
* Place INIT_FUNCTION before the return type (required by MSVC)
* Make sure declarations and implementations share the same modifiers (required by MSVC)
* Add a global linker option to suppress warnings about defined but unused INIT section
* Merge INIT section into .text in freeldr
2018-12-30 12:19:11 +01:00
Pierre Schweitzer e6cd48809a
[BTRFS] Reduce diff with upstream
CORE-15452
2018-12-25 13:50:41 +01:00
Hermès Bélusca-Maïto cd52bbdf03
[BTRFS] Fix MSVC build. 2018-12-16 17:38:09 +01:00