* syscall table discrepancies
@ 2017-02-17 1:51 Rich Felker
2017-02-17 2:00 ` Rich Felker
0 siblings, 1 reply; 6+ messages in thread
From: Rich Felker @ 2017-02-17 1:51 UTC (permalink / raw)
To: musl
Szabolcs Nagy worked out diffs of musl's idea of the syscalls for each
arch vs the kernel's which I'm pasting below; I'll follow up with
comments as a reply.
aarch64
-o__NR_fstatat 79
+o__NR_newfstatat 79
-o__NR_or1k_atomic 244
arm
+o__NR_arm_fadvise64_64 270
+o__NR_arm_sync_file_range 341
-o__NR_fadvise64_64 270
i386
-o__NR_madvise1 219
microblaze
-o__NR_fadvise 250
+o__NR_fadvise64 250
-o__NR_fstatat 300
+o__NR_fstatat64 300
-o__NR_pread 180
+o__NR_pread64 180
-o__NR_pwrite 181
+o__NR_pwrite64 181
mips
+o__NR__newselect 4142
-o__NR_fadvise 4254
+o__NR_fadvise64 4254
-o__NR_fstatat 4293
+o__NR_fstatat64 4293
-o__NR_pread 4200
+o__NR_pread64 4200
-o__NR_pwrite 4201
+o__NR_pwrite64 4201
-o__NR_select 4142
mipsn32
-o__NR_fstatat 6256
+o__NR_newfstatat 6256
or1k
-o__NR__llseek 62
+o__NR_llseek 62
powerpc
-o__NR_getresgid32 170
-o__NR_getresuid32 165
-o__NR_setresgid32 169
-o__NR_setresuid32 164
-o__NR_timerfd 306
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: syscall table discrepancies
2017-02-17 1:51 syscall table discrepancies Rich Felker
@ 2017-02-17 2:00 ` Rich Felker
2017-02-18 2:41 ` Szabolcs Nagy
0 siblings, 1 reply; 6+ messages in thread
From: Rich Felker @ 2017-02-17 2:00 UTC (permalink / raw)
To: musl
On Thu, Feb 16, 2017 at 08:51:47PM -0500, Rich Felker wrote:
> Szabolcs Nagy worked out diffs of musl's idea of the syscalls for each
> arch vs the kernel's which I'm pasting below; I'll follow up with
> comments as a reply.
>
> aarch64
> -o__NR_fstatat 79
> +o__NR_newfstatat 79
This is just a matter of naming and does not affect correct
compilation of musl (musl remaps this anyway in
src/internal/syscall.h) but it can affect third-party code that
expects specific names; compiler-rt hit this. I think it should be
fixed.
> -o__NR_or1k_atomic 244
Obvious foreign-arch cruft that should be removed.
> arm
> +o__NR_arm_fadvise64_64 270
> +o__NR_arm_sync_file_range 341
> -o__NR_fadvise64_64 270
Also a naming matter and one I'd probably rather not change, though
I'm not sure. It looks like powerpc has the same nonstandard arg order
for fadvise but doesn't use a different name, so it's not really
helpful for arm to use a different name here.
Not sure about sync_file_range; it might suggest we have a bug.
> i386
> -o__NR_madvise1 219
I think this is cruft that was removed...?
> microblaze
> -o__NR_fadvise 250
> +o__NR_fadvise64 250
> -o__NR_fstatat 300
> +o__NR_fstatat64 300
> -o__NR_pread 180
> +o__NR_pread64 180
> -o__NR_pwrite 181
> +o__NR_pwrite64 181
These should probably be renamed to match the kernel;
src/internal/syscall.h renames them back anyway, but third-party code
may expect the kernel's names.
> mips
> +o__NR__newselect 4142
> -o__NR_fadvise 4254
> +o__NR_fadvise64 4254
> -o__NR_fstatat 4293
> +o__NR_fstatat64 4293
> -o__NR_pread 4200
> +o__NR_pread64 4200
> -o__NR_pwrite 4201
> +o__NR_pwrite64 4201
> -o__NR_select 4142
Likewise here.
> mipsn32
> -o__NR_fstatat 6256
> +o__NR_newfstatat 6256
Purely a naming issue, but should be changed I think.
> or1k
> -o__NR__llseek 62
> +o__NR_llseek 62
This looks like a bug that probably has lseek broken on or1k with
files larger than 2GB... I think the #else case in lseek.c should
probably be tweaked to produce a compile-time error if syscall_arg_t
is 32-bit. That would also catch musl's equivalent of this n32 bug
which remains unfixed:
https://sourceware.org/ml/libc-alpha/2017-01/msg00074.html
> powerpc
> -o__NR_getresgid32 170
> -o__NR_getresuid32 165
> -o__NR_setresgid32 169
> -o__NR_setresuid32 164
These can probably be safely removed; I suspect they were cruft from
before the general renaming in src/internal/syscall.h was in place.
> -o__NR_timerfd 306
Also a leftover/legacy name, I presume?
Rich
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: syscall table discrepancies
2017-02-17 2:00 ` Rich Felker
@ 2017-02-18 2:41 ` Szabolcs Nagy
2017-02-18 4:32 ` Rich Felker
2017-06-18 12:00 ` Szabolcs Nagy
0 siblings, 2 replies; 6+ messages in thread
From: Szabolcs Nagy @ 2017-02-18 2:41 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]
* Rich Felker <dalias@libc.org> [2017-02-16 21:00:44 -0500]:
> On Thu, Feb 16, 2017 at 08:51:47PM -0500, Rich Felker wrote:
> > arm
> > +o__NR_arm_fadvise64_64 270
> > +o__NR_arm_sync_file_range 341
> > -o__NR_fadvise64_64 270
>
> Also a naming matter and one I'd probably rather not change, though
> I'm not sure. It looks like powerpc has the same nonstandard arg order
> for fadvise but doesn't use a different name, so it's not really
> helpful for arm to use a different name here.
>
> Not sure about sync_file_range; it might suggest we have a bug.
it's just an alias, i added the arm names, kept the normal name
> > i386
> > -o__NR_madvise1 219
>
> I think this is cruft that was removed...?
linux removed it, i removed it too
> > or1k
> > -o__NR__llseek 62
> > +o__NR_llseek 62
>
> This looks like a bug that probably has lseek broken on or1k with
> files larger than 2GB... I think the #else case in lseek.c should
it's a naming issue, i added the new name, but kept the old one
for now.
__NR_lseek would be a bug
__NR__llseek is the old name of the syscall.
__NR_llseek is how new 32bit arches call it.
> probably be tweaked to produce a compile-time error if syscall_arg_t
> is 32-bit. That would also catch musl's equivalent of this n32 bug
> which remains unfixed:
>
> https://sourceware.org/ml/libc-alpha/2017-01/msg00074.html
>
> > powerpc
> > -o__NR_getresgid32 170
> > -o__NR_getresuid32 165
> > -o__NR_setresgid32 169
> > -o__NR_setresuid32 164
>
> These can probably be safely removed; I suspect they were cruft from
> before the general renaming in src/internal/syscall.h was in place.
>
> > -o__NR_timerfd 306
>
> Also a leftover/legacy name, I presume?
i dropped these.
[-- Attachment #2: 0001-make-syscall.h-consistent-with-linux.patch --]
[-- Type: text/x-diff, Size: 8050 bytes --]
From 8057a8d5f5e6e53a81b9e485ed36b746f43efd69 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 18 Feb 2017 00:50:09 +0000
Subject: [PATCH] make syscall.h consistent with linux
most of the found naming differences don't matter to musl, because
internally it unifies the syscall names that vary across targets,
but for external code the names should match the kernel uapi.
aarch64:
__NR_fstatat is called __NR_newfstatat in linux.
__NR_or1k_atomic got mistakenly copied from or1k.
arm:
__NR_arm_sync_file_range is an alias for __NR_sync_file_range2
__NR_fadvise64_64 is called __NR_arm_fadvise64_64 in linux,
the old non-arm name is kept too, it should not cause issues.
(powerpc has similar nonstandard fadvise and it uses the
normal name.)
i386:
__NR_madvise1 was removed from linux in commit
303395ac3bf3e2cb488435537d416bc840438fcb 2011-11-11
microblaze:
__NR_fadvise, __NR_fstatat, __NR_pread, __NR_pwrite
had different name in linux.
mips:
__NR_fadvise, __NR_fstatat, __NR_pread, __NR_pwrite, __NR_select
had different name in linux.
mipsn32:
__NR_fstatat is called __NR_newfstatat in linux.
or1k:
__NR__llseek is called __NR_llseek in linux.
the old name is kept too because that's the name musl uses
internally.
powerpc:
__NR_{get,set}res{gid,uid}32 was never present in powerpc linux.
__NR_timerfd was briefly defined in linux but then got renamed.
---
arch/aarch64/bits/syscall.h.in | 3 +--
arch/arm/bits/syscall.h.in | 2 ++
arch/i386/bits/syscall.h.in | 1 -
arch/microblaze/bits/syscall.h.in | 8 ++++----
arch/mips/bits/syscall.h.in | 10 +++++-----
arch/mipsn32/bits/syscall.h.in | 2 +-
arch/or1k/bits/syscall.h.in | 1 +
arch/powerpc/bits/syscall.h.in | 5 -----
8 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/arch/aarch64/bits/syscall.h.in b/arch/aarch64/bits/syscall.h.in
index fd388eec..8b56afff 100644
--- a/arch/aarch64/bits/syscall.h.in
+++ b/arch/aarch64/bits/syscall.h.in
@@ -77,7 +77,7 @@
#define __NR_splice 76
#define __NR_tee 77
#define __NR_readlinkat 78
-#define __NR_fstatat 79
+#define __NR_newfstatat 79
#define __NR_fstat 80
#define __NR_sync 81
#define __NR_fsync 82
@@ -242,7 +242,6 @@
#define __NR_perf_event_open 241
#define __NR_accept4 242
#define __NR_recvmmsg 243
-#define __NR_or1k_atomic 244
#define __NR_wait4 260
#define __NR_prlimit64 261
#define __NR_fanotify_init 262
diff --git a/arch/arm/bits/syscall.h.in b/arch/arm/bits/syscall.h.in
index 9b129b23..0096fe7c 100644
--- a/arch/arm/bits/syscall.h.in
+++ b/arch/arm/bits/syscall.h.in
@@ -224,6 +224,7 @@
#define __NR_tgkill 268
#define __NR_utimes 269
#define __NR_fadvise64_64 270
+#define __NR_arm_fadvise64_64 270
#define __NR_pciconfig_iobase 271
#define __NR_pciconfig_read 272
#define __NR_pciconfig_write 273
@@ -295,6 +296,7 @@
#define __NR_get_robust_list 339
#define __NR_splice 340
#define __NR_sync_file_range2 341
+#define __NR_arm_sync_file_range 341
#define __NR_tee 342
#define __NR_vmsplice 343
#define __NR_move_pages 344
diff --git a/arch/i386/bits/syscall.h.in b/arch/i386/bits/syscall.h.in
index 3a1d9270..1217f89a 100644
--- a/arch/i386/bits/syscall.h.in
+++ b/arch/i386/bits/syscall.h.in
@@ -218,7 +218,6 @@
#define __NR_pivot_root 217
#define __NR_mincore 218
#define __NR_madvise 219
-#define __NR_madvise1 219
#define __NR_getdents64 220
#define __NR_fcntl64 221
/* 223 is unused */
diff --git a/arch/microblaze/bits/syscall.h.in b/arch/microblaze/bits/syscall.h.in
index 109fcdeb..e5f928e3 100644
--- a/arch/microblaze/bits/syscall.h.in
+++ b/arch/microblaze/bits/syscall.h.in
@@ -178,8 +178,8 @@
#define __NR_rt_sigtimedwait 177
#define __NR_rt_sigqueueinfo 178
#define __NR_rt_sigsuspend 179
-#define __NR_pread 180
-#define __NR_pwrite 181
+#define __NR_pread64 180
+#define __NR_pwrite64 181
#define __NR_chown 182
#define __NR_getcwd 183
#define __NR_capget 184
@@ -246,7 +246,7 @@
#define __NR_io_getevents 247
#define __NR_io_submit 248
#define __NR_io_cancel 249
-#define __NR_fadvise 250
+#define __NR_fadvise64 250
#define __NR_exit_group 252
#define __NR_lookup_dcookie 253
#define __NR_epoll_create 254
@@ -294,7 +294,7 @@
#define __NR_mknodat 297
#define __NR_fchownat 298
#define __NR_futimesat 299
-#define __NR_fstatat 300
+#define __NR_fstatat64 300
#define __NR_unlinkat 301
#define __NR_renameat 302
#define __NR_linkat 303
diff --git a/arch/mips/bits/syscall.h.in b/arch/mips/bits/syscall.h.in
index 6c9b3d8c..1a2147a7 100644
--- a/arch/mips/bits/syscall.h.in
+++ b/arch/mips/bits/syscall.h.in
@@ -140,7 +140,7 @@
#define __NR_setfsgid 4139
#define __NR__llseek 4140
#define __NR_getdents 4141
-#define __NR_select 4142
+#define __NR__newselect 4142
#define __NR_flock 4143
#define __NR_msync 4144
#define __NR_readv 4145
@@ -198,8 +198,8 @@
#define __NR_rt_sigtimedwait 4197
#define __NR_rt_sigqueueinfo 4198
#define __NR_rt_sigsuspend 4199
-#define __NR_pread 4200
-#define __NR_pwrite 4201
+#define __NR_pread64 4200
+#define __NR_pwrite64 4201
#define __NR_chown 4202
#define __NR_getcwd 4203
#define __NR_capget 4204
@@ -252,7 +252,7 @@
#define __NR_remap_file_pages 4251
#define __NR_set_tid_address 4252
#define __NR_restart_syscall 4253
-#define __NR_fadvise 4254
+#define __NR_fadvise64 4254
#define __NR_statfs64 4255
#define __NR_fstatfs64 4256
#define __NR_timer_create 4257
@@ -290,7 +290,7 @@
#define __NR_mknodat 4290
#define __NR_fchownat 4291
#define __NR_futimesat 4292
-#define __NR_fstatat 4293
+#define __NR_fstatat64 4293
#define __NR_unlinkat 4294
#define __NR_renameat 4295
#define __NR_linkat 4296
diff --git a/arch/mipsn32/bits/syscall.h.in b/arch/mipsn32/bits/syscall.h.in
index d6b24e8f..cd843a76 100644
--- a/arch/mipsn32/bits/syscall.h.in
+++ b/arch/mipsn32/bits/syscall.h.in
@@ -253,7 +253,7 @@
#define __NR_mknodat 6253
#define __NR_fchownat 6254
#define __NR_futimesat 6255
-#define __NR_fstatat 6256
+#define __NR_newfstatat 6256
#define __NR_unlinkat 6257
#define __NR_renameat 6258
#define __NR_linkat 6259
diff --git a/arch/or1k/bits/syscall.h.in b/arch/or1k/bits/syscall.h.in
index 89788a9d..54581fb4 100644
--- a/arch/or1k/bits/syscall.h.in
+++ b/arch/or1k/bits/syscall.h.in
@@ -61,6 +61,7 @@
#define __NR_quotactl 60
#define __NR_getdents64 61
#define __NR__llseek 62
+#define __NR_llseek 62
#define __NR_read 63
#define __NR_write 64
#define __NR_readv 65
diff --git a/arch/powerpc/bits/syscall.h.in b/arch/powerpc/bits/syscall.h.in
index 9d022321..35f7033e 100644
--- a/arch/powerpc/bits/syscall.h.in
+++ b/arch/powerpc/bits/syscall.h.in
@@ -162,16 +162,12 @@
#define __NR_sched_rr_get_interval 161
#define __NR_nanosleep 162
#define __NR_mremap 163
-#define __NR_setresuid32 164
#define __NR_setresuid 164
-#define __NR_getresuid32 165
#define __NR_getresuid 165
#define __NR_query_module 166
#define __NR_poll 167
#define __NR_nfsservctl 168
-#define __NR_setresgid32 169
#define __NR_setresgid 169
-#define __NR_getresgid32 170
#define __NR_getresgid 170
#define __NR_prctl 171
#define __NR_rt_sigreturn 172
@@ -306,7 +302,6 @@
#define __NR_epoll_pwait 303
#define __NR_utimensat 304
#define __NR_signalfd 305
-#define __NR_timerfd 306
#define __NR_timerfd_create 306
#define __NR_eventfd 307
#define __NR_sync_file_range2 308
--
2.11.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: syscall table discrepancies
2017-02-18 2:41 ` Szabolcs Nagy
@ 2017-02-18 4:32 ` Rich Felker
2017-02-18 17:19 ` Szabolcs Nagy
2017-06-18 12:00 ` Szabolcs Nagy
1 sibling, 1 reply; 6+ messages in thread
From: Rich Felker @ 2017-02-18 4:32 UTC (permalink / raw)
To: musl
On Sat, Feb 18, 2017 at 03:41:29AM +0100, Szabolcs Nagy wrote:
> * Rich Felker <dalias@libc.org> [2017-02-16 21:00:44 -0500]:
> > On Thu, Feb 16, 2017 at 08:51:47PM -0500, Rich Felker wrote:
> > > arm
> > > +o__NR_arm_fadvise64_64 270
> > > +o__NR_arm_sync_file_range 341
> > > -o__NR_fadvise64_64 270
> >
> > Also a naming matter and one I'd probably rather not change, though
> > I'm not sure. It looks like powerpc has the same nonstandard arg order
> > for fadvise but doesn't use a different name, so it's not really
> > helpful for arm to use a different name here.
> >
> > Not sure about sync_file_range; it might suggest we have a bug.
>
> it's just an alias, i added the arm names, kept the normal name
OK. Alternatively, if we wanted to have the public header more like
Linux, src/internal/syscall.h could just have
#ifdef SYS_arm_fadvise64_64
#define SYS_fadvise64_64 SYS_arm_fadvise64_64
#endif
Not sure if this is better or worse.
> > > i386
> > > -o__NR_madvise1 219
> >
> > I think this is cruft that was removed...?
>
> linux removed it, i removed it too
Fine.
> > > or1k
> > > -o__NR__llseek 62
> > > +o__NR_llseek 62
> >
> > This looks like a bug that probably has lseek broken on or1k with
> > files larger than 2GB... I think the #else case in lseek.c should
>
> it's a naming issue, i added the new name, but kept the old one
> for now.
Indeed, I misread the direction of the diff. But perhaps we should use
the upstream/reasonable name and have:
#ifdef SYS__llseek
#define SYS_llseek SYS__llseek
#endif
in src/internal/syscall.h, and use SYS_llseek in the source files.
Thoughts?
> __NR_lseek would be a bug
Yes, I thought we were missing the define for SYS__llseek and thus
that lseek.c would fallback to this and have a bug.
> __NR__llseek is the old name of the syscall.
> __NR_llseek is how new 32bit arches call it.
*nod* makes sense.
> > probably be tweaked to produce a compile-time error if syscall_arg_t
> > is 32-bit. That would also catch musl's equivalent of this n32 bug
> > which remains unfixed:
> >
> > https://sourceware.org/ml/libc-alpha/2017-01/msg00074.html
> >
> > > powerpc
> > > -o__NR_getresgid32 170
> > > -o__NR_getresuid32 165
> > > -o__NR_setresgid32 169
> > > -o__NR_setresuid32 164
> >
> > These can probably be safely removed; I suspect they were cruft from
> > before the general renaming in src/internal/syscall.h was in place.
> >
> > > -o__NR_timerfd 306
> >
> > Also a leftover/legacy name, I presume?
>
> i dropped these.
Looks good. I don't think there's anything wrong with the patch as-is.
If no one else sees any problems I think I'll commit it as-is and we
can discuss further improvements separately; holding up the patch for
tweaks would be pretty bleh.
Rich
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: syscall table discrepancies
2017-02-18 4:32 ` Rich Felker
@ 2017-02-18 17:19 ` Szabolcs Nagy
0 siblings, 0 replies; 6+ messages in thread
From: Szabolcs Nagy @ 2017-02-18 17:19 UTC (permalink / raw)
To: musl
* Rich Felker <dalias@libc.org> [2017-02-17 23:32:12 -0500]:
> On Sat, Feb 18, 2017 at 03:41:29AM +0100, Szabolcs Nagy wrote:
> > > > or1k
> > > > -o__NR__llseek 62
> > > > +o__NR_llseek 62
>
> Indeed, I misread the direction of the diff. But perhaps we should use
> the upstream/reasonable name and have:
>
> #ifdef SYS__llseek
> #define SYS_llseek SYS__llseek
> #endif
>
> in src/internal/syscall.h, and use SYS_llseek in the source files.
> Thoughts?
makes sense, SYS_llseek will be the name on future 32bit archs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: syscall table discrepancies
2017-02-18 2:41 ` Szabolcs Nagy
2017-02-18 4:32 ` Rich Felker
@ 2017-06-18 12:00 ` Szabolcs Nagy
1 sibling, 0 replies; 6+ messages in thread
From: Szabolcs Nagy @ 2017-06-18 12:00 UTC (permalink / raw)
To: musl
* Szabolcs Nagy <nsz@port70.net> [2017-02-18 03:41:29 +0100]:
> * Rich Felker <dalias@libc.org> [2017-02-16 21:00:44 -0500]:
> > On Thu, Feb 16, 2017 at 08:51:47PM -0500, Rich Felker wrote:
> > > arm
> > > +o__NR_arm_fadvise64_64 270
> > > +o__NR_arm_sync_file_range 341
> > > -o__NR_fadvise64_64 270
> >
> > Also a naming matter and one I'd probably rather not change, though
> > I'm not sure. It looks like powerpc has the same nonstandard arg order
> > for fadvise but doesn't use a different name, so it's not really
> > helpful for arm to use a different name here.
> >
> > Not sure about sync_file_range; it might suggest we have a bug.
>
> it's just an alias, i added the arm names, kept the normal name
>
> > > i386
> > > -o__NR_madvise1 219
> >
> > I think this is cruft that was removed...?
>
> linux removed it, i removed it too
>
> > > or1k
> > > -o__NR__llseek 62
> > > +o__NR_llseek 62
> >
> > This looks like a bug that probably has lseek broken on or1k with
> > files larger than 2GB... I think the #else case in lseek.c should
>
> it's a naming issue, i added the new name, but kept the old one
> for now.
>
> __NR_lseek would be a bug
> __NR__llseek is the old name of the syscall.
> __NR_llseek is how new 32bit arches call it.
>
> > probably be tweaked to produce a compile-time error if syscall_arg_t
> > is 32-bit. That would also catch musl's equivalent of this n32 bug
> > which remains unfixed:
> >
> > https://sourceware.org/ml/libc-alpha/2017-01/msg00074.html
> >
> > > powerpc
> > > -o__NR_getresgid32 170
> > > -o__NR_getresuid32 165
> > > -o__NR_setresgid32 169
> > > -o__NR_setresuid32 164
> >
> > These can probably be safely removed; I suspect they were cruft from
> > before the general renaming in src/internal/syscall.h was in place.
> >
> > > -o__NR_timerfd 306
> >
> > Also a leftover/legacy name, I presume?
>
> i dropped these.
> >From 8057a8d5f5e6e53a81b9e485ed36b746f43efd69 Mon Sep 17 00:00:00 2001
> From: Szabolcs Nagy <nsz@port70.net>
> Date: Sat, 18 Feb 2017 00:50:09 +0000
> Subject: [PATCH] make syscall.h consistent with linux
>
> most of the found naming differences don't matter to musl, because
> internally it unifies the syscall names that vary across targets,
> but for external code the names should match the kernel uapi.
>
> aarch64:
> __NR_fstatat is called __NR_newfstatat in linux.
> __NR_or1k_atomic got mistakenly copied from or1k.
> arm:
> __NR_arm_sync_file_range is an alias for __NR_sync_file_range2
> __NR_fadvise64_64 is called __NR_arm_fadvise64_64 in linux,
> the old non-arm name is kept too, it should not cause issues.
> (powerpc has similar nonstandard fadvise and it uses the
> normal name.)
> i386:
> __NR_madvise1 was removed from linux in commit
> 303395ac3bf3e2cb488435537d416bc840438fcb 2011-11-11
> microblaze:
> __NR_fadvise, __NR_fstatat, __NR_pread, __NR_pwrite
> had different name in linux.
> mips:
> __NR_fadvise, __NR_fstatat, __NR_pread, __NR_pwrite, __NR_select
> had different name in linux.
> mipsn32:
> __NR_fstatat is called __NR_newfstatat in linux.
> or1k:
> __NR__llseek is called __NR_llseek in linux.
> the old name is kept too because that's the name musl uses
> internally.
> powerpc:
> __NR_{get,set}res{gid,uid}32 was never present in powerpc linux.
> __NR_timerfd was briefly defined in linux but then got renamed.
> ---
ping.
> arch/aarch64/bits/syscall.h.in | 3 +--
> arch/arm/bits/syscall.h.in | 2 ++
> arch/i386/bits/syscall.h.in | 1 -
> arch/microblaze/bits/syscall.h.in | 8 ++++----
> arch/mips/bits/syscall.h.in | 10 +++++-----
> arch/mipsn32/bits/syscall.h.in | 2 +-
> arch/or1k/bits/syscall.h.in | 1 +
> arch/powerpc/bits/syscall.h.in | 5 -----
> 8 files changed, 14 insertions(+), 18 deletions(-)
>
> diff --git a/arch/aarch64/bits/syscall.h.in b/arch/aarch64/bits/syscall.h.in
> index fd388eec..8b56afff 100644
> --- a/arch/aarch64/bits/syscall.h.in
> +++ b/arch/aarch64/bits/syscall.h.in
> @@ -77,7 +77,7 @@
> #define __NR_splice 76
> #define __NR_tee 77
> #define __NR_readlinkat 78
> -#define __NR_fstatat 79
> +#define __NR_newfstatat 79
> #define __NR_fstat 80
> #define __NR_sync 81
> #define __NR_fsync 82
> @@ -242,7 +242,6 @@
> #define __NR_perf_event_open 241
> #define __NR_accept4 242
> #define __NR_recvmmsg 243
> -#define __NR_or1k_atomic 244
> #define __NR_wait4 260
> #define __NR_prlimit64 261
> #define __NR_fanotify_init 262
> diff --git a/arch/arm/bits/syscall.h.in b/arch/arm/bits/syscall.h.in
> index 9b129b23..0096fe7c 100644
> --- a/arch/arm/bits/syscall.h.in
> +++ b/arch/arm/bits/syscall.h.in
> @@ -224,6 +224,7 @@
> #define __NR_tgkill 268
> #define __NR_utimes 269
> #define __NR_fadvise64_64 270
> +#define __NR_arm_fadvise64_64 270
> #define __NR_pciconfig_iobase 271
> #define __NR_pciconfig_read 272
> #define __NR_pciconfig_write 273
> @@ -295,6 +296,7 @@
> #define __NR_get_robust_list 339
> #define __NR_splice 340
> #define __NR_sync_file_range2 341
> +#define __NR_arm_sync_file_range 341
> #define __NR_tee 342
> #define __NR_vmsplice 343
> #define __NR_move_pages 344
> diff --git a/arch/i386/bits/syscall.h.in b/arch/i386/bits/syscall.h.in
> index 3a1d9270..1217f89a 100644
> --- a/arch/i386/bits/syscall.h.in
> +++ b/arch/i386/bits/syscall.h.in
> @@ -218,7 +218,6 @@
> #define __NR_pivot_root 217
> #define __NR_mincore 218
> #define __NR_madvise 219
> -#define __NR_madvise1 219
> #define __NR_getdents64 220
> #define __NR_fcntl64 221
> /* 223 is unused */
> diff --git a/arch/microblaze/bits/syscall.h.in b/arch/microblaze/bits/syscall.h.in
> index 109fcdeb..e5f928e3 100644
> --- a/arch/microblaze/bits/syscall.h.in
> +++ b/arch/microblaze/bits/syscall.h.in
> @@ -178,8 +178,8 @@
> #define __NR_rt_sigtimedwait 177
> #define __NR_rt_sigqueueinfo 178
> #define __NR_rt_sigsuspend 179
> -#define __NR_pread 180
> -#define __NR_pwrite 181
> +#define __NR_pread64 180
> +#define __NR_pwrite64 181
> #define __NR_chown 182
> #define __NR_getcwd 183
> #define __NR_capget 184
> @@ -246,7 +246,7 @@
> #define __NR_io_getevents 247
> #define __NR_io_submit 248
> #define __NR_io_cancel 249
> -#define __NR_fadvise 250
> +#define __NR_fadvise64 250
> #define __NR_exit_group 252
> #define __NR_lookup_dcookie 253
> #define __NR_epoll_create 254
> @@ -294,7 +294,7 @@
> #define __NR_mknodat 297
> #define __NR_fchownat 298
> #define __NR_futimesat 299
> -#define __NR_fstatat 300
> +#define __NR_fstatat64 300
> #define __NR_unlinkat 301
> #define __NR_renameat 302
> #define __NR_linkat 303
> diff --git a/arch/mips/bits/syscall.h.in b/arch/mips/bits/syscall.h.in
> index 6c9b3d8c..1a2147a7 100644
> --- a/arch/mips/bits/syscall.h.in
> +++ b/arch/mips/bits/syscall.h.in
> @@ -140,7 +140,7 @@
> #define __NR_setfsgid 4139
> #define __NR__llseek 4140
> #define __NR_getdents 4141
> -#define __NR_select 4142
> +#define __NR__newselect 4142
> #define __NR_flock 4143
> #define __NR_msync 4144
> #define __NR_readv 4145
> @@ -198,8 +198,8 @@
> #define __NR_rt_sigtimedwait 4197
> #define __NR_rt_sigqueueinfo 4198
> #define __NR_rt_sigsuspend 4199
> -#define __NR_pread 4200
> -#define __NR_pwrite 4201
> +#define __NR_pread64 4200
> +#define __NR_pwrite64 4201
> #define __NR_chown 4202
> #define __NR_getcwd 4203
> #define __NR_capget 4204
> @@ -252,7 +252,7 @@
> #define __NR_remap_file_pages 4251
> #define __NR_set_tid_address 4252
> #define __NR_restart_syscall 4253
> -#define __NR_fadvise 4254
> +#define __NR_fadvise64 4254
> #define __NR_statfs64 4255
> #define __NR_fstatfs64 4256
> #define __NR_timer_create 4257
> @@ -290,7 +290,7 @@
> #define __NR_mknodat 4290
> #define __NR_fchownat 4291
> #define __NR_futimesat 4292
> -#define __NR_fstatat 4293
> +#define __NR_fstatat64 4293
> #define __NR_unlinkat 4294
> #define __NR_renameat 4295
> #define __NR_linkat 4296
> diff --git a/arch/mipsn32/bits/syscall.h.in b/arch/mipsn32/bits/syscall.h.in
> index d6b24e8f..cd843a76 100644
> --- a/arch/mipsn32/bits/syscall.h.in
> +++ b/arch/mipsn32/bits/syscall.h.in
> @@ -253,7 +253,7 @@
> #define __NR_mknodat 6253
> #define __NR_fchownat 6254
> #define __NR_futimesat 6255
> -#define __NR_fstatat 6256
> +#define __NR_newfstatat 6256
> #define __NR_unlinkat 6257
> #define __NR_renameat 6258
> #define __NR_linkat 6259
> diff --git a/arch/or1k/bits/syscall.h.in b/arch/or1k/bits/syscall.h.in
> index 89788a9d..54581fb4 100644
> --- a/arch/or1k/bits/syscall.h.in
> +++ b/arch/or1k/bits/syscall.h.in
> @@ -61,6 +61,7 @@
> #define __NR_quotactl 60
> #define __NR_getdents64 61
> #define __NR__llseek 62
> +#define __NR_llseek 62
> #define __NR_read 63
> #define __NR_write 64
> #define __NR_readv 65
> diff --git a/arch/powerpc/bits/syscall.h.in b/arch/powerpc/bits/syscall.h.in
> index 9d022321..35f7033e 100644
> --- a/arch/powerpc/bits/syscall.h.in
> +++ b/arch/powerpc/bits/syscall.h.in
> @@ -162,16 +162,12 @@
> #define __NR_sched_rr_get_interval 161
> #define __NR_nanosleep 162
> #define __NR_mremap 163
> -#define __NR_setresuid32 164
> #define __NR_setresuid 164
> -#define __NR_getresuid32 165
> #define __NR_getresuid 165
> #define __NR_query_module 166
> #define __NR_poll 167
> #define __NR_nfsservctl 168
> -#define __NR_setresgid32 169
> #define __NR_setresgid 169
> -#define __NR_getresgid32 170
> #define __NR_getresgid 170
> #define __NR_prctl 171
> #define __NR_rt_sigreturn 172
> @@ -306,7 +302,6 @@
> #define __NR_epoll_pwait 303
> #define __NR_utimensat 304
> #define __NR_signalfd 305
> -#define __NR_timerfd 306
> #define __NR_timerfd_create 306
> #define __NR_eventfd 307
> #define __NR_sync_file_range2 308
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-06-18 12:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-17 1:51 syscall table discrepancies Rich Felker
2017-02-17 2:00 ` Rich Felker
2017-02-18 2:41 ` Szabolcs Nagy
2017-02-18 4:32 ` Rich Felker
2017-02-18 17:19 ` Szabolcs Nagy
2017-06-18 12:00 ` Szabolcs Nagy
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).