Hermès BÉLUSCA - MAÏTO | 13 Jul 18:49 2014
Picon

Re: [ros-diffs] [ekohl] 63713: [BOOTDATA] Add / enable NLS settings for Arabic, Azeri, Kyrgyz, Latvian, Tatar and Uzbek. CORE-8348 #resolve

Hello Eric,

Are those changes (mentioned below) necessary for NLS settings ?

Cheers,
Hermès.

------------------------------------------------------------- 

Author: ekohl
Date: Sun Jul 13 16:40:44 2014
New Revision: 63713

URL: http://svn.reactos.org/svn/reactos?rev=63713&view=rev
Log:
[BOOTDATA]
Add / enable NLS settings for Arabic, Azeri, Kyrgyz, Latvian, Tatar and
Uzbek.

CORE-8348 #resolve

Modified:
    trunk/reactos/boot/bootdata/hivesys.inf

Modified: trunk/reactos/boot/bootdata/hivesys.inf
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys.inf?r
ev=63713&r1=63712&r2=63713&view=diff
============================================================================
==
(Continue reading)

victor martinez | 10 Jul 11:51 2014
Picon

ReactOS featured in RedUsers

Hi guys!

Good news!
ReactOS has been featured in RedUsers, one of the best southamerican IT blogs.
http://www.redusers.com/noticias/entrevista-reactos-clon-windows-open-source/

Of course it has spread fast as powder around all blogs there:
http://goo.gl/BovDKU

