[ros-dev] [ros-diffs] [ion] 57215: [NTOSKRNL]: Do not return data in failure cases in NtProtectVirtualMemory. [NTOSKRNL]: No longer support non-ARM3 sections in NtProtectVirtualMemory, as the only OS calls were already ...
Thomas Faber
thfabba at gmx.de
Sun Sep 2 08:15:48 UTC 2012
Hi!
On 02.09.2012 03:17, ion at svn.reactos.org wrote:
> Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/virtual.c?rev=57215&r1=57214&r2=57215&view=diff
> ==============================================================================
> --- trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] (original)
> +++ trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] Sun Sep 2 01:17:42 2012
> @@ -3668,15 +3795,50 @@
> }
>
> //
> - // Assert on the things we don't yet support
> - //
> - ASSERT(ZeroBits == 0);
> - ASSERT((AllocationType& MEM_LARGE_PAGES) == 0);
> - ASSERT((AllocationType& MEM_PHYSICAL) == 0);
> - ASSERT((AllocationType& MEM_WRITE_WATCH) == 0);
> - ASSERT((AllocationType& MEM_TOP_DOWN) == 0);
> - ASSERT((AllocationType& MEM_RESET) == 0);
> - ASSERT(Process->VmTopDown == 0);
> + // Fail on the things we don't yet support
> + //
> + if (ZeroBits != 0)
> + {
> + DPRINT1("Zero bits not supported\n");
> + Status = STATUS_INVALID_PARAMETER;
> + goto FailPathNoLock;
> + }
> + if ((AllocationType& MEM_LARGE_PAGES) == 1)
> + {
> + DPRINT1("MEM_LARGE_PAGES not supported\n");
> + Status = STATUS_INVALID_PARAMETER;
> + goto FailPathNoLock;
> + }
> + if ((AllocationType& MEM_PHYSICAL) == 1)
> + {
> + DPRINT1("MEM_PHYSICAL not supported\n");
> + Status = STATUS_INVALID_PARAMETER;
> + goto FailPathNoLock;
> + }
> + if ((AllocationType& MEM_WRITE_WATCH) == 1)
> + {
> + DPRINT1("MEM_WRITE_WATCH not supported\n");
> + Status = STATUS_INVALID_PARAMETER;
> + goto FailPathNoLock;
> + }
> + if ((AllocationType& MEM_TOP_DOWN) == 1)
> + {
> + DPRINT1("MEM_TOP_DOWN not supported\n");
> + Status = STATUS_INVALID_PARAMETER;
> + goto FailPathNoLock;
> + }
> + if ((AllocationType& MEM_RESET) == 1)
> + {
> + DPRINT1("MEM_RESET not supported\n");
> + Status = STATUS_INVALID_PARAMETER;
> + goto FailPathNoLock;
> + }
These guys won't work, you need != 0 or == MEM_BLAH
-Thomas
More information about the Ros-dev
mailing list