Re: Why the kernel is located in user space?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Dnia 19-11-2010 o 06:17:53 Venkatram Tummala <venkatram867@xxxxxxxxx> napisaÅ(a):

2010/11/18 Parmenides <mobile.parmenides@xxxxxxxxx>

2. For the kernel code, is it feasible to the use the user stack? Why
do we bother to switch to the kernel stack?

The answer is Yes, you could. But it would be pretty messy & inconvenient. We just don't do it in the linux kernel atleast on x86. Kernel Data Segment & User Data Segment is different. I guess you could just map the user space stack in the kernel address space too & use it. Using two seperate stacks is
just more efficient & convenient.

Wouldn't it be a security bug to use the same stack for both? Kernel function's parameters and auto variables would be still sitting above (well, in x86 under ;) stack pointer. Not sure though if attacker could find anything interesting there...

Regards,
moorray

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux