4ad / go.arm64

Go development tree for the arm64 port (historical).
BSD 3-Clause "New" or "Revised" License
17 stars 3 forks source link

syscall: zsysnum_linux_arm64.go has wrong syscall numbers #91

Open mwhudson opened 9 years ago

mwhudson commented 9 years ago

We fixed the ones in the runtime, but the syscall package is also wrong for some and needs vetting.

minux commented 9 years ago

so the correct arm64 syscall numbers are specified in: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h?id=refs/heads/master

right?

davecheney commented 9 years ago

Yes. On 15 Feb 2015 18:12, "Minux Ma" notifications@github.com wrote:

so the correct arm64 syscall numbers are specified in:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h?id=refs/heads/master

right?

— Reply to this email directly or view it on GitHub https://github.com/4ad/go/issues/91#issuecomment-74406913.

mwhudson commented 9 years ago

I gave up on reading headers and wrote a C program to print the values.

sent from my phone, please excuse brevity On 15 Feb 2015 20:15, "Dave Cheney" notifications@github.com wrote:

Yes. On 15 Feb 2015 18:12, "Minux Ma" notifications@github.com wrote:

so the correct arm64 syscall numbers are specified in:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h?id=refs/heads/master

right?

— Reply to this email directly or view it on GitHub https://github.com/4ad/go/issues/91#issuecomment-74406913.

— Reply to this email directly or view it on GitHub https://github.com/4ad/go/issues/91#issuecomment-74406964.

minux commented 9 years ago

We need to fix this sooner as we've reached a stage we can actually use syscall.

for example, gofmt < cmd/go/build.go works, but gofmt cmd/go/build.go reports "invalid argument". Strace showed that it's using two unimplemented 32-bit compat syscalls:

stat("cmd/go/build.go", 0x4208066000)   = -1 ENOSYS (Function not implemented)
open("cmd/go/build.go", O_RDONLY|O_CLOEXEC) = -1 ENOSYS (Function not implemented)
davecheney commented 9 years ago

Open fixed in eb9af0c

minux commented 9 years ago

still need to fix Lstat. cmd/go is failing on that one.

minux commented 9 years ago

Also Mkdir, Unlink, Rmdir, Chmod.

I've fixed the first three and Lstat, and cmd/go works. But I can still observe failed Chmod syscalls issued by cmd/go.

minux commented 9 years ago

Basically, we must fix each of the syscall listed here: https://github.com/4ad/go/blob/dev.arm64/src/syscall/syscall_linux_arm64.go#L98

4ad commented 9 years ago

Fixed most of them, go test os passes.

4ad commented 9 years ago

Removing milestone as the most important offenders were fixed and I want to clear the milestone.