- In RtlInitializeContext only set the registers required, don't offset RSP
- In KiInitializeContextThread force control segments, which are not set by RtlInitializeContext
- Allocate the stack home space in KiInitializeContextThread
- Fix BaseInitializeContext to work with the changed stack adjustments
Validate ACCESS_SYSTEM_SECURITY access requests when creating a new
handle in ObpIncrementHandleCount.
- Check for SeSecurityPrivilege (with SeSinglePrivilegeCheck) when a
caller requests ACCESS_SYSTEM_SECURITY on handle creation.
- Take away ACCESS_SYSTEM_SECURITY from RemainingDesiredAccess /
PreviouslyGrantedAccess if the privilege isn't held.
Fixed several instances where "occurred" was misspelled as "occured"
in the API and Properties documentation blocks.
Signed-off-by: Ismaeel Shaikh <[email protected]>
Corrected several spelling and grammatical errors in the HACKING guide
to improve readability for newcomers contributing to the kernel.
Signed-off-by: Ismaeel Shaikh <[email protected]>
Reject malformed DHCP subnet mask and router option lengths
before setup_adapter() consumes them.
This prevents attacker-controlled option lengths from expanding DHCP
option bytes into a fixed stack buffer while preserving valid
router address lists.
Validate the option lengths before use, keep router lists limited to
complete IPv4 addresses, and format registry IPv4 strings with
RtlIpv4AddressToStringA().
Booted amd64 QEMU image: no DHCP/client networking regression observed.
FsRtlCheckLockForReadAccess() accepts access through an exclusive
byte-range lock when the IRP key matches, even if another process
owns the lock. FsRtlFastUnlockAll() likewise removes exclusive locks
without checking the Process argument.
Require both the key and requestor process for exclusive-read access,
and skip exclusive locks owned by other processes in FsRtlFastUnlockAll().
This matches the ownership checks already used by
FsRtlFastCheckLockForRead() and FsRtlFastUnlockAllByKey().
Reference:
- https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-_fsrtl_advanced_fcb_header-fsrtlfastchecklockforread
- Tweak the dimensions of the read-only editboxes.
- Tweak the Confirmation checkbox: adjust its dimensions, remove some
artificatial newlines, and adjust the wording in some translations.
- Support double-clicking on the Installation type page radio buttons.
The Installation type page offers two self-excluding options:
"Install ReactOS", and "Upgrade an existing ReactOS installation",
and no other controls are available (except for the wizard navigation
buttons). Thus, we can implement the UI feature of supporting double-
clicked radio buttons as an abbreviation for "select + Next".
For this, add the `BS_NOTIFY` style to both radio buttons, so as to
receive the `BN_DBLCLK` notification via the `WM_COMMAND` message.
Based on a suggestion by Raymond Chen,
https://devblogs.microsoft.com/oldnewthing/20050804-10/?p=34713
- Ensure the correct radio button is selected when activating the
Installation type page:
ensure the "Install ReactOS" radio button is checked if we don't have
a selected installation (default case), which can also happen if the
user clicked on the "Do not upgrade" button on the Upgrade/Repair
selection page, then went back.
- In the Upgrade/Repair selection page, go to the next page if the user
double-clicked on a listed installation.
- In the Drives/Partitions page:
* support pressing DELETE key to delete an existing partition;
* support pressing ENTER key to install ReactOS on a eligible
partition;
* enable the "Create" partition button only if the selected disk region
is not partitioned, and can be partitioned according to the disk's
partitioning scheme (e.g. for MBR disks, no more than 4 primary
partitions).
- Explicitly check for `BN_CLICKED` notification when handling
single-click on standard push-buttons.
- Return TRUE explicitly from `WM_COMMAND` in the _dialog_ procedures
when the message is handled and no extra default processing is needed.
- Reduce some extra indentation when possible.
llvm-mingw's static runtime (libc++, libmingwex, libc++abi, libunwind)
references symbols the NT 5.2 export surface does not provide. Add a
static library, linked into the Clang runtime chain below
DLL_EXPORT_VERSION 0x601, providing:
- C99 vsnprintf/snprintf on top of _vsnprintf/_vscprintf.
- __imp_* aliases binding dllimport references to the static CRT
definitions instead of ucrtbase import thunks, which collide with
them (lld: "<sym> was replaced").
- K32EnumProcessModules, forwarded to psapi's EnumProcessModules.
- The Win7 SRW lock and Vista condition variable surface, bound to the
RTL implementation linked statically from rtl_vista. Modules get one
self-contained, consistent synchronization implementation (ReactOS'
lock layout is not Windows-compatible), no kernel32_vista.dll
dependency, and stay runnable on any Windows version. Static SRW
linking suggested by Timo Kreuzer.
Address review feedback on the llvm-compat shims:
sync_static.c now uses the proper SDK/NDK headers with WINAPI/NTAPI, imp_alias.h
moved to sdk/include/reactos and fixes the msvcrtex slot decorations too, and a
new InitOnceExecuteOnce shim lets us drop libkernel32_vista from the interface.
Fix incorrect status code returned by VBESetPowerState()
in the VBE miniport driver.
- VBESetPowerState() returned `VBE_SUCCESS` (`0x4F`, raw VESA BIOS AL
success code) instead of `NO_ERROR` on success, so callers checking for
`NO_ERROR` would treat every successful DPMS power-state change
as a failure. Change it to `NO_ERROR`.
- Change annotations to SAL2 in the source and header.
- Allow exiting from "Network Connection Details" dialog
with Enter (using DEFPUSHBUTTON), Esc and Alt+F4 (using IDCANCEL)
- Add extended style LVS_EX_FULLROWSELECT to the listview, as in Windows
Misc. changes:
- Minor code rearrange, removing one obvious comment
- Czech (cs-CZ): Fix letter capitalization
- French (fr-FR): Fix accelerator key
- Hebrew (he-IL): Fix accelerator key
CORE-12323
- Implement 3-state checkbox for the use of large icons
- Add missing registry value write on applying a scheme
- Misc: Update preview on saving "Effects" settings (for flat menus)
CORE-12905
- Move `ExpandInstallerPath()` from userinit.c to livecd.c, and update
its SAL2 annotations and Doxygen comment.
- Make `StartInstaller()` directly use the cached ReactOS installer path.
- This avoids invoking yet again `ExpandInstallerPath()` when trying to
locate the installer also for the aim of determining whether to disable
the "Install" button.
Use the standard way of checking for the existence of
the `HKLM\SYSTEM\CurrentControlSet\Control\MiniNT` key.
Addendum to commits 8fabb29ed9 and 9fa8028ae4.
MmFreeContiguousMemory() is callable at up to DISPATCH_LEVEL,
but MiFreeContiguousMemory() used PAGED_CODE(), which incorrectly asserted
above APC_LEVEL in checked builds.
Replace it with an assertion that enforces the exported IRQL contract.
IopDereferenceVpbAndFree frees a zero-reference VPB only while it is still
installed in RealDevice->Vpb. This can leave the device with a dangling
VPB pointer while detached VPBs are retained.
Reverse the identity test so only a detached, nonpersistent VPB is released
after its reference count reaches zero.
Reference:
- https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/ns-wdm-_vpb
MmUnloadSystemImage() had an explicit leak placeholder for driver images.
Implement the MmUnloadSystemImage() that performs matching teardown
for the image mappings, releasing the reserved system PTE range.
Also fix similar leak in MiLoadImageSection() by releasing image mappings
after load failures.
CORE-8294
Note that the driver images loaded at boot, which were not reloaded by
MiReloadBootLoadedDrivers(), remain at their loader-assigned addresses
and do not own system PTEs.
Remove a deprecated ERROR_FIND_SETUPDATA, which was supposed
to be removed in a7afba7703,
however it was skipped probably due to broken encoding.
Noticed in 7090cf7ebc / 7f7df51c62.