Thread (8 messages) 8 messages, 3 authors, 2009-09-07

Kernel related (?) user space crash at ARM11 MPCore

From: catalin.marinas@arm.com (Catalin Marinas)
Date: 2009-09-07 21:40:01

Possibly related (same subject, not in this thread)

On Mon, 2009-09-07 at 19:31 +0200, Mikael Pettersson wrote:
Catalin Marinas writes:
 > Any opinion on whether the ARM kernel should support dynamic shared
 > objects where not all objects are position-independent? IOW, whether
 > text relocations are allowed to be resolved at run-time rather than
 > compile (static link) time for the dynamic shared objects? AFAICT, there
 > isn't anything in the ARM EABI which would prevent this, so a kernel
 > patch may be needed.

I didn't follow the start of this thread, but what exactly
do you mean by "kernel support" for runtime relocations in
shared objects? As far as I can tell, all that would happen
is that some non-pic .so is mapped somewhere, the user-space
linker runs and fixes relocations (directly or lazily), writes
to COW pages, causing the kernel to copy them to new page frames.

In my book that's just "normal" actions for mmaps and pagefaults.

Is the problem that the kernel has buggy cache maintenance when
COW-ing text pages on this arch?
Yes (IMHO), pretty much. Two situations here - (a) COW-ing RW pages with
mprotect(RX) afterwards and (b) COW-wing RWX pages. The latter isn't
usually found in current filesystems, so we can ignore it of now. As for
the former, we don't want to clean the cache at every COW of RW pages
(on VIPT/PIPT hardware), so the best place is during mprotect(RX).

Alternatively (*not* my preferred solution), we tell the toolchain
people that such thing as COW text pages isn't supported, so I suspect
other architectures can cope fine with this.

-- 
Catalin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help