* Kernel logical memory map @ 2020-08-05 15:05 Derrick McKee 2020-08-07 16:40 ` Catalin Marinas 0 siblings, 1 reply; 3+ messages in thread From: Derrick McKee @ 2020-08-05 15:05 UTC (permalink / raw) To: linux-arm-kernel Hi, In the documentation, the first 128TB above user space is marked as the kernel logical memory map, and I cannot find an explanation for what that is. What is it used for? Can anyone point me towards further explanation of what it is used for? I am looking to possibly repurpose some of that space for another use, and I want to know if that is even possible. -- Derrick McKee Phone: (703) 957-9362 Email: derrick.mckee@gmail.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Kernel logical memory map 2020-08-05 15:05 Kernel logical memory map Derrick McKee @ 2020-08-07 16:40 ` Catalin Marinas 2020-08-07 19:28 ` Derrick McKee 0 siblings, 1 reply; 3+ messages in thread From: Catalin Marinas @ 2020-08-07 16:40 UTC (permalink / raw) To: Derrick McKee; +Cc: linux-arm-kernel On Wed, Aug 05, 2020 at 11:05:30AM -0400, Derrick McKee wrote: > In the documentation, Do you mean Documentation/arm64/memory.rst? > the first 128TB above user space is marked as > the kernel logical memory map, and I cannot find an explanation for > what that is. What is it used for? First of all, its not first above the user space. There is a very large gap between user and kernel (see the end/start values). > Can anyone point me towards further explanation of what it is used > for? It's used by the kernel to map the entire RAM. > I am looking to possibly repurpose some of that space for another use, > and I want to know if that is even possible. I wouldn't recommend it. If you need something in the kernel space (addresses starting with 0xfff...) you can look at reserving some range as we already do but you need to be a lot more specific. We have the "vmalloc" space where the kernel does various mappings for itself (e.g. ioremap). If you want to repurpose it for user, it's not really possible. This space is relies on being used in kernel space, it's not context switched (page tables pointed at by TTBR1_EL1 rather than TTBR1_EL0). However, you have enough user address space to add stuff in there. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Kernel logical memory map 2020-08-07 16:40 ` Catalin Marinas @ 2020-08-07 19:28 ` Derrick McKee 0 siblings, 0 replies; 3+ messages in thread From: Derrick McKee @ 2020-08-07 19:28 UTC (permalink / raw) To: Catalin Marinas; +Cc: linux-arm-kernel > Do you mean Documentation/arm64/memory.rst? Yes. > I wouldn't recommend it. If you need something in the kernel space > (addresses starting with 0xfff...) you can look at reserving some range > as we already do but you need to be a lot more specific. We have the > "vmalloc" space where the kernel does various mappings for itself (e.g. > ioremap). I am trying to compartmentalize kernel code and data, and then use a combination of MTE and PAC to enforce the compartmentalization at run time. My idea is to let the user decide which data should be grouped together at compile time, give that group a unique id, and then store that grouped data at a location where we can easily retrieve the unique id from the address (using e.g., bits 40-47). So, this will be kernel data, using addresses starting with 0xffff, but perhaps use 0xffff000000000000 through 0xffff7fffffffffff. On Fri, Aug 7, 2020 at 12:40 PM Catalin Marinas <catalin.marinas@arm.com> wrote: > > On Wed, Aug 05, 2020 at 11:05:30AM -0400, Derrick McKee wrote: > > In the documentation, > > Do you mean Documentation/arm64/memory.rst? > > > the first 128TB above user space is marked as > > the kernel logical memory map, and I cannot find an explanation for > > what that is. What is it used for? > > First of all, its not first above the user space. There is a very large > gap between user and kernel (see the end/start values). > > > Can anyone point me towards further explanation of what it is used > > for? > > It's used by the kernel to map the entire RAM. > > > I am looking to possibly repurpose some of that space for another use, > > and I want to know if that is even possible. > > I wouldn't recommend it. If you need something in the kernel space > (addresses starting with 0xfff...) you can look at reserving some range > as we already do but you need to be a lot more specific. We have the > "vmalloc" space where the kernel does various mappings for itself (e.g. > ioremap). > > If you want to repurpose it for user, it's not really possible. This > space is relies on being used in kernel space, it's not context switched > (page tables pointed at by TTBR1_EL1 rather than TTBR1_EL0). However, > you have enough user address space to add stuff in there. > > -- > Catalin -- Derrick McKee Phone: (703) 957-9362 Email: derrick.mckee@gmail.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-07 19:30 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-08-05 15:05 Kernel logical memory map Derrick McKee 2020-08-07 16:40 ` Catalin Marinas 2020-08-07 19:28 ` Derrick McKee
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox