Eevee icon indicating copy to clipboard operation
Eevee copied to clipboard

Support x86_64

Open mingc00 opened this issue 11 years ago • 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

mingc00 avatar Sep 03 '13 10:09 mingc00

@lx75249

fanzeyi avatar Sep 03 '13 11:09 fanzeyi

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?

Hexcles avatar Sep 04 '13 05:09 Hexcles

无法重现.. 我换个环境再试试

conopt avatar Sep 04 '13 13:09 conopt

Here: Archlinux x86_64

Something related to 64 bits?

2013/9/4 LX [email protected]

无法重现.. 我换个环境再试试

— Reply to this email directly or view it on GitHubhttps://github.com/Hexcles/Eevee/issues/5#issuecomment-23789097 .

Hexcles Ma

My Blog: http://robotshell.org/

Hexcles avatar Sep 04 '13 13:09 Hexcles

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)

conopt avatar Sep 04 '13 13:09 conopt

God damn.

2013/9/4 LX [email protected]

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/Hexcles/Eevee/issues/5#issuecomment-23790975 .

Hexcles Ma

My Blog: http://robotshell.org/

Hexcles avatar Sep 04 '13 14:09 Hexcles

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

conopt avatar Sep 04 '13 14:09 conopt

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?

Hexcles avatar Sep 04 '13 14:09 Hexcles

This can be fixed by just updating that list to x64 version. I have succeeded. Thank you for all this work

ridethepig avatar Aug 12 '18 13:08 ridethepig

I met the same problem,what is the final solution?

gerayking avatar Sep 01 '20 11:09 gerayking

Nothing. The code doesn't work in x86_64; a new syscall list is needed. PRs are welcomed.

Hexcles avatar Sep 04 '20 21:09 Hexcles

OK,I solved it by remake qaq

gerayking avatar Sep 06 '20 00:09 gerayking