Re: Linux x86-32 addr space split

From: Josef Moellers (josef.moellers_at_fujitsu-siemens.com)
Date: 02/02/05

  • Next message: ANTant_at_zimage.com: "Ways to keep my Debian box updated over dial-up (3 KB/sec)?"
    Date: Wed, 02 Feb 2005 12:58:32 +0100
    
    

    Casper H.S. *** wrote:
    > Josef Moellers <josef.moellers@fujitsu-siemens.com> writes:
    >
    >
    >>The advantage is that the kernel will have the current process' address=20
    >>space as part of its own address space. In a large number of cases, this =
    >
    >
    >>makes expensice copies between separate address spaces (user<->kernel)=20
    >>unnecessary.
    >
    >
    > The copies are still necessary, they're just cheaper because you read/write
    > to the same address space.

    That's why I wrote "expensive copies". The grouping probably got lost
    somwhere between a couple of synapses and the keyboard.

    >>Note To stay portable, one should nonetheless use the appropriate=20
    >>functions/macros when copying between user and kernel space, even if=20
    >>they will then just to a copy.
    >
    >
    > That's not just about portability; referencing user data from the
    > kernel directly may cause a page fault which won't generally be handled
    > by the kernel (typically, it won't generate a page fault because system
    > calls are typically handed data which has just been touched).

    ACK. I totally forgot about that.
    Blindly copying data between user and kernel address spaces generates
    all sorts of problems, not only can a page fault occur, but also the
    user might specify some illegal (and dangerous) address.

    -- 
    Josef Möllers (Pinguinpfleger bei FSC)
    	If failure had no penalty success would not be a prize
    						-- T.  Pratchett
    

  • Next message: ANTant_at_zimage.com: "Ways to keep my Debian box updated over dial-up (3 KB/sec)?"
  • Quantcast