mmap2 on L4Linux rev 37

Sebastian Sumpf <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
Hi L4 hackers,

recently I started to use L4Linux r37 on ARM and experienced some issues
with the 'sys_mmap_pgoff'-system call. When a user-level task tried to
map a file the 'pgoff' parameter was usually bogus. Doing a little
research I found that it was caused by the 'sys_mmap2' implementation in
'entry.S'. The function overwrites the 'pgoff' argument on the stack
with r5 (as it is usually passed from user land), since in L4Linux this
code gets called from the dispatch routine, 'pgoff' was set to whatever
r5 was, and thus leading to bus errors later on.

Cheers,

Sebastian

-- 
Sebastian Sumpf
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

_______________________________________________
l4-hackers mailing list
[email protected]
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
arm_entry.patch (text/x-diff, 335 B)
Index: arch/l4/kernel/arch-arm/entry.S
===================================================================
--- arch/l4/kernel/arch-arm/entry.S	(revision 37)
+++ arch/l4/kernel/arch-arm/entry.S	(working copy)
@@ -81,7 +81,6 @@
 		mov	r0, #-EINVAL
 		mov	pc, lr
 #else
-		str	r5, [sp, #4]
 		b	sys_mmap_pgoff
 #endif
 ENDPROC(sys_mmap2)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.