public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* Unexpected syscalls on 64-bit arches
@ 2004-04-16 21:08 Jakub Jelinek
  2004-04-16 21:38 ` David Mosberger
  2004-04-16 21:43 ` David S. Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Jelinek @ 2004-04-16 21:08 UTC (permalink / raw)
  To: linux-arch; +Cc: drepper

Hi!

While updating our glibc-kernheaders asm*/unistd.h tables, I have noticed
a bunch of syscalls which IMHO should have never been added:

asm-ia64/unistd.h:
#define __NR_fstatfs64                  1257
#define __NR_statfs64                   1258
asm-ppc64/unistd.h:
#define __NR_statfs64           252
#define __NR_fstatfs64          253
#define __NR_fadvise64_64       254
asm-s390/unistd.h:
#define __NR_statfs64           265
#define __NR_fstatfs64          266
but doesn't have
#undef __NR_statfs64
and
#undef __NR_fstatfs64
in the __s390x__ section
asm-sparc64/unistd.h:
#define __NR_statfs64           234 /* Linux Specific                              */
#define __NR_fstatfs64          235 /* Linux Specific                              */
#define __NR_fadvise64_64       210 /* Linux Specific                              */

On all these arches, struct statfs and struct statfs64 are identical,
thus __NR_statfs64 is a dup of __NR_statfs and __NR_fstatfs64 is a dup of
__NR_fstatfs.
Similarly, __NR_fadvise64_64 is a dup of __NR_fadvise64_64.

At least from glibc's point of view, these syscalls will never be used
on 64-bit arches, so IMHO they should be at least killed from the
unistd.h headers to avoid confusion and maybe nuked from the syscall tables
as well.

	Jakub

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Unexpected syscalls on 64-bit arches
  2004-04-16 21:08 Unexpected syscalls on 64-bit arches Jakub Jelinek
@ 2004-04-16 21:38 ` David Mosberger
  2004-04-16 21:43 ` David S. Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Mosberger @ 2004-04-16 21:38 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: linux-arch, drepper

>>>>> On Fri, 16 Apr 2004 17:08:03 -0400, Jakub Jelinek <jakub@redhat.com> said:

  Jakub> On all these arches, struct statfs and struct statfs64 are
  Jakub> identical,

Yes.

  Jakub> thus __NR_statfs64 is a dup of __NR_statfs and
  Jakub> __NR_fstatfs64 is a dup of __NR_fstatfs.

But sys_{f,}statfs64() does take an additional "size" argument.
Perhaps the intention was to enable extensibility?

	--david

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Unexpected syscalls on 64-bit arches
  2004-04-16 21:08 Unexpected syscalls on 64-bit arches Jakub Jelinek
  2004-04-16 21:38 ` David Mosberger
@ 2004-04-16 21:43 ` David S. Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2004-04-16 21:43 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: linux-arch, drepper

On Fri, 16 Apr 2004 17:08:03 -0400
Jakub Jelinek <jakub@redhat.com> wrote:

> At least from glibc's point of view, these syscalls will never be used
> on 64-bit arches, so IMHO they should be at least killed from the
> unistd.h headers to avoid confusion and maybe nuked from the syscall tables
> as well.

I agree perhaps about unistd.h removal, but there is danger that some
binary might invoke it so better not remove it from the syscall
tables.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-04-16 21:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-16 21:08 Unexpected syscalls on 64-bit arches Jakub Jelinek
2004-04-16 21:38 ` David Mosberger
2004-04-16 21:43 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox