Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sysinfo syscall is throwing SIGSEGV, segmentation fault upon accessing invalid address instead of EFAULT #773

Closed
vamsikrishna935 opened this issue Aug 12, 2020 · 1 comment
Labels
needs-triage Bug does not yet have a priority assigned

Comments

@vamsikrishna935
Copy link
Contributor

vamsikrishna935 commented Aug 12, 2020

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

Thread 6 "ENCLAVE" received signal SIGSEGV, Segmentation fault.
0x00007fe0005e3cee in syscall_sysinfo_override (info=0xffffffffffffffff) at lkl/syscall-overrides-sysinfo.c:8
8           info->totalram = total;
(gdb) bt
#0  0x00007fe0005e3cee in syscall_sysinfo_override (info=0xffffffffffffffff) at lkl/syscall-overrides-sysinfo.c:8
#1  0x00007fe00008b86f in run_syscall (params=<optimized out>, no=<optimized out>) at arch/lkl/kernel/syscalls.c:44
#2  lkl_syscall (no=179, params=0x7fe040b03e50) at arch/lkl/kernel/syscalls.c:192
#3  0x00007fe00053b4c1 in __filter_syscall1 (n=179, a1=-1) at ./src/internal/syscall.h:58
#4  0x00007fe00053b4e8 in __lsysinfo (info=0xffffffffffffffff) at src/linux/sysinfo.c:6
#5  0x00007fe03da645d9 in main (ac=<optimized out>, av=<optimized out>) at sysinfo02.c:100
#6  0x00007fe000532904 in libc_start_main_stage2 (main=0x7fe03da64590 <main>, argc=1, argv=0x7fe040b03f80)
    at src/env/__libc_start_main.c:168
#7  0x00007fe00053285e in __libc_start_main (main=0x7fe03da64590 <main>, argc=1, argv=0x7fe040b03f80)
    at src/env/__libc_start_main.c:153
#8  0x00007fe03da64696 in _start_c (p=<optimized out>) at crt/crt1.c:17
#9  0x00007fe03da6466e in _start ()
#10 0x00007fe040b03fa0 in ?? ()
#11 0x0000000000000001 in ?? ()
#12 0x00007fe000b057a0 in ?? ()
#13 0x0000000000000000 in ?? ()
(gdb) n
sysinfo02    1  TBROK  :  tst_sig.c:234: unexpected signal SIGSEGV(11) received (pid = 36).
sysinfo02    2  TBROK  :  tst_sig.c:234: Remaining cases broken
bad count while changing owner
[[  SGX-LKL ]] FAIL: Kernel panic! Aborting...

@github-actions github-actions bot added the needs-triage Bug does not yet have a priority assigned label Aug 12, 2020
@hukoyu
Copy link
Collaborator

hukoyu commented Aug 13, 2020

This is dupe of #767

@hukoyu hukoyu closed this as completed Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Bug does not yet have a priority assigned
Projects
None yet
Development

No branches or pull requests

2 participants