[ros-dev] Re: [ros-svn] [hbirr] 15821: - Changed the calculation of the base address of an image section.

Robert Köpferl rob at koepferl.de
Thu Jun 9 02:00:10 CEST 2005


 From a realistic point of view, i have to agree with Alex.

What can be done will be done.. That's the world.

Alex Ionescu wrote:
> Hartmut Birr wrote:
> 
>> Alex Ionescu wrote:
>>
>>  
>>
>>> If you're up for it, here are the public NT structures used...maybe it
>>> won't be a bad idea if we use them if it's not too much code change:
>>>
>>>
>>> I think it's important because many of the Section implementation
>>> details are documented in books (including driver-related books) and
>>> known to driver developers who might be using the structures in their
>>> code... I can name NT Insider, Windows Internals 4th Edition and
>>> Windows NT File System Internals as some examples...but anyways it's
>>> just an idea.
>>>   
>>
>>
>> I think that the structures are not public.
> 
> Where did I paste them from...?
> 
>> No driver can use this
>> structures.
> 
> You live in a dream world. I can get many drivers use this. I will keep 
> referring to one example of horrible kernel code: the NVIDIA driver 
> reads a static, hard-coded pointer inside kernel32 (from kernel-mode!). 
> If a well known company does this, how much do you want to bet other 
> drivers certaintly poke around in structures. It's a complete illusion 
> to think that every driver doesn't. NT Insider recently talked about a 
> WHQLed driver that instantly ASSERTS on a debug build; driver quality is 
> truly horrible. We have the option to support more drivers by imitating 
> public structures; it's in our best interest to do so.
> 
>> M$ can change the structures between service packs.
> 
> Yes, and they can also rename "Windows" to "Alexows" and declare Paged 
> Pool memory deprecated. The fact is they won't. MS takes great care to 
> ensure that structures they know drivers are "illegaly" using don't 
> change to the point that they will break the drivers.
> 
>> IMO it
>> exsits no reason to use exactly the same structures.
> 
> Well I've just pointed them out. However, if it takes considerable 
> effort to do so, then we can forget about it for now.
> 
>> In the near future,
>> I will do some changes. It is necessary to split the segment structure
>> in one large 'page' table and some short structures for each segment.
> 
> At least that will match the general implementation details.
> 
>> It
>> is nearly the same like the control area, the subsections and the
>> segment.
> 
> Yes..
> 
>> It is also necessary to use only one memory area for a mapped
>> image section. I need this to implement the executing of low alignment
>> executables (like device drivers).
>>  
>>
> Oh...so this is why they don't work! I'm glad to find this out! :)
> 
>>  
>>
>>> There's even a nice diagram in one of the books:
>>>
>>>   
>>
>> I know this diagram because I own some of the books.
>>  
>>
> So therefore the implementation details are public and as I pointed out 
> the structures too. What's to stop a driver from using them?
> 
>>  
>>
>>> As a sidenote, do we have a PFN Database?   
>>
>>
>> We have a 'PFN' database. It is in freelist.c.
>>  
>>
> Thanks...but I'll suppose it's nothing like the NT implementation :)
> 
>> - Hartmut
>>
>>  
>>
> Best regards,
> Alex Ionescu
> 
>> _______________________________________________
>> Ros-dev mailing list
>> Ros-dev at reactos.com
>> http://reactos.com:8080/mailman/listinfo/ros-dev
>>
>>  
>>
> 
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.com
> http://reactos.com:8080/mailman/listinfo/ros-dev
> 


More information about the Ros-dev mailing list