Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751020AbVJKUQf (ORCPT ); Tue, 11 Oct 2005 16:16:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751207AbVJKUQf (ORCPT ); Tue, 11 Oct 2005 16:16:35 -0400 Received: from BACHE.ECE.CMU.EDU ([128.2.129.23]:4577 "EHLO bache.ece.cmu.edu") by vger.kernel.org with ESMTP id S1751020AbVJKUQe (ORCPT ); Tue, 11 Oct 2005 16:16:34 -0400 Message-ID: <434C1D60.2090901@cmu.edu> Date: Tue, 11 Oct 2005 16:15:28 -0400 From: "Jonathan M. McCune" User-Agent: Debian Thunderbird 1.0.2 (X11/20050602) X-Accept-Language: en-us, en MIME-Version: 1.0 To: linux-kernel@vger.kernel.org Cc: Arvind Seshadri , Bryan Parno Subject: using segmentation in the kernel Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------ms050201030202070106040901" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6481 Lines: 110 This is a cryptographically signed message in MIME format. --------------ms050201030202070106040901 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------ms050201030202070106040901 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIII6TCC As8wggI4oAMCAQICAw2KbTANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UE ChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNv bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0EwHhcNMDQxMjAyMTQzOTMxWhcNMDUxMjAyMTQzOTMx WjBDMR8wHQYDVQQDExZUaGF3dGUgRnJlZW1haWwgTWVtYmVyMSAwHgYJKoZIhvcNAQkBFhFq b25tY2N1bmVAY211LmVkdTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOP65vWj 2XdKbiMHJz+vl/2OaX4QphBZABFmRZ1XB2ovW4iK1VaBLulMQAWeVgvk5uaLKDW+FifksE1y 97PeDb75PYwLV2gbB2GXTgM3sO4qNozYqjNxEF4kAyaPKXvnp2cBYi/6p9nVWKzyUJhmT05l PceYHzDEEYvAPLFA+CBsiieNP5fYS9JJ5dQ5ppaSw7iPgTPSHFCKcEKyvP6oPVWdH9ZendCb EjWdU/K5XSRY0mydprtIvFQLJjw+SENFMs3oQnRcifnp0NR/zQ9gm6K5Vg0+5lLpjgRAz9zF dsPxx1SVUQNYsaJzmRVE/lFlBJVKIfPKiHfnl1+EAcRqlo8CAwEAAaMuMCwwHAYDVR0RBBUw E4ERam9ubWNjdW5lQGNtdS5lZHUwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0BAQQFAAOBgQBY /3yrj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O2k6se7imefaN7MZHft6HKA1rQNMmbP+gUcEbTXTP72tl4QSfkqJy O3gzyzeb/GYSl91ItWq0N8de2pTYljsmDOP7GaH1l6+vlkTrWFB8pTK47Sy28I7kcShOlLAe ykLxRddCfMRWJstzRoNa8rfYUkkjuSSyObAOihlsU1UAAAAAAAA= --------------ms050201030202070106040901-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/