Hopefuly tomorrow I will have the Shop online and running (we can't miss the strike!) with my account or the German one, whatever happens first.
Cool USBs ReactOS Community Special Edition! You can't miss it!

Best regards,

Victor



_______________________________________________
Ros-dev mailing list
Ros-dev@...
http://www.reactos.org/mailman/listinfo/ros-dev
Alex Ionescu | 8 Jul 21:58 2014
Picon

Re: [ros-diffs] [jgardou] 63700: [NTOSKRNL] - Use ZwSetValueKey instead of NtSetValueKey - Properly probe and copy parameters when NtSetValueKey is called from UMode CORE-7738 #resolve #comment fixed in r63700

Calling Nt in those functions was by design, and is how Windows does it as well. I can explain Nt vs Zw (for the 100th time) as needed, but for now, I'd kindly ask for a revert please.

Second, the new code does not conform to formatting and style guidelines. Please fix the code before comitting.

Best regards,
Alex Ionescu


On Tue, Jul 8, 2014 at 11:42 AM, <jgardou <at> svn.reactos.org> wrote:
Author: jgardou
Date: Tue Jul  8 18:42:20 2014
New Revision: 63700

URL: http://svn.reactos.org/svn/reactos?rev=63700&view=rev
Log:
[NTOSKRNL]
 - Use ZwSetValueKey instead of NtSetValueKey
 - Properly probe and copy parameters when NtSetValueKey is called from UMode
CORE-7738 #resolve #comment fixed in r63700

Modified:
    trunk/reactos/ntoskrnl/config/cmconfig.c
    trunk/reactos/ntoskrnl/config/cmsysini.c
    trunk/reactos/ntoskrnl/config/i386/cmhardwr.c
    trunk/reactos/ntoskrnl/config/ntapi.c
    trunk/reactos/ntoskrnl/config/powerpc/cmhardwr.c
    trunk/reactos/ntoskrnl/ex/init.c
    trunk/reactos/ntoskrnl/io/iomgr/bootlog.c

Modified: trunk/reactos/ntoskrnl/config/cmconfig.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmconfig.c?rev=63700&r1=63699&r2=63700&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmconfig.c    [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmconfig.c    [iso-8859-1] Tue Jul  8 18:42:20 2014
<at> <at> -97,7 +97,7 <at> <at>

     /* Setup the component information key */
     RtlInitUnicodeString(&ValueName, L"Component Information");
-    Status = NtSetValueKey(KeyHandle,
+    Status = ZwSetValueKey(KeyHandle,
                            &ValueName,
                            0,
                            REG_BINARY,
<at> <at> -124,7 +124,7 <at> <at>
         if (NT_SUCCESS(Status))
         {
             /* Save the identifier in the registry */
-            Status = NtSetValueKey(KeyHandle,
+            Status = ZwSetValueKey(KeyHandle,
                                    &ValueName,
                                    0,
                                    REG_SZ,
<at> <at> -178,7 +178,7 <at> <at>
     CmpConfigurationData->BusNumber = BusNumber;

     /* Save the actual data */
-    Status = NtSetValueKey(KeyHandle,
+    Status = ZwSetValueKey(KeyHandle,
                            &ValueName,
                            0,
                            REG_FULL_RESOURCE_DESCRIPTOR,

Modified: trunk/reactos/ntoskrnl/config/cmsysini.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmsysini.c?rev=63700&r1=63699&r2=63700&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmsysini.c    [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmsysini.c    [iso-8859-1] Tue Jul  8 18:42:20 2014
<at> <at> -416,7 +416,7 <at> <at>

     /* Key opened, now write to the key */
     RtlInitUnicodeString(&KeyName, L"SystemStartOptions");
-    Status = NtSetValueKey(KeyHandle,
+    Status = ZwSetValueKey(KeyHandle,
                            &KeyName,
                            0,
                            REG_SZ,
<at> <at> -427,7 +427,7 <at> <at>
     /* Setup value name for system boot device in ARC format */
     RtlInitUnicodeString(&KeyName, L"SystemBootDevice");
     RtlCreateUnicodeStringFromAsciiz(&ValueName, LoaderBlock->ArcBootDeviceName);
-    Status = NtSetValueKey(KeyHandle,
+    Status = ZwSetValueKey(KeyHandle,
                            &KeyName,
                            0,
                            REG_SZ,
<at> <at> -474,7 +474,7 <at> <at>
                                OBJ_CASE_INSENSITIVE,
                                NULL,
                                NULL);
-    Status = NtOpenKey(&SelectHandle, KEY_READ, &ObjectAttributes);
+    Status = ZwOpenKey(&SelectHandle, KEY_READ, &ObjectAttributes);
     if (!NT_SUCCESS(Status))
     {
         /* ReactOS Hack: Hard-code current to 001 for SetupLdr */
<at> <at> -488,16 +488,17 <at> <at>
                                        OBJ_CASE_INSENSITIVE,
                                        NULL,
                                        NULL);
-            Status = NtCreateKey(&KeyHandle,
+            Status = ZwCreateKey(&KeyHandle,
                                  KEY_ALL_ACCESS,
                                  &ObjectAttributes,
                                  0,
                                  NULL,
                                  0,
                                  &Disposition);
-            if (!NT_SUCCESS(Status)) return Status;
-
-            /* Don't need the handle */
+            if (!NT_SUCCESS(Status))
+                return Status;
+
+            /* We don't need the handle */
             ZwClose(KeyHandle);

             /* Use hard-coded setting */
<at> <at> -533,7 +534,7 <at> <at>
                                OBJ_CASE_INSENSITIVE,
                                NULL,
                                NULL);
-    Status = NtCreateKey(&KeyHandle,
+    Status = ZwCreateKey(&KeyHandle,
                          KEY_CREATE_LINK,
                          &ObjectAttributes,
                          0,
<at> <at> -557,7 +558,7 <at> <at>
     Status = RtlAnsiStringToUnicodeString(&KeyName, &TempString, FALSE);

     /* Set the value */
-    Status = NtSetValueKey(KeyHandle,
+    Status = ZwSetValueKey(KeyHandle,
                            &CmSymbolicLinkValueName,
                            0,
                            REG_LINK,
<at> <at> -572,7 +573,7 <at> <at>
                                KeyHandle,
                                NULL);
     Status = NtOpenKey(&ConfigHandle, KEY_READ, &ObjectAttributes);
-    NtClose(KeyHandle);
+    ZwClose(KeyHandle);

     /* Check if we don't have one */
     if (!NT_SUCCESS(Status))
<at> <at> -689,7 +690,7 <at> <at>
         ASSERT(STATUS_SUCCESS == Status);

         /* Set it */
-        Status = NtSetValueKey(KeyHandle,
+        Status = ZwSetValueKey(KeyHandle,
                                &CmSymbolicLinkValueName,
                                0,
                                REG_LINK,
<at> <at> -2180,7 +2181,7 <at> <at>
     RtlInitUnicodeString(&ValueData,
                          Buffer);

-    NtSetValueKey(CurrentVersionKeyHandle,
+    ZwSetValueKey(CurrentVersionKeyHandle,
                   &ValueName,
                   0,
                   REG_SZ,

Modified: trunk/reactos/ntoskrnl/config/i386/cmhardwr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/i386/cmhardwr.c?rev=63700&r1=63699&r2=63700&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/config/i386/cmhardwr.c       [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/i386/cmhardwr.c       [iso-8859-1] Tue Jul  8 18:42:20 2014
<at> <at> -268,7 +268,7 <at> <at>

         /* Set the value */
         RtlInitUnicodeString(&ValueName, L"PhysicalAddressExtension");
-        NtSetValueKey(KeyHandle,
+        ZwSetValueKey(KeyHandle,
                       &ValueName,
                       0,
                       REG_DWORD,
<at> <at> -463,7 +463,7 <at> <at>

                     /* Add it to the registry */
                     RtlInitUnicodeString(&ValueName, L"ProcessorNameString");
-                    Status = NtSetValueKey(KeyHandle,
+                    Status = ZwSetValueKey(KeyHandle,
                                            &ValueName,
                                            0,
                                            REG_SZ,
<at> <at> -486,7 +486,7 <at> <at>

                     /* Add it to the registry */
                     RtlInitUnicodeString(&ValueName, L"VendorIdentifier");
-                    Status = NtSetValueKey(KeyHandle,
+                    Status = ZwSetValueKey(KeyHandle,
                                            &ValueName,
                                            0,
                                            REG_SZ,
<at> <at> -502,7 +502,7 <at> <at>
                 {
                     /* Add them to the registry */
                     RtlInitUnicodeString(&ValueName, L"FeatureSet");
-                    Status = NtSetValueKey(KeyHandle,
+                    Status = ZwSetValueKey(KeyHandle,
                                            &ValueName,
                                            0,
                                            REG_DWORD,
<at> <at> -515,7 +515,7 <at> <at>
                 {
                     /* Add it to the registry */
                     RtlInitUnicodeString(&ValueName, L"~MHz");
-                    Status = NtSetValueKey(KeyHandle,
+                    Status = ZwSetValueKey(KeyHandle,
                                            &ValueName,
                                            0,
                                            REG_DWORD,
<at> <at> -528,7 +528,7 <at> <at>
                 {
                     /* Add it to the registry */
                     RtlInitUnicodeString(&ValueName, L"Update Signature");
-                    Status = NtSetValueKey(KeyHandle,
+                    Status = ZwSetValueKey(KeyHandle,
                                            &ValueName,
                                            0,
                                            REG_BINARY,
<at> <at> -621,7 +621,7 <at> <at>

             /* Write the date into the registry */
             RtlInitUnicodeString(&ValueName, L"SystemBiosDate");
-            Status = NtSetValueKey(SystemHandle,
+            Status = ZwSetValueKey(SystemHandle,
                                    &ValueName,
                                    0,
                                    REG_SZ,
<at> <at> -643,7 +643,7 <at> <at>
                 if (NT_SUCCESS(Status))
                 {
                     /* Save it to the registry */
-                    Status = NtSetValueKey(BiosHandle,
+                    Status = ZwSetValueKey(BiosHandle,
                                            &ValueName,
                                            0,
                                            REG_SZ,
<at> <at> -703,7 +703,7 <at> <at>

                 /* Write the BIOS Version to the registry */
                 RtlInitUnicodeString(&ValueName, L"SystemBiosVersion");
-                Status = NtSetValueKey(SystemHandle,
+                Status = ZwSetValueKey(SystemHandle,
                                        &ValueName,
                                        0,
                                        REG_MULTI_SZ,
<at> <at> -746,7 +746,7 <at> <at>

             /* Write the date into the registry */
             RtlInitUnicodeString(&ValueName, L"VideoBiosDate");
-            Status = NtSetValueKey(SystemHandle,
+            Status = ZwSetValueKey(SystemHandle,
                                    &ValueName,
                                    0,
                                    REG_SZ,
<at> <at> -801,7 +801,7 <at> <at>

                 /* Write the BIOS Version to the registry */
                 RtlInitUnicodeString(&ValueName, L"VideoBiosVersion");
-                Status = NtSetValueKey(SystemHandle,
+                Status = ZwSetValueKey(SystemHandle,
                                        &ValueName,
                                        0,
                                        REG_MULTI_SZ,

Modified: trunk/reactos/ntoskrnl/config/ntapi.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/ntapi.c?rev=63700&r1=63699&r2=63700&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/config/ntapi.c       [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/ntapi.c       [iso-8859-1] Tue Jul  8 18:42:20 2014
<at> <at> -33,7 +33,10 <at> <at>
     CM_PARSE_CONTEXT ParseContext = {0};
     HANDLE Handle;
     PAGED_CODE();
-    DPRINT("NtCreateKey(OB name %wZ)\n", ObjectAttributes->ObjectName);
+
+    DPRINT("NtCreateKey(Path: %wZ, Root %x, Access: %x, CreateOptions %x)\n",
+            ObjectAttributes->ObjectName, ObjectAttributes->RootDirectory,
+            DesiredAccess, CreateOptions);

     /* Check for user-mode caller */
     if (PreviousMode != KernelMode)
<at> <at> -60,7 +63,8 <at> <at>
                          sizeof(OBJECT_ATTRIBUTES),
                          sizeof(ULONG));

-            if (Disposition) ProbeForWriteUlong(Disposition);
+            if (Disposition)
+                ProbeForWriteUlong(Disposition);
         }
         _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
         {
<at> <at> -101,6 +105,8 <at> <at>
     }
     _SEH2_END;

+    DPRINT("Returning handle %x, Status %x.\n", Handle, Status);
+
     /* Return status */
     return Status;
 }
<at> <at> -116,7 +122,8 <at> <at>
     NTSTATUS Status;
     KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
     PAGED_CODE();
-    DPRINT("NtOpenKey(OB 0x%wZ)\n", ObjectAttributes->ObjectName);
+    DPRINT("NtOpenKey(Path: %wZ, Root %x, Access: %x)\n",
+            ObjectAttributes->ObjectName, ObjectAttributes->RootDirectory, DesiredAccess);

     /* Check for user-mode caller */
     if (PreviousMode != KernelMode)
<at> <at> -166,6 +173,8 <at> <at>
         _SEH2_END;
     }

+    DPRINT("Returning handle %x, Status %x.\n", Handle, Status);
+
     /* Return status */
     return Status;
 }
<at> <at> -301,6 +310,7 <at> <at>

     /* Dereference and return status */
     ObDereferenceObject(KeyObject);
+    DPRINT("Returning status %x.\n", Status);
     return Status;
 }

<at> <at> -604,14 +614,52 <at> <at>
               IN PVOID Data,
               IN ULONG DataSize)
 {
-    NTSTATUS Status;
-    PCM_KEY_BODY KeyObject;
+    NTSTATUS Status = STATUS_SUCCESS;
+    PCM_KEY_BODY KeyObject = NULL;
     REG_SET_VALUE_KEY_INFORMATION SetValueKeyInfo;
     REG_POST_OPERATION_INFORMATION PostOperationInfo;
-    UNICODE_STRING ValueNameCopy = *ValueName;
+    UNICODE_STRING ValueNameCopy;
+    KPROCESSOR_MODE PreviousMode;
+
     PAGED_CODE();
+
+    PreviousMode = ExGetPreviousMode();
+
+    if (Data && !DataSize)
+        return STATUS_INVALID_PARAMETER;
+
+    /* Probe and copy the data */
+    if ((PreviousMode != KernelMode) && Data)
+    {
+        PVOID DataCopy = ExAllocatePoolWithTag(PagedPool, DataSize, TAG_CM);
+        if (!DataCopy)
+            return STATUS_NO_MEMORY;
+        _SEH2_TRY
+        {
+            ProbeForRead(Data, DataSize, 1);
+            RtlCopyMemory(DataCopy, Data, DataSize);
+        }
+        _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+        {
+            Status = _SEH2_GetExceptionCode();
+        }
+        _SEH2_END;
+
+        if (!NT_SUCCESS(Status))
+        {
+            ExFreePoolWithTag(DataCopy, TAG_CM);
+            return Status;
+        }
+        Data = DataCopy;
+    }
+
+    /* Capture the string */
+    Status = ProbeAndCaptureUnicodeString(&ValueNameCopy, PreviousMode, ValueName);
+    if (!NT_SUCCESS(Status))
+        goto end;
+
     DPRINT("NtSetValueKey() KH 0x%p, VN '%wZ', TI %x, T %lu, DS %lu\n",
-        KeyHandle, ValueName, TitleIndex, Type, DataSize);
+        KeyHandle, &ValueNameCopy, TitleIndex, Type, DataSize);

     /* Verify that the handle is valid and is a registry key */
     Status = ObReferenceObjectByHandle(KeyHandle,
<at> <at> -620,7 +668,8 <at> <at>
                                        ExGetPreviousMode(),
                                        (PVOID*)&KeyObject,
                                        NULL);
-    if (!NT_SUCCESS(Status)) return Status;
+    if (!NT_SUCCESS(Status))
+        goto end;

     /* Make sure the name is aligned, not too long, and the data under 4GB */
     if ( (ValueNameCopy.Length > 32767) ||
<at> <at> -628,8 +677,8 <at> <at>
          (DataSize > 0x80000000))
     {
         /* Fail */
-        ObDereferenceObject(KeyObject);
-        return STATUS_INVALID_PARAMETER;
+        Status = STATUS_INVALID_PARAMETER;
+        goto end;
     }

     /* Ignore any null characters at the end */
<at> <at> -644,14 +693,14 <at> <at>
     if (KeyObject->KeyControlBlock->ExtFlags & CM_KCB_READ_ONLY_KEY)
     {
         /* Fail */
-        ObDereferenceObject(KeyObject);
-        return STATUS_ACCESS_DENIED;
+        Status = STATUS_ACCESS_DENIED;
+        goto end;
     }

     /* Setup callback */
     PostOperationInfo.Object = (PVOID)KeyObject;
     SetValueKeyInfo.Object = (PVOID)KeyObject;
-    SetValueKeyInfo.ValueName = ValueName;
+    SetValueKeyInfo.ValueName = &ValueNameCopy;
     SetValueKeyInfo.TitleIndex = TitleIndex;
     SetValueKeyInfo.Type = Type;
     SetValueKeyInfo.Data = Data;
<at> <at> -673,8 +722,13 <at> <at>
     PostOperationInfo.Status = Status;
     CmiCallRegisteredCallbacks(RegNtPostSetValueKey, &PostOperationInfo);

+end:
     /* Dereference and return status */
-    ObDereferenceObject(KeyObject);
+    if (KeyObject)
+        ObDereferenceObject(KeyObject);
+    ReleaseCapturedUnicodeString(&ValueNameCopy, PreviousMode);
+    if ((PreviousMode != KernelMode) && Data)
+        ExFreePoolWithTag(Data, TAG_CM);
     return Status;
 }


Modified: trunk/reactos/ntoskrnl/config/powerpc/cmhardwr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/powerpc/cmhardwr.c?rev=63700&r1=63699&r2=63700&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/config/powerpc/cmhardwr.c    [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/powerpc/cmhardwr.c    [iso-8859-1] Tue Jul  8 18:42:20 2014
<at> <at> -267,7 +267,7 <at> <at>

         /* Set the value */
         RtlInitUnicodeString(&ValueName, L"PhysicalAddressExtension");
-        NtSetValueKey(KeyHandle,
+        ZwSetValueKey(KeyHandle,
                       &ValueName,
                       0,
                       REG_DWORD,
<at> <at> -465,7 +465,7 <at> <at>

                     /* Add it to the registry */
                     RtlInitUnicodeString(&ValueName, L"ProcessorNameString");
-                    Status = NtSetValueKey(KeyHandle,
+                    Status = ZwSetValueKey(KeyHandle,
                                            &ValueName,
                                            0,
                                            REG_SZ,
<at> <at> -488,7 +488,7 <at> <at>

                     /* Add it to the registry */
                     RtlInitUnicodeString(&ValueName, L"VendorIdentifier");
-                    Status = NtSetValueKey(KeyHandle,
+                    Status = ZwSetValueKey(KeyHandle,
                                            &ValueName,
                                            0,
                                            REG_SZ,
<at> <at> -504,7 +504,7 <at> <at>
                 {
                     /* Add them to the registry */
                     RtlInitUnicodeString(&ValueName, L"FeatureSet");
-                    Status = NtSetValueKey(KeyHandle,
+                    Status = ZwSetValueKey(KeyHandle,
                                            &ValueName,
                                            0,
                                            REG_DWORD,
<at> <at> -517,7 +517,7 <at> <at>
                 {
                     /* Add it to the registry */
                     RtlInitUnicodeString(&ValueName, L"~MHz");
-                    Status = NtSetValueKey(KeyHandle,
+                    Status = ZwSetValueKey(KeyHandle,
                                            &ValueName,
                                            0,
                                            REG_DWORD,
<at> <at> -530,7 +530,7 <at> <at>
                 {
                     /* Add it to the registry */
                     RtlInitUnicodeString(&ValueName, L"Update Signature");
-                    Status = NtSetValueKey(KeyHandle,
+                    Status = ZwSetValueKey(KeyHandle,
                                            &ValueName,
                                            0,
                                            REG_BINARY,
<at> <at> -623,7 +623,7 <at> <at>

             /* Write the date into the registry */
             RtlInitUnicodeString(&ValueName, L"SystemBiosDate");
-            Status = NtSetValueKey(SystemHandle,
+            Status = ZwSetValueKey(SystemHandle,
                                    &ValueName,
                                    0,
                                    REG_SZ,
<at> <at> -645,7 +645,7 <at> <at>
                 if (NT_SUCCESS(Status))
                 {
                     /* Save it to the registry */
-                    Status = NtSetValueKey(BiosHandle,
+                    Status = ZwSetValueKey(BiosHandle,
                                            &ValueName,
                                            0,
                                            REG_SZ,
<at> <at> -705,7 +705,7 <at> <at>

                 /* Write the BIOS Version to the registry */
                 RtlInitUnicodeString(&ValueName, L"SystemBiosVersion");
-                Status = NtSetValueKey(SystemHandle,
+                Status = ZwSetValueKey(SystemHandle,
                                        &ValueName,
                                        0,
                                        REG_MULTI_SZ,
<at> <at> -749,7 +749,7 <at> <at>

             /* Write the date into the registry */
             RtlInitUnicodeString(&ValueName, L"VideoBiosDate");
-            Status = NtSetValueKey(SystemHandle,
+            Status = ZwSetValueKey(SystemHandle,
                                    &ValueName,
                                    0,
                                    REG_SZ,
<at> <at> -804,7 +804,7 <at> <at>

                 /* Write the BIOS Version to the registry */
                 RtlInitUnicodeString(&ValueName, L"VideoBiosVersion");
-                Status = NtSetValueKey(SystemHandle,
+                Status = ZwSetValueKey(SystemHandle,
                                        &ValueName,
                                        0,
                                        REG_MULTI_SZ,

Modified: trunk/reactos/ntoskrnl/ex/init.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=63700&r1=63699&r2=63700&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ex/init.c    [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/init.c    [iso-8859-1] Tue Jul  8 18:42:20 2014
<at> <at> -1853,7 +1853,7 <at> <at>
             {
                 /* Write the safe boot type */
                 RtlInitUnicodeString(&KeyName, L"OptionValue");
-                NtSetValueKey(OptionHandle,
+                ZwSetValueKey(OptionHandle,
                               &KeyName,
                               0,
                               REG_DWORD,
<at> <at> -1866,7 +1866,7 <at> <at>
                     /* Remember this for later */
                     Disposition = TRUE;
                     RtlInitUnicodeString(&KeyName, L"UseAlternateShell");
-                    NtSetValueKey(OptionHandle,
+                    ZwSetValueKey(OptionHandle,
                                   &KeyName,
                                   0,
                                   REG_DWORD,

Modified: trunk/reactos/ntoskrnl/io/iomgr/bootlog.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/bootlog.c?rev=63700&r1=63699&r2=63700&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/bootlog.c   [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/bootlog.c   [iso-8859-1] Tue Jul  8 18:42:20 2014
<at> <at> -135,7 +135,7 <at> <at>

     if (!NT_SUCCESS(Status))
     {
-        DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
+        DPRINT1("ZwSetValueKey() failed (Status %lx)\n", Status);
     }
     else
     {



_______________________________________________
Ros-dev mailing list
Ros-dev@...
http://www.reactos.org/mailman/listinfo/ros-dev
Hermès BÉLUSCA - MAÏTO | 26 Jun 21:51 2014
Picon

Jira comments

Hey guys !

 

It seems that suddently Jira SVN comments work again…. How is it possible?

 

H.

_______________________________________________
Ros-dev mailing list
Ros-dev@...
http://www.reactos.org/mailman/listinfo/ros-dev
Timo Kreuzer | 25 Jun 10:04 2014
Picon

Re: [ros-diffs] [jgardou] 63642: [SETUPAPI_APITEST] - Add a test that shows that SetupDiGetClassDevsExW doesn't fail on non-existing GUID

Am 25.06.2014 00:18, schrieb jgardou <at> svn.reactos.org:
> - * Copyright 2006 Hervé Poussineau
> + * Copyright 2006 Herv� Poussineau
I think you are not using UTF-8.

_______________________________________________
Ros-dev mailing list
Ros-dev <at> reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev
Vyronas Tsingaras | 25 Jun 09:10 2014
Picon

[CONSRV] Ensure szMenuStringBack is NULL terminated to prevent possible buffer overread and fix char to wchar_t assignment.

Is this patch acceptable? Please kindly explain any possible mistakes.

Attachment (conwnd.c.patch): application/octet-stream, 951 bytes
Attachment (smime.p7s): application/pkcs7-signature, 9 KiB
_______________________________________________
Ros-dev mailing list
Ros-dev@...
http://www.reactos.org/mailman/listinfo/ros-dev
Aleksey Bragin | 24 Jun 22:07 2014

Status Meeting (June/July 2014)

Hello,
Let me invite you to the monthly status meeting taking place next 
Thursday, 3rd of July, 19:00 UTC.
The meeting is one week off from the classic scheme due to various 
reasons (previous meeting was too close, and, you know, Germany - USA on 
Thursday).

IRC service will only be started shortly before the meeting. Your 
participation passwords and server address will be emailed to you 
shortly before the meeting starts, and they are going to be different 
once again as they are not stored in any database. Hopefully it's not 
much of inconvenience.
If someone still is not getting passwords sent before a meeting - please 
email Pierre before the meeting started to get one.

Please send agenda proposals to me before the meeting, so that we can 
start with a proposed agenda.

Also all developers, please, may I so kindly ask you to prepare a very 
brief one-two lines message containing two things:
1. What you did since the previous meeting
2. What you are going to do in the coming month

This is needed to understand who is working on what, to plan things, 
etc. Thanks, I hope it's not that much to ask for.

Prepare that in advance! Everyone will have max 1 minute!

Regards,
Aleksey Bragin
Colin Finck | 20 Jun 23:02 2014

Fezile server down

Hi all,

Fezile, one of our servers in Sweden, unexpectedly disappeared after a
reboot today. Unfortunately, this is one of our older servers without an
IPMI module, so we have to wait till it's rebooted manually. I'll keep
you informed when this is done.

The server outage affects the following services:
* iso.reactos.org
* doxygen.reactos.org
* cppcheck.reactos.org
* VMware Player Test slave
* VMware Player Patchbot

We apologize for the inconveniences!

If you have any idea where we can still get a suitable IPMI module for
these servers, we would be highly interested!
The needed models are ASUS ASMB3 and Tyan M3291.

Best regards,

Colin Finck

Attachment (smime.p7s): application/pkcs7-signature, 5057 bytes
_______________________________________________
Ros-dev mailing list
Ros-dev@...
http://www.reactos.org/mailman/listinfo/ros-dev
Ged Murphy | 19 Jun 10:07 2014
Picon

CRT changes

Some interesting changes are coming to the CRT which the VS builds will need to prepare for. The obvious one is the %s/%S  format changes

 

http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx

 

Ged.

_______________________________________________
Ros-dev mailing list
Ros-dev@...
http://www.reactos.org/mailman/listinfo/ros-dev
Timo Kreuzer | 18 Jun 19:39 2014
Picon

Re: [ros-diffs] [hbelusca] 63610: [WIN32K] There is a bug in win32k (who would have thought that?) that consists in holding a winstation spinlock while running PAGED_CODE MmCopyToCaller function, when building the...

 
- In NtUserCreateWindowStation the Window station should be fully initialized first, then inserted.
- The lock should be a pushlock, not a spinlock and acquired shared/exclusive based on the usage
 
We definately need a lock to protect the desktop list and it must be acquired in IntDesktopObjectParse as well and wherever this list is accessed. Windows acquires the global user lock (for everything...) but I do not like this approach and would prefer if we could avoid it wherever possible.
 
 
Gesendet: Dienstag, 17. Juni 2014 um 22:01 Uhr
Von: hbelusca-FK+hrUIho1S2+TBAgxGDFw@public.gmane.org
An: ros-diffs-td3rRX5TIkhAfugRpC6u6w@public.gmane.org
Betreff: [ros-diffs] [hbelusca] 63610: [WIN32K] There is a bug in win32k (who would have thought that?) that consists in holding a winstation spinlock while running PAGED_CODE MmCopyToCaller function, when building the...
Author: hbelusca
Date: Tue Jun 17 20:01:23 2014
New Revision: 63610

URL: http://svn.reactos.org/svn/reactos?rev=63610&view=rev
Log:
[WIN32K]
There is a bug in win32k (who would have thought that?) that consists in holding a winstation spinlock while running PAGED_CODE MmCopyToCaller function, when building the list of desktops of a given window station (the bug is easily triggerable when calling EnumDesktopsW). Since this lock is never used in anyplace but in this function, which, by the way, is just a reader function that fills user buffer, I consider that it is safe to remove this lock. However I want approval from win32k specialists. Hence I just disable the code with a define USE_WINSTA_LOCK. If this lock is really needed, please rewrite the BuildDesktopNameList function !! Otherwise remove this lock and the associated code !!
This is a blocker for the shutdown code.

Modified:
trunk/reactos/win32ss/user/ntuser/winsta.c
trunk/reactos/win32ss/user/ntuser/winsta.h

Modified: trunk/reactos/win32ss/user/ntuser/winsta.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winsta.c?rev=63610&r1=63609&r2=63610&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/winsta.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/winsta.c [iso-8859-1] Tue Jun 17 20:01:23 2014
<at> <at> -451,7 +451,9 <at> <at>
/* Initialize the window station */
RtlZeroMemory(WindowStationObject, sizeof(WINSTATION_OBJECT));

+#ifdef USE_WINSTA_LOCK
KeInitializeSpinLock(&WindowStationObject->Lock);
+#endif
InitializeListHead(&WindowStationObject->DesktopListHead);
Status = RtlCreateAtomTable(37, &WindowStationObject->AtomTable);
WindowStationObject->Name = WindowStationName;
<at> <at> -1203,7 +1205,9 <at> <at>
{
NTSTATUS Status;
PWINSTATION_OBJECT WindowStation;
+#ifdef USE_WINSTA_LOCK
KIRQL OldLevel;
+#endif
PLIST_ENTRY DesktopEntry;
PDESKTOP DesktopObject;
DWORD EntryCount;
<at> <at> -1220,7 +1224,9 <at> <at>
return Status;
}

+#ifdef USE_WINSTA_LOCK
KeAcquireSpinLock(&WindowStation->Lock, &OldLevel);
+#endif

/*
* Count the required size of buffer.
<at> <at> -1242,7 +1248,9 <at> <at>
Status = MmCopyToCaller(pRequiredSize, &ReturnLength, sizeof(ULONG));
if (! NT_SUCCESS(Status))
{
+#ifdef USE_WINSTA_LOCK
KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
+#endif
ObDereferenceObject(WindowStation);
return STATUS_BUFFER_TOO_SMALL;
}
<at> <at> -1253,7 +1261,9 <at> <at>
*/
if (dwSize < ReturnLength)
{
+#ifdef USE_WINSTA_LOCK
KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
+#endif
ObDereferenceObject(WindowStation);
return STATUS_BUFFER_TOO_SMALL;
}
<at> <at> -1264,7 +1274,9 <at> <at>
Status = MmCopyToCaller(lpBuffer, &EntryCount, sizeof(DWORD));
if (! NT_SUCCESS(Status))
{
+#ifdef USE_WINSTA_LOCK
KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
+#endif
ObDereferenceObject(WindowStation);
return Status;
}
<at> <at> -1280,7 +1292,9 <at> <at>
Status = MmCopyToCaller(lpBuffer, DesktopName.Buffer, DesktopName.Length);
if (! NT_SUCCESS(Status))
{
+#ifdef USE_WINSTA_LOCK
KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
+#endif
ObDereferenceObject(WindowStation);
return Status;
}
<at> <at> -1288,7 +1302,9 <at> <at>
Status = MmCopyToCaller(lpBuffer, &NullWchar, sizeof(WCHAR));
if (! NT_SUCCESS(Status))
{
+#ifdef USE_WINSTA_LOCK
KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
+#endif
ObDereferenceObject(WindowStation);
return Status;
}
<at> <at> -1298,7 +1314,9 <at> <at>
/*
* Clean up
*/
+#ifdef USE_WINSTA_LOCK
KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
+#endif
ObDereferenceObject(WindowStation);

return STATUS_SUCCESS;

Modified: trunk/reactos/win32ss/user/ntuser/winsta.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winsta.h?rev=63610&r1=63609&r2=63610&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/winsta.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/winsta.h [iso-8859-1] Tue Jun 17 20:01:23 2014
<at> <at> -7,11 +7,16 <at> <at>
#define WSS_LOCKED (1)
#define WSS_NOINTERACTIVE (2)

+// Uncomment for using WinSta spinlock
+// #define USE_WINSTA_LOCK
+
typedef struct _WINSTATION_OBJECT
{
DWORD dwSessionId;

+#ifdef USE_WINSTA_LOCK
KSPIN_LOCK Lock;
+#endif
UNICODE_STRING Name;
LIST_ENTRY DesktopListHead;
PRTL_ATOM_TABLE AtomTable;

 
_______________________________________________
Ros-dev mailing list
Ros-dev@...
http://www.reactos.org/mailman/listinfo/ros-dev
Alex Ionescu | 17 Jun 23:14 2014
Picon

Re: [ros-diffs] [hbelusca] 63610: [WIN32K] There is a bug in win32k (who would have thought that?) that consists in holding a winstation spinlock while running PAGED_CODE MmCopyToCaller function, when building the...

Win32k.sys is supposed to use MmPageEntireDriver, as such, it should run 100% at passive only.

Best regards,
Alex Ionescu


On Tue, Jun 17, 2014 at 10:01 PM, <hbelusca-FK+hrUIho1S2+TBAgxGDFw@public.gmane.org> wrote:
Author: hbelusca
Date: Tue Jun 17 20:01:23 2014
New Revision: 63610

URL: http://svn.reactos.org/svn/reactos?rev=63610&view=rev
Log:
[WIN32K]
There is a bug in win32k (who would have thought that?) that consists in holding a winstation spinlock while running PAGED_CODE MmCopyToCaller function, when building the list of desktops of a given window station (the bug is easily triggerable when calling EnumDesktopsW). Since this lock is never used in anyplace but in this function, which, by the way, is just a reader function that fills user buffer, I consider that it is safe to remove this lock. However I want approval from win32k specialists. Hence I just disable the code with a define USE_WINSTA_LOCK. If this lock is really needed, please rewrite the BuildDesktopNameList function !! Otherwise remove this lock and the associated code !!
This is a blocker for the shutdown code.

Modified:
    trunk/reactos/win32ss/user/ntuser/winsta.c
    trunk/reactos/win32ss/user/ntuser/winsta.h

Modified: trunk/reactos/win32ss/user/ntuser/winsta.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winsta.c?rev=63610&r1=63609&r2=63610&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/winsta.c  [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/winsta.c  [iso-8859-1] Tue Jun 17 20:01:23 2014
<at> <at> -451,7 +451,9 <at> <at>
    /* Initialize the window station */
    RtlZeroMemory(WindowStationObject, sizeof(WINSTATION_OBJECT));

+#ifdef USE_WINSTA_LOCK
    KeInitializeSpinLock(&WindowStationObject->Lock);
+#endif
    InitializeListHead(&WindowStationObject->DesktopListHead);
    Status = RtlCreateAtomTable(37, &WindowStationObject->AtomTable);
    WindowStationObject->Name = WindowStationName;
<at> <at> -1203,7 +1205,9 <at> <at>
 {
    NTSTATUS Status;
    PWINSTATION_OBJECT WindowStation;
+#ifdef USE_WINSTA_LOCK
    KIRQL OldLevel;
+#endif
    PLIST_ENTRY DesktopEntry;
    PDESKTOP DesktopObject;
    DWORD EntryCount;
<at> <at> -1220,7 +1224,9 <at> <at>
       return Status;
    }

+#ifdef USE_WINSTA_LOCK
    KeAcquireSpinLock(&WindowStation->Lock, &OldLevel);
+#endif

    /*
     * Count the required size of buffer.
<at> <at> -1242,7 +1248,9 <at> <at>
       Status = MmCopyToCaller(pRequiredSize, &ReturnLength, sizeof(ULONG));
       if (! NT_SUCCESS(Status))
       {
+#ifdef USE_WINSTA_LOCK
          KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
+#endif
          ObDereferenceObject(WindowStation);
          return STATUS_BUFFER_TOO_SMALL;
       }
<at> <at> -1253,7 +1261,9 <at> <at>
     */
    if (dwSize < ReturnLength)
    {
+#ifdef USE_WINSTA_LOCK
       KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
+#endif
       ObDereferenceObject(WindowStation);
       return STATUS_BUFFER_TOO_SMALL;
    }
<at> <at> -1264,7 +1274,9 <at> <at>
    Status = MmCopyToCaller(lpBuffer, &EntryCount, sizeof(DWORD));
    if (! NT_SUCCESS(Status))
    {
+#ifdef USE_WINSTA_LOCK
       KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
+#endif
       ObDereferenceObject(WindowStation);
       return Status;
    }
<at> <at> -1280,7 +1292,9 <at> <at>
       Status = MmCopyToCaller(lpBuffer, DesktopName.Buffer, DesktopName.Length);
       if (! NT_SUCCESS(Status))
       {
+#ifdef USE_WINSTA_LOCK
          KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
+#endif
          ObDereferenceObject(WindowStation);
          return Status;
       }
<at> <at> -1288,7 +1302,9 <at> <at>
       Status = MmCopyToCaller(lpBuffer, &NullWchar, sizeof(WCHAR));
       if (! NT_SUCCESS(Status))
       {
+#ifdef USE_WINSTA_LOCK
          KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
+#endif
          ObDereferenceObject(WindowStation);
          return Status;
       }
<at> <at> -1298,7 +1314,9 <at> <at>
    /*
     * Clean up
     */
+#ifdef USE_WINSTA_LOCK
    KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
+#endif
    ObDereferenceObject(WindowStation);

    return STATUS_SUCCESS;

Modified: trunk/reactos/win32ss/user/ntuser/winsta.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winsta.h?rev=63610&r1=63609&r2=63610&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/winsta.h  [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/winsta.h  [iso-8859-1] Tue Jun 17 20:01:23 2014
<at> <at> -7,11 +7,16 <at> <at>
 #define WSS_LOCKED     (1)
 #define WSS_NOINTERACTIVE      (2)

+// Uncomment for using WinSta spinlock
+// #define USE_WINSTA_LOCK
+
 typedef struct _WINSTATION_OBJECT
 {
     DWORD dwSessionId;

+#ifdef USE_WINSTA_LOCK
     KSPIN_LOCK Lock;
+#endif
     UNICODE_STRING Name;
     LIST_ENTRY DesktopListHead;
     PRTL_ATOM_TABLE AtomTable;



_______________________________________________
Ros-dev mailing list
Ros-dev@...
http://www.reactos.org/mailman/listinfo/ros-dev

Gmane