* VMA/Paging apis broken on ARM/ARM64, possible work-arounds?
@ 2018-06-05 12:40 Kamil Leoniak
2018-06-05 13:06 ` Russell King - ARM Linux
2018-06-05 15:58 ` Mark Rutland
0 siblings, 2 replies; 3+ messages in thread
From: Kamil Leoniak @ 2018-06-05 12:40 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
I have this problem with the kernel I'm working with. Normally PTEs
are made for every VM addr (ktext, modules and so on). On ARM/ARM64
certain VM addrs (in kernel) are allocated only with PMDs, they not
have a corresponding PTE cells.
This breaks a whole range of kernel APIs, for example "set_memory_rw".
It will work for any region that has a PTE, but if it's a direct PMD
mapping, it will fail.
Is there some simple work-around for that? Can I somehow remap a
specific VM address into a specific physical address? (to override the
"simple" PMD mapping).
Thank you!
^ permalink raw reply [flat|nested] 3+ messages in thread
* VMA/Paging apis broken on ARM/ARM64, possible work-arounds?
2018-06-05 12:40 VMA/Paging apis broken on ARM/ARM64, possible work-arounds? Kamil Leoniak
@ 2018-06-05 13:06 ` Russell King - ARM Linux
2018-06-05 15:58 ` Mark Rutland
1 sibling, 0 replies; 3+ messages in thread
From: Russell King - ARM Linux @ 2018-06-05 13:06 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jun 05, 2018 at 02:40:28PM +0200, Kamil Leoniak wrote:
> I have this problem with the kernel I'm working with. Normally PTEs
> are made for every VM addr (ktext, modules and so on). On ARM/ARM64
> certain VM addrs (in kernel) are allocated only with PMDs, they not
> have a corresponding PTE cells.
>
> This breaks a whole range of kernel APIs, for example "set_memory_rw".
These return -EINVAL if you try to use them on a region that isn't
supported by the implementation. Their use on the kernel is not
supported, sorry.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up
^ permalink raw reply [flat|nested] 3+ messages in thread
* VMA/Paging apis broken on ARM/ARM64, possible work-arounds?
2018-06-05 12:40 VMA/Paging apis broken on ARM/ARM64, possible work-arounds? Kamil Leoniak
2018-06-05 13:06 ` Russell King - ARM Linux
@ 2018-06-05 15:58 ` Mark Rutland
1 sibling, 0 replies; 3+ messages in thread
From: Mark Rutland @ 2018-06-05 15:58 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jun 05, 2018 at 02:40:28PM +0200, Kamil Leoniak wrote:
> Hi,
Hi,
> I have this problem with the kernel I'm working with. Normally PTEs
> are made for every VM addr (ktext, modules and so on). On ARM/ARM64
> certain VM addrs (in kernel) are allocated only with PMDs, they not
> have a corresponding PTE cells.
>
> This breaks a whole range of kernel APIs, for example "set_memory_rw".
> It will work for any region that has a PTE, but if it's a direct PMD
> mapping, it will fail.
As Russell said, for various reasons, APIs which change the attributes
or permissions of pages aren't supported on arbitrary mappings.
> Is there some simple work-around for that? Can I somehow remap a
> specific VM address into a specific physical address? (to override the
> "simple" PMD mapping).
Could you please explain your use-case?
Why are you trying to remap a range that already has a mapping?
Thanks,
Mark.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-05 15:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-05 12:40 VMA/Paging apis broken on ARM/ARM64, possible work-arounds? Kamil Leoniak
2018-06-05 13:06 ` Russell King - ARM Linux
2018-06-05 15:58 ` Mark Rutland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).