[ros-dev] Re: [ros-svn] [weiden] 13138: implemented the ProcessSessionInformation information class

Joseph Galbraith galb at vandyke.com
Wed Jan 19 19:34:29 CET 2005


Hartmut Birr wrote:
> weiden at svn.reactos.com schrieb:
> 
>> implemented the ProcessSessionInformation information class
>>
>>
>> Updated files:
>> trunk/reactos/ntoskrnl/ps/process.c
> 
> I think that some parts of your implementation are incorrect. The 
> function must check for the location of the buffer and the previous 
> mode. If the previous mode is user mode, the buffer must be located 
> within the user address space. IMHO using of  MmCopyFrom/ToCaller is 
> better than using an exception block. It is also true for your following 
> commits.

Do MmCopyFrom/ToCaller use SEH?

If not, both are necessary.  Using SEH protects from another
thread in the process (or some other component) free the VM
page and cause a crash.

So not only must the address be checked to make sure it
is a user mode address iff the caller is user mode, but
the parameter need to be copied using SEH; otherwise
what was just probed as valid may become invalid before
the copy can be done.

Thanks,

Joseph


More information about the Ros-dev mailing list