Displaying 8 results from an estimated 8 matches for "page_execute_readwrit".
Did you mean:
page_execute_readwrite
2012 Jan 07
0
[LLVMdev] [llvm-commits] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
Hi Ruben,
> I see I missed some curly braces. I also modified spacing a tiny bit.
Doesn't seem so. E.g. you have:
+ if ( !VirtualQuery(addr, &b, sizeof(b)) )
+ exit(1);
+ if( !VirtualProtect(b.BaseAddress, b.RegionSize,
PAGE_EXECUTE_READWRITE, &b.Protect) )
Add space after "if". Do not put spaces after "(" and before ")". Same
for other places in the file.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
2012 Jan 07
3
[LLVMdev] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
...4095));
char* end = (char*)((uintptr_t)(&execution_buffer[128+4096]) & (-4095));
+#if defined(_WIN32)
+ DWORD dummy_oldProt;
+ MEMORY_BASIC_INFORMATION b;
+ if ( !VirtualQuery(start, &b, sizeof(b)) )
+ return 1;
+ if ( !VirtualProtect(b.BaseAddress, b.RegionSize, PAGE_EXECUTE_READWRITE, &b.Protect) )
+#else
if ( mprotect(start, end-start, PROT_READ|PROT_WRITE|PROT_EXEC) != 0 )
+#endif
return 1;
// verify you can copy and execute a function
@@ -53,7 +70,8 @@
__clear_cache(execution_buffer, &execution_buffer[128]);
pfunc f2 = (pfunc)(uintptr_...
2010 Sep 20
1
Dynamic forking in Win32
...", basic_info.Type);
print_flags(basic_info.Type);
}
printf("\n");
old_protection = basic_info.Protect;
if (r = VirtualProtectEx(
pi.hProcess,
(LPVOID)childInfo.baseAddr,
childInfo.imageSize,
PAGE_EXECUTE_READWRITE,
&old_protection) == 0) {
eprintf("VirtualProtectEx: Failed!\nReturn: %d\n", r);
}
if (VirtualQueryEx(
pi.hProcess,
(LPCVOID)childInfo.baseAddr,
&basic_info,
sizeof(MEMORY_BASIC_INFORMATION))...
2012 Jan 07
1
[LLVMdev] [llvm-commits] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
...4095));
char* end = (char*)((uintptr_t)(&execution_buffer[128+4096]) & (-4095));
+#if defined(_WIN32)
+ DWORD dummy_oldProt;
+ MEMORY_BASIC_INFORMATION b;
+ if ( !VirtualQuery(start, &b, sizeof(b)) )
+ return 1;
+ if ( !VirtualProtect(b.BaseAddress, b.RegionSize, PAGE_EXECUTE_READWRITE, &b.Protect) )
+#else
if ( mprotect(start, end-start, PROT_READ|PROT_WRITE|PROT_EXEC) != 0 )
+#endif
return 1;
// verify you can copy and execute a function
Index: test/Unit/enable_execute_stack_test.c
===================================================================
---...
2012 Jan 07
2
[LLVMdev] [llvm-commits] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
....info>
> Hi Ruben,
>
> > I see I missed some curly braces. I also modified spacing a tiny bit.
> Doesn't seem so. E.g. you have:
>
> + if ( !VirtualQuery(addr, &b, sizeof(b)) )
> + exit(1);
> + if( !VirtualProtect(b.BaseAddress, b.RegionSize,
> PAGE_EXECUTE_READWRITE, &b.Protect) )
> Add space after "if". Do not put spaces after "(" and before ")". Same
> for other places in the file.
>
OK, I followed the rules you set forth here. But the files followed
different ones, hence my confusion. I modified the rest of the f...
2013 Jun 25
0
[LLVMdev] [PATCH] Windows implementation of enable_execute_stack
...applies to Win32, so
> I ifdef'ed the whole thing.
>
>
>> > + MEMORY_BASIC_INFORMATION b;
>> > +
>> > + if (!VirtualQuery(addr, &b, sizeof(b)))
>> > + exit(1);
>> > + if (!VirtualProtect(b.BaseAddress, b.RegionSize,
>> PAGE_EXECUTE_READWRITE, &b.Protect))
>> > + exit(1);
>> > +#endif /* _WIN32 */
>> > }
>>
>> Aside from that, patch LGTM.
>>
>
> Great!
>
> Ruben
>
>
>>
>> ~Aaron
>>
>
>
Friendly ping :)
-------------- next part --------------...
2008 Aug 14
1
Complete National Geographic For Windows:DOSMEM_MapDosLayout
...; 501 static int already_mapped;
> 502
> 503 if (!already_mapped)
> 504 {
> 505 HMODULE16 hModule;
> 506 unsigned short sel;
> 507 LDT_ENTRY entry;
> 508
> 509 if (DOSMEM_dosmem || !VirtualProtect( NULL, DOSMEM_SIZE, PAGE_EXECUTE_READWRITE, NULL ))
> 510 {
> 511 ERR( "Need full access to the first megabyte for DOS mode\n" );
> 512 ExitProcess(1);
> 513 }
>
The variable DOSMEM_MapDosLayout at line 499 of the same module and which is mentioned in the error message is...
2011 Nov 18
0
Wine release 1.3.33
...so call IoCompleteRequest in case of an error.
ntoskrnl: irp.AssociatedIrp.SystemBuffer is also used for METHOD_IN/OUT_DIRECT ioctls.
Daniel Scharrer (1):
include: Don't use min/max in d3dx9math.inl as they might not be defined at this point.
Dmitry Timoshkov (6):
ntdll: Use PAGE_EXECUTE_READWRITE protection when allocating stubs.
kernel32: Add a bunch of tests for protections accepted by VirtualAlloc, make it pass under Wine.
gdi32: Remove a duplicated line of code.
user32: Add tests for mixed WS_CHILD | WS_POPUP window styles.
user32: Dialog creation code should fo...