Commit Graph

308 Commits

Author SHA1 Message Date
Alexandre Julliard b8d0a59a2e ntdll: Get rid of the VPROT_VALLOC flag.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-12 20:32:01 +02:00
Alexandre Julliard 1c8a36a91c ntdll: Pass the mapping file access instead of the protection bits to the server.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-12 20:32:01 +02:00
Alexandre Julliard f448be618b ntdll: Verify page protection against the mapping protections in VirtualAlloc and VirtualProtect.
This partially reverts 3a5ee02735.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-12 20:32:01 +02:00
Alexandre Julliard 94872cc84f ntdll: Fix access rights checks for mapping objects.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-12 20:32:01 +02:00
Alexandre Julliard 78ab8aa46a ntdll: Trace views once they are properly initialized.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-11 19:51:43 +02:00
Alexandre Julliard 8dc8b3e9c0 ntdll: Avoid accessing builtin views outside of the critical section.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-11 19:50:30 +02:00
Alexandre Julliard 26c59d845e ntdll: Ignore attempts to commit pages in an already committed anonymous mapping.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-08 16:23:15 +02:00
Alexandre Julliard 5073beaefe ntdll: Store the SEC_* section flags directly in the view protection.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-08 16:23:15 +02:00
Alexandre Julliard b2624ab99a ntdll: Remove the no longer used VPROT_NOEXEC flag.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-08 16:23:15 +02:00
Alexandre Julliard 08acac0864 ntdll: Disallow changing PAGE_NOCACHE flag for individual pages.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-08 16:23:15 +02:00
Alexandre Julliard 2967e3efb6 ntdll: Store memory views in a binary tree instead of a list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-07 19:32:29 +02:00
Alexandre Julliard 917d98a457 ntdll: Use the find_view_range helper function to check for overlapping views.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-07 19:07:32 +02:00
Alexandre Julliard 3bfd7973a4 ntdll: Don't do partial writes in virtual_uninterrupted_write_memory.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-06 17:31:00 +02:00
Alexandre Julliard a0f64e1231 ntdll: Allocate views out of a memory block instead of using a heap.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-06 10:01:07 +02:00
Alexandre Julliard 2e12f7cdd6 ntdll: Remove the view parameter from the page protection helpers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 16:53:37 +02:00
Alexandre Julliard 3ecf069e45 ntdll: Allocate the per-page protection byte separately from the view.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 16:53:37 +02:00
Alexandre Julliard eb5c187254 ntdll: Pass the allocation size to the alloc_virtual_heap function.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 16:22:38 +02:00
Alexandre Julliard 4069c4a4d1 ntdll: Add a helper function for applying page protection bytes with mprotect.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 16:22:37 +02:00
Alexandre Julliard e4b5e5da8a ntdll: Add a helper function for setting bits in page protection bytes.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 16:21:47 +02:00
Alexandre Julliard 727b94842e ntdll: Add helper functions for getting and setting page protection bytes.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 16:21:45 +02:00
Akihiro Sagawa 74b7fcfbdb ntdll: Allow map_view() to allocate fixed memory between reserved area and non-reserved area.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-13 13:48:55 +02:00
Akihiro Sagawa 1afb369380 ntdll: Zero bits parameter must be less than 21.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-31 20:51:46 +02:00
Sebastian Lackner 9815806f16 configure: Explicitly check for sysinfo function.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-11 20:18:00 +09:00
Alexandre Julliard 32c7153fdb server: Avoid rounding mapping sizes on the server side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-27 17:03:03 +09:00
Alexandre Julliard 6f0979b983 ntdll: Implement the SectionImageInformation class of NtQuerySection.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-26 20:33:16 +09:00
Alexandre Julliard 2602df14d8 ntdll: Implement the SectionBasicInformation class of NtQuerySection.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-26 20:32:10 +09:00
Alexandre Julliard 1ddc636051 server: Store the section flags separately from the protection.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-26 14:20:02 +09:00
Michael Müller 1311c8157b ntdll: NtUnmapViewOfSection should succeed for all offsets within the mapped range.
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-19 22:03:21 +09:00
Michael Müller d0832cdf42 ntdll: Use sysinfo to report correct number of physical pages.
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-14 17:52:35 +09:00
Sebastian Lackner a697e96823 ntdll: Use close_handle instead of NtClose for internal memory management functions.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-31 15:57:33 +09:00
Alexandre Julliard fe0924625f ntdll: Add a helper to validate attributes in open calls, and use a common pattern in all calls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-29 21:25:11 +09:00
Alexandre Julliard 8b2ba27c86 ntdll: Add tests for kernel object names in the various open functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-29 00:41:30 +09:00
Alexandre Julliard 7350682aa6 server: Store the attributes in the object_attributes structure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-16 00:05:57 +09:00
Alexandre Julliard 3198fb0c1c ntdll: Add a helper function to allocate the full object_attributes structure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-16 00:05:57 +09:00
Sebastian Lackner 7b66f9f6b4 ntdll: Commit new guard pages in virtual_handle_stack_fault.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-30 23:16:49 +09:00
Dmitry Timoshkov e67a00b466 ntdll: Separate image relocation from NtMapViewOfSection. 2015-08-18 19:56:48 +09:00
Sebastian Lackner 38076fa633 ntdll: Move cookie initialization code from memory management to loader. 2015-08-12 22:58:28 +09:00
Francois Gouget f8a7d6ed74 Assorted spelling fixes. 2015-08-07 23:50:48 +09:00
Sebastian Lackner 6e66c12c68 ntdll: Validate SecurityCookie pointer before accessing cookie value. 2015-07-30 11:36:21 +02:00
Martin Storsjo 2a904d3bb3 ntdll: Handle partial image load config structs. 2015-07-29 21:44:03 +02:00
Erich E. Hoover e9d7cf99ad ntdll: Only set the security cookie if it has not already been set. 2015-07-14 16:43:30 +09:00
André Hentschel 7e1c886fbf ntdll: Randomize security cookie when available. 2015-07-08 16:20:06 +09:00
Sebastian Lackner d082ea3eab ntdll: Implement support for AT_ROUND_TO_PAGE flag in NtMapViewOfSection. 2015-06-26 20:35:05 +09:00
Sebastian Lackner 7a8470ea94 ntdll: NtMapViewOfSection should fail if both addr_ptr and zero_bits is set. 2015-06-26 20:35:05 +09:00
Sebastian Lackner 8ddab2c2f4 ntdll: Fix status code when NtMapViewOfSection parameter check fails. 2015-06-08 15:34:04 +09:00
Sebastian Lackner ee6a477cab ntdll: Return failure in NtProtectVirtualMemory when last argument is omitted. 2015-05-05 23:15:31 +09:00
Sebastian Lackner 5f49f07d49 ntdll: Handle write watches in virtual_uninterrupted_write_memory. 2015-03-19 17:06:29 +09:00
Francois Gouget ca1545cf17 ntdll: Remove unneeded NONAMELESSXXX directives. 2015-03-16 15:04:50 +09:00
Sebastian Lackner 6bec132c7a ntdll: Try to handle write-watches while we're on the signal stack. 2015-02-27 14:59:08 +09:00
Hans Leidekker faf70e2fbd ntdll: Fix calculation of process and thread affinity masks on systems with a large number of processors. 2015-01-21 15:31:16 +01:00