using segmentation in the kernel

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

 



Hello,

We're starting work on a project for the 32-bit x86 Linux kernel that
involves using segmentation in the kernel. As a first effort, we'd
like to adjust the kernel code and data segment descriptors so that
the kernel code, and data segment, bss, heap and stack exist in linear
address range between 3GB and 4 GB. How could we implment this so that
it breaks the memory management subsystem the least (or not at all if
we are lucky ;-))?

Our current thinking is to modify only the base address and the limit
of the the kernel code and data segment descriptors (_KERNEL_CS and
_KERNEL_DS). We set the base address to 3GB and the limit to 1GB. We
would also change the kernel linker script (vmlinux.lds.S) by removing
the relocation caused by PAGE_OFFSET. This would mean that the kernel
would be linked to start at address 0 + 1MB in logical address
space. Since we would set the base address of the kernel code and data
segment descriptors to 3GB, the processor would translate all
addresses emitted by the kernel so that the kernel would use addresses
of 3GB + 1MB and above in the linear address space. Hopefully, this
would mean that the all the paging code in the kernel would continue
to work correctly.

We do not understand the mm subsystem well enough to figure out if our
method would work at all or if it works what things in the mm
subsystem would be likely to break. Can someone who understands the mm
subsystem please help us here?


Thanks!
-Jon

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux