Hexcles / Eevee

Eevee is a local OI(and perhaps ACM in the future) judger for Linux. It currently only works in X86 (32-bit).
BSD 2-Clause "Simplified" License
74 stars 14 forks source link

Support x86_64 #5

Open mingc00 opened 11 years ago

mingc00 commented 11 years ago

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
fanzeyi commented 11 years ago

@lx75249

Hexcles commented 11 years ago

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?

conopt commented 11 years ago

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

Hexcles commented 11 years ago

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

Hexcles Ma

My Blog: http://robotshell.org/

conopt commented 11 years ago

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)

Hexcles commented 11 years ago

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

Hexcles Ma

My Blog: http://robotshell.org/

conopt commented 11 years ago

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

Hexcles commented 11 years ago

Doing some search and I got this: strace has a system call table for different arch in its source:

Any help?

ridethepig commented 6 years ago

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

gerayking commented 4 years ago

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

Hexcles commented 4 years ago

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

gerayking commented 4 years ago

OK,I solved it by remake qaq