[2/2] ntdll: Allow reading from a VPROT_WRITECOPY protected memory

Francois Gouget fgouget at free.fr
Tue Sep 6 04:02:20 CDT 2011


On Tue, 6 Sep 2011, Dmitry Timoshkov wrote:

> André Hentschel wrote:
> 
> > As per tests in kernel32:loader it seems linux&co allows reads on PROT_WRITE
> > areas, but solaris doesn't and crashes.
> > This fixes this issue.
> 
> > -        if (vprot & VPROT_WRITECOPY) prot |= PROT_WRITE;
> > +        if (vprot & VPROT_WRITECOPY) prot |= PROT_READ | PROT_WRITE;
> 
> Do you mean that the recently added test for resource section access
> mapping crashes on Solaris?

The kernel32:loader test was crashing on line 660:

    ok(!memcmp((const char *)info.BaseAddress, section_data, 
       section.SizeOfRawData), "wrong section data\n");

Further that was just for the following entries:
        { IMAGE_SCN_MEM_WRITE, PAGE_WRITECOPY },
and
        { IMAGE_SCN_MEM_WRITE | IMAGE_SCN_MEM_EXECUTE, PAGE_EXECUTE_WRITECOPY },


> If yes, then the fix should be done in different place.

What do you suggest?


-- 
Francois Gouget <fgouget at free.fr>              http://fgouget.free.fr/
A particle is an irreducible representation of the Poincaré Group - Eugene Wigner


More information about the wine-devel mailing list