Support x86_64
mingc00 opened this issue · 12 comments
OS: Ubuntu 12.04.3 LTS
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
test.c
#include<stdio.h>
int main()
{
printf("hello world\n");
return 0;
}
Compile and run
$ gcc test.c -static
$ sudo ./taker ./a.out
I got the message:
Calling SYS_oldolduname (id:59 )
Calling SYS_dup2 (id:63 )
./taker: forbidden operation
@lx75249
Confirmed this bug.
I tried to allow "dup2" and I have another error message saying that "chdir" is forbidden, but obviously this test sample does not call chdir or anything like that.
Looks like these "forbidden" system calls are in the parent process?
无法重现.. 我换个环境再试试
Here: Archlinux x86_64
Something related to 64 bits?
2013/9/4 LX notifications@github.com
无法重现.. 我换个环境再试试
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-23789097
.
Hexcles Ma
My Blog: http://robotshell.org/
system call id in x86_64 is different from that in x86...
an `autoconf' requiring system source code may be available... (or another ugly white list)
God damn.
2013/9/4 LX notifications@github.com
system call id in x86_64 is different from that in x86...
an `autoconf' requiring system source code may be available... (or another
ugly white list)—
Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-23790975
.
Hexcles Ma
My Blog: http://robotshell.org/
ok... I find all system call numbers in asm/unistd_xx.h .. an autoconf will be delivered soon.. say good-bye to that brute list
Doing some search and I got this: strace has a system call table for different arch in its source:
- http://strace.git.sourceforge.net/git/gitweb.cgi?p=strace/strace;a=blob;f=linux/x86_64/syscallent.h
- http://strace.git.sourceforge.net/git/gitweb.cgi?p=strace/strace;a=blob;f=linux/i386/syscallent.h
Any help?
This can be fixed by just updating that list to x64 version. I have succeeded. Thank you for all this work
I met the same problem,what is the final solution?
Nothing. The code doesn't work in x86_64; a new syscall list is needed. PRs are welcomed.
OK,I solved it by remake qaq