lsds/sgx-lkl

Attempting to access the memory outside file is not raising SIGBUS error

vamsikrishna935 opened this issue · 3 comments

Testcase mmap13: https://github.com/lsds/ltp/blob/sgx-lkl/testcases/kernel/syscalls/mmap/mmap13.c

mmap13      1  TFAIL  :  mmap13.c:90: Invalid access not rise SIGBUS
92      in mmap13.c
(gdb) bt
#0  main (argc=<optimized out>, argv=<optimized out>) at mmap13.c:92
#1  0x00007fe000532904 in libc_start_main_stage2 (main=0x7fe03da645a0 <main>, argc=1, argv=0x7fe040b03f80)
    at src/env/__libc_start_main.c:168
#2  0x00007fe00053285e in __libc_start_main (main=0x7fe03da645a0 <main>, argc=1, argv=0x7fe040b03f80)
    at src/env/__libc_start_main.c:153
#3  0x00007fe03da6480c in _start_c (p=<optimized out>) at crt/crt1.c:17
#4  0x00007fe03da647e4 in _start ()
#5  0x00007fe040b03fa0 in ?? ()
#6  0x0000000000000001 in ?? ()
#7  0x00007fe000b05790 in ?? ()
#8  0x0000000000000000 in ?? ()

This looks like expected behaviour for any nommu platform.

There's some patches for ucLinux to LTP. We could upstream a fix for this eventually and in the meantime, build with ucLinux stuff on.

I've filed #787 to track all of the bugs that have the same root cause. Closing this as a duplicate.