Skip to content

syscall, x/sys/unix: Time(), Utime(), Getrlimit() use invalid syscall number on linux/arm #14524

@hirochachacha

Description

@hirochachacha

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    any
  2. What operating system and processor architecture are you using (go env)?
    linux/arm
  3. What did you do?
    (Use play.golang.org to provide a runnable example, if possible.)
    nothing
  4. What did you expect to see?
    invalid syscall numbers are not used
  5. What did you see instead?
    invalid syscall numbers are used

As far as is known, linux/arm sycalls are slightly limited.
Here is the list taken from kernel header:

/*
 * The following syscalls are obsolete and no longer available for EABI.
 */
#if !defined(__KERNEL__)
#if defined(__ARM_EABI__)
#undef __NR_time
#undef __NR_umount
#undef __NR_stime
#undef __NR_alarm
#undef __NR_utime
#undef __NR_getrlimit
#undef __NR_select
#undef __NR_readdir
#undef __NR_mmap
#undef __NR_socketcall
#undef __NR_syscall
#undef __NR_ipc
#endif
#endif

I confirmed time, utime and getrlimit are used, others are not used in both syscall package and x/sys/unix package.

I also suggest such syscall numbers should be removed from these packages on linux/arm.
(except syscall package? because of compatibility promise)

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions