https://git.reactos.org/?p=reactos.git;a=commitdiff;h=82e6688e4da428dc1fba0…
commit 82e6688e4da428dc1fba006e5e65a2cc05a12e8e
Author: Andrei Miloiu <miloiuandrei(a)gmail.com>
AuthorDate: Sun Jan 21 22:26:30 2024 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Jan 21 21:26:30 2024 +0100
[SUBST] Update Romanian (ro-RO) translation (#6395)
---
base/system/subst/lang/ro-RO.rc | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/base/system/subst/lang/ro-RO.rc b/base/system/subst/lang/ro-RO.rc
index ca3ba4ff97e..3e86b424b49 100644
--- a/base/system/subst/lang/ro-RO.rc
+++ b/base/system/subst/lang/ro-RO.rc
@@ -1,4 +1,10 @@
-/* Translator: Ștefan Fulea (stefan dot fulea at mail dot com) */
+/*
+ * PROJECT: ReactOS Subst Command
+ * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
+ * PURPOSE: Romanian resource file
+ * TRANSLATORS: Copyright 2011-2018 Ștefan Fulea <stefan.fulea(a)mail.com>
+ * Copyright 2024 Andrei Miloiu <miloiuandrei(a)gmail.com>
+ */
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -8,15 +14,15 @@ BEGIN
IDS_INVALID_PARAMETER "Număr eronat de parametri - %s\n"
IDS_INVALID_PARAMETER2 "Parametru eronat - %s\n"
IDS_PATH_NOT_FOUND "Cale inexistentă - %s\n"
- IDS_ACCESS_DENIED "Acces respins - %s\n"
- IDS_DRIVE_ALREADY_SUBSTED "Unitatea este deja SUBSTituită\n"
+ IDS_ACCESS_DENIED "Acces interzis - %s\n"
+ IDS_DRIVE_ALREADY_SUBSTED "Discul este deja SUBSTituit\n"
IDS_FAILED_WITH_ERRORCODE "Operația a eșuat. Codul de eroare 0x%x: %s\n"
- IDS_USAGE "Substituie un director cu o unitate de stocare.\n\n\
-SUBST [unitate1: [unitate2:]cale]\n\
-SUBST unitate1: /D\n\n\
- unitate1: Unitatea virtuală ce va fi asociată directorului.\n\
- [unitate:]cale Unitatea fizică și calea directorului substituit\n\
- cu unitatea virtuală.\n\
- /D șterge o unitate (virtuală) de substituție.\n\n\
-Tastați SUBST fără argumente pentru a enumera unitățile virtuale curente.\n"
+ IDS_USAGE "Asociază o cale cu o literă de disc.\n\n\
+SUBST [disc1: [disc2:]cale]\n\
+SUBST disc1: /D\n\n\
+ disc1: Discul virtual ce va fi asociat directorului.\n\
+ [disc:]cale Discul fizic și calea directorului substituit\n\
+ cu discul virtual.\n\
+ /D șterge un disc (virtual) de substituție.\n\n\
+Tastați SUBST fără argumente pentru a enumera discurile virtuale curente.\n"
END
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=748a2e165534e107492a2…
commit 748a2e165534e107492a2c97c231deb3e5d79bbc
Author: Justin Miller <justin.miller(a)reactos.org>
AuthorDate: Sat Jan 20 08:59:13 2024 -0800
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Jan 20 08:59:13 2024 -0800
[NTOS] Fix boot on UP build - PrcbLocks are not used on UP (#6391)
On the uniprocessor kernel KiAcquirePrcbLock is a stub that doesn't modify the current Prcb's PrcbLock value.
Quickly protect this assert around CONFIG_SMP
---
ntoskrnl/include/internal/ke_x.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ntoskrnl/include/internal/ke_x.h b/ntoskrnl/include/internal/ke_x.h
index fcf3edb2786..ae431649773 100644
--- a/ntoskrnl/include/internal/ke_x.h
+++ b/ntoskrnl/include/internal/ke_x.h
@@ -1359,7 +1359,9 @@ KxQueueReadyThread(IN PKTHREAD Thread,
/* Sanity checks */
ASSERT(Prcb == KeGetCurrentPrcb());
+#ifdef CONFIG_SMP
ASSERT(Prcb->PrcbLock != 0);
+#endif
ASSERT(Thread->State == Running);
ASSERT(Thread->NextProcessor == Prcb->Number);
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ab528ac6ae105b19d4575…
commit ab528ac6ae105b19d457587dc680d8016720bc3d
Author: Oleg Dubinskiy <oleg.dubinskij30(a)gmail.com>
AuthorDate: Sat Jan 20 15:58:39 2024 +0100
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Jan 20 15:58:39 2024 +0100
[NTOS:KE] Acquire PRCB lock before marking thread ready for execution in dispatch interrupt routine (#6387)
Fixed in x86 and ARM (this was already done in x64).
This is needed because thread preparation routine KxQueueReadyThread()
releases PRCB lock, but does not acquire it, so that the locking must
always be done outside the function, same as in all its other usage cases.
This fixes an assert from release PRCB routine, when booting x86 ReactOS
in SMP mode, because it attempts to release the lock when it is not
actually acquired.
Addendum to commit a011d19ed.
+ Add an assert in KxQueueReadyThread() to ensure the PRCB lock is actually acquired.
---
ntoskrnl/include/internal/ke_x.h | 1 +
ntoskrnl/ke/arm/thrdini.c | 3 +++
ntoskrnl/ke/i386/thrdini.c | 3 +++
3 files changed, 7 insertions(+)
diff --git a/ntoskrnl/include/internal/ke_x.h b/ntoskrnl/include/internal/ke_x.h
index 70fa05e1d12..fcf3edb2786 100644
--- a/ntoskrnl/include/internal/ke_x.h
+++ b/ntoskrnl/include/internal/ke_x.h
@@ -1359,6 +1359,7 @@ KxQueueReadyThread(IN PKTHREAD Thread,
/* Sanity checks */
ASSERT(Prcb == KeGetCurrentPrcb());
+ ASSERT(Prcb->PrcbLock != 0);
ASSERT(Thread->State == Running);
ASSERT(Thread->NextProcessor == Prcb->Number);
diff --git a/ntoskrnl/ke/arm/thrdini.c b/ntoskrnl/ke/arm/thrdini.c
index 190b73f926c..c32b39c392d 100644
--- a/ntoskrnl/ke/arm/thrdini.c
+++ b/ntoskrnl/ke/arm/thrdini.c
@@ -334,6 +334,9 @@ KiDispatchInterrupt(VOID)
}
else if (Prcb->NextThread)
{
+ /* Acquire the PRCB lock */
+ KiAcquirePrcbLock(Prcb);
+
/* Capture current thread data */
OldThread = Prcb->CurrentThread;
NewThread = Prcb->NextThread;
diff --git a/ntoskrnl/ke/i386/thrdini.c b/ntoskrnl/ke/i386/thrdini.c
index 3214f560872..91e8ad3931f 100644
--- a/ntoskrnl/ke/i386/thrdini.c
+++ b/ntoskrnl/ke/i386/thrdini.c
@@ -495,6 +495,9 @@ KiDispatchInterrupt(VOID)
}
else if (Prcb->NextThread)
{
+ /* Acquire the PRCB lock */
+ KiAcquirePrcbLock(Prcb);
+
/* Capture current thread data */
OldThread = Prcb->CurrentThread;
NewThread = Prcb->NextThread;
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f72d6dd4c5071a7c16d0b…
commit f72d6dd4c5071a7c16d0bd842d8ff7bd2549ea4a
Author: Oleg Dubinskiy <oleg.dubinskij30(a)gmail.com>
AuthorDate: Sat Jan 20 15:55:20 2024 +0100
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Jan 20 15:55:20 2024 +0100
[NTOS:KE] Set IRQL to SYNCH_LEVEL when exiting from idle after the thread is ready for execution (#6386)
CORE-1697
Raise IRQL to SYNCH_LEVEL when exiting from the idle thread in the
idle loop, in case it is scheduled for execution. Then restore it
back to DISPATCH_LEVEL, after this is done.
This behaviour is a bit similar to the way it's done on x64.
This IRQL raise is necessary only in SMP builds.
Calls are placed in CONFIG_SMP ifdef: this avoids unnecessary IRQL
changes on UP, since SYNCH_LEVEL and DISPATCH_LEVEL are identical
there, unlike in MP, where SYNCH_LEVEL is IPI_LEVEL - 2 actually.
This prevents bugcheck DRIVER_IRQL_NOT_LESS_OR_EQUAL when booting
SMP x86 ReactOS, in KiTimerExpiration when calling it 2nd time.
The BSOD happened due to IRQL levels mismatch.
---
ntoskrnl/ke/amd64/stubs.c | 4 ++++
ntoskrnl/ke/arm/thrdini.c | 10 ++++++++++
ntoskrnl/ke/i386/thrdini.c | 10 ++++++++++
3 files changed, 24 insertions(+)
diff --git a/ntoskrnl/ke/amd64/stubs.c b/ntoskrnl/ke/amd64/stubs.c
index cb2d4a37248..7326f7a2cd0 100644
--- a/ntoskrnl/ke/amd64/stubs.c
+++ b/ntoskrnl/ke/amd64/stubs.c
@@ -139,14 +139,18 @@ KiIdleLoop(VOID)
/* The thread is now running */
NewThread->State = Running;
+#ifdef CONFIG_SMP
/* Do the swap at SYNCH_LEVEL */
KfRaiseIrql(SYNCH_LEVEL);
+#endif
/* Switch away from the idle thread */
KiSwapContext(APC_LEVEL, OldThread);
+#ifdef CONFIG_SMP
/* Go back to DISPATCH_LEVEL */
KeLowerIrql(DISPATCH_LEVEL);
+#endif
}
else
{
diff --git a/ntoskrnl/ke/arm/thrdini.c b/ntoskrnl/ke/arm/thrdini.c
index 89f1664608b..190b73f926c 100644
--- a/ntoskrnl/ke/arm/thrdini.c
+++ b/ntoskrnl/ke/arm/thrdini.c
@@ -193,8 +193,18 @@ KiIdleLoop(VOID)
/* The thread is now running */
NewThread->State = Running;
+#ifdef CONFIG_SMP
+ /* Do the swap at SYNCH_LEVEL */
+ KfRaiseIrql(SYNCH_LEVEL);
+#endif
+
/* Switch away from the idle thread */
KiSwapContext(APC_LEVEL, OldThread);
+
+#ifdef CONFIG_SMP
+ /* Go back to DISPATCH_LEVEL */
+ KeLowerIrql(DISPATCH_LEVEL);
+#endif
}
else
{
diff --git a/ntoskrnl/ke/i386/thrdini.c b/ntoskrnl/ke/i386/thrdini.c
index cfc497bfc69..3214f560872 100644
--- a/ntoskrnl/ke/i386/thrdini.c
+++ b/ntoskrnl/ke/i386/thrdini.c
@@ -300,8 +300,18 @@ KiIdleLoop(VOID)
/* The thread is now running */
NewThread->State = Running;
+#ifdef CONFIG_SMP
+ /* Do the swap at SYNCH_LEVEL */
+ KfRaiseIrql(SYNCH_LEVEL);
+#endif
+
/* Switch away from the idle thread */
KiSwapContext(APC_LEVEL, OldThread);
+
+#ifdef CONFIG_SMP
+ /* Go back to DISPATCH_LEVEL */
+ KeLowerIrql(DISPATCH_LEVEL);
+#endif
}
else
{
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=feb67576ddf09b847c6ec…
commit feb67576ddf09b847c6ecf7b8fd9675ccf74e11c
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Thu Dec 14 22:02:58 2023 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Jan 17 22:13:03 2024 +0100
[NTOS:CM][CMLIB] In PE mode, allow registry hives (except system ones) to use read/write access.
+ Improve related comments.
Registry hives are opened in shared read access when NT is loaded in PE
mode (MININT) or from network (the hives residing on a network share).
This is true in particular for the main system hives (SYSTEM, SOFTWARE,
DEFAULT, ...).
However, in PE mode, we can allow other hives, e.g. those loaded by the
user (with NtLoadKey) to be loaded with full read/write access, since we
boot from a local computer.
---
ntoskrnl/config/cmdata.c | 7 +++++--
ntoskrnl/config/cmlazy.c | 7 ++++++-
ntoskrnl/config/cmsysini.c | 10 ++++------
sdk/lib/cmlib/hivewrt.c | 33 ++++++++-------------------------
4 files changed, 23 insertions(+), 34 deletions(-)
diff --git a/ntoskrnl/config/cmdata.c b/ntoskrnl/config/cmdata.c
index 80c91534b44..693c9ac7b26 100644
--- a/ntoskrnl/config/cmdata.c
+++ b/ntoskrnl/config/cmdata.c
@@ -54,11 +54,14 @@ UNICODE_STRING CmSymbolicLinkValueName =
UNICODE_STRING CmpLoadOptions;
+/* TRUE if the system hives must be loaded in shared mode */
BOOLEAN CmpShareSystemHives;
-BOOLEAN CmSelfHeal = TRUE;
-BOOLEAN CmpSelfHeal = TRUE;
+/* TRUE when the registry is in PE mode */
BOOLEAN CmpMiniNTBoot;
+
ULONG CmpBootType;
+BOOLEAN CmSelfHeal = TRUE;
+BOOLEAN CmpSelfHeal = TRUE;
USHORT CmpUnknownBusCount;
ULONG CmpTypeCount[MaximumType + 1];
diff --git a/ntoskrnl/config/cmlazy.c b/ntoskrnl/config/cmlazy.c
index 6c128cb3954..ebac8a20532 100644
--- a/ntoskrnl/config/cmlazy.c
+++ b/ntoskrnl/config/cmlazy.c
@@ -261,9 +261,14 @@ CmpCmdInit(IN BOOLEAN SetupBoot)
/* Testing: Force Lazy Flushing */
CmpHoldLazyFlush = FALSE;
- /* Setup the hive list if this is not a Setup boot */
+ /* Setup the system hives list if this is not a Setup boot */
if (!SetupBoot)
CmpInitializeHiveList();
+
+ /* Now that the system hives are loaded, if we are in PE mode,
+ * all other hives will be loaded with full access */
+ if (CmpMiniNTBoot)
+ CmpShareSystemHives = FALSE;
}
NTSTATUS
diff --git a/ntoskrnl/config/cmsysini.c b/ntoskrnl/config/cmsysini.c
index 50283132745..d401c726e1b 100644
--- a/ntoskrnl/config/cmsysini.c
+++ b/ntoskrnl/config/cmsysini.c
@@ -332,7 +332,7 @@ CmpInitHiveFromFile(IN PCUNICODE_STRING HiveName,
*New = FALSE;
}
- /* Check if we're sharing hives */
+ /* Check if the system hives are opened in shared mode */
if (CmpShareSystemHives)
{
/* Then force using the primary hive */
@@ -928,11 +928,9 @@ CmpInitializeSystemHive(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
if (!RtlCreateUnicodeString(&SystemHive->FileFullPath, L"\\SystemRoot\\System32\\Config\\SYSTEM"))
return FALSE;
- /* Manually set the hive as volatile, if in Live CD mode */
+ /* Load the system hive as volatile, if opened in shared mode */
if (HiveBase && CmpShareSystemHives)
- {
SystemHive->Hive.HiveFlags = HIVE_VOLATILE;
- }
/* Save the boot type */
CmpBootType = SystemHive->Hive.BaseBlock->BootType;
@@ -1508,7 +1506,7 @@ CmpInitializeHiveList(VOID)
/* Make sure the list is set up */
ASSERT(CmpMachineHiveList[i].Name != NULL);
- /* Load the hive as volatile, if in LiveCD mode */
+ /* Load this root hive as volatile, if opened in shared mode */
if (CmpShareSystemHives)
CmpMachineHiveList[i].HHiveFlags |= HIVE_VOLATILE;
@@ -1630,7 +1628,7 @@ CmInitSystem1(VOID)
/* Check if this is PE-boot */
if (InitIsWinPEMode)
{
- /* Set registry to PE mode */
+ /* Set the registry in PE mode and load the system hives in shared mode */
CmpMiniNTBoot = TRUE;
CmpShareSystemHives = TRUE;
}
diff --git a/sdk/lib/cmlib/hivewrt.c b/sdk/lib/cmlib/hivewrt.c
index eff699ac876..c4fe4d4059d 100644
--- a/sdk/lib/cmlib/hivewrt.c
+++ b/sdk/lib/cmlib/hivewrt.c
@@ -21,11 +21,7 @@ IoSetThreadHardErrorMode(
_In_ BOOLEAN HardErrorEnabled);
#endif
-/* GLOBALS *****************************************************************/
-
-#if !defined(CMLIB_HOST) && !defined(_BLDR_)
-extern BOOLEAN CmpMiniNTBoot;
-#endif
+/* GLOBALS ******************************************************************/
/* PRIVATE FUNCTIONS ********************************************************/
@@ -477,6 +473,13 @@ HvSyncHive(
ASSERT(!RegistryHive->ReadOnly);
ASSERT(RegistryHive->Signature == HV_HHIVE_SIGNATURE);
+ /* Avoid any write operations on volatile hives */
+ if (RegistryHive->HiveFlags & HIVE_VOLATILE)
+ {
+ DPRINT("Hive 0x%p is volatile\n", RegistryHive);
+ return TRUE;
+ }
+
/*
* Check if there's any dirty data in the vector.
* A space with clean blocks would be pointless for
@@ -490,26 +493,6 @@ HvSyncHive(
return TRUE;
}
- /*
- * We are either in Live CD or we are sharing hives.
- * In either of the cases, hives can only be read
- * so don't do any writing operations on them.
- */
-#if !defined(CMLIB_HOST) && !defined(_BLDR_)
- if (CmpMiniNTBoot)
- {
- DPRINT("We are sharing hives or in Live CD mode, abort syncing\n");
- return TRUE;
- }
-#endif
-
- /* Avoid any writing operations on volatile hives */
- if (RegistryHive->HiveFlags & HIVE_VOLATILE)
- {
- DPRINT("The hive is volatile (hive 0x%p)\n", RegistryHive);
- return TRUE;
- }
-
#if !defined(CMLIB_HOST) && !defined(_BLDR_)
/* Disable hard errors before syncing the hive */
HardErrors = IoSetThreadHardErrorMode(FALSE);