go.arm64 icon indicating copy to clipboard operation
go.arm64 copied to clipboard

syscall: zsysnum_linux_arm64.go has wrong syscall numbers

Open mwhudson opened this issue 9 years ago • 10 comments

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

mwhudson avatar Feb 03 '15 21:02 mwhudson

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?

minux avatar Feb 15 '15 07:02 minux

Yes. On 15 Feb 2015 18:12, "Minux Ma" [email protected] 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.

davecheney avatar Feb 15 '15 07:02 davecheney

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" [email protected] wrote:

Yes. On 15 Feb 2015 18:12, "Minux Ma" [email protected] 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.

mwhudson avatar Feb 15 '15 08:02 mwhudson

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)

minux avatar Feb 17 '15 05:02 minux

Open fixed in eb9af0c

davecheney avatar Feb 17 '15 05:02 davecheney

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

minux avatar Feb 18 '15 20:02 minux

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 avatar Feb 19 '15 01:02 minux

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

minux avatar Feb 19 '15 01:02 minux

Fixed most of them, go test os passes.

4ad avatar Feb 19 '15 16:02 4ad

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

4ad avatar Feb 23 '15 13:02 4ad