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
- Follow-Ups:
- Re: using segmentation in the kernel
- From: "linux-os \(Dick Johnson\)" <[email protected]>
- Re: using segmentation in the kernel
- From: Brian Gerst <[email protected]>
- Re: using segmentation in the kernel
- Prev by Date: Re: [Security] Re: [linux-usb-devel] Re: [BUG/PATCH/RFC] Oops while completing async USB via usbdevio
- Next by Date: Re: [PATCH 1/1] 2.6.14-rc3 x86: COMMAND_LINE_SIZE
- Previous by thread: [PATCH] [ARM] Add missing EXPORT_SYMBOL in ixp2000 core
- Next by thread: Re: using segmentation in the kernel
- Index(es):