Re: Linux x86-32 addr space split
From: Casper H.S. Dik (Casper.Dik_at_Sun.COM)
Date: 02/02/05
- Previous message: Mosa Atilles: "Re: Linux x86-32 addr space split"
- In reply to: Josef Moellers: "Re: Linux x86-32 addr space split"
- Next in thread: Josef Moellers: "Re: Linux x86-32 addr space split"
- Reply: Josef Moellers: "Re: Linux x86-32 addr space split"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 02 Feb 2005 11:19:54 GMT
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.
>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).
When Solaris for UltraSPARC was done, the kernel and userland got
a separate address space as the CPU supports that cheaply. This
flushed out a number of those bugs. If you tried hard, you could
make the kernel panic abusing those bugs before, but nobody noticed
(or they were written of as transient failures)
Casper
- Previous message: Mosa Atilles: "Re: Linux x86-32 addr space split"
- In reply to: Josef Moellers: "Re: Linux x86-32 addr space split"
- Next in thread: Josef Moellers: "Re: Linux x86-32 addr space split"
- Reply: Josef Moellers: "Re: Linux x86-32 addr space split"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]