[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#583911: marked as done (libc6: syscall() doesn't support 6 args system calls on alpha)



Your message dated Tue, 08 Jun 2010 11:18:30 +0000
with message-id <E1OLwpC-0001Uz-61@ries.debian.org>
and subject line Bug#583911: fixed in eglibc 2.11.1-3
has caused the Debian Bug report #583911,
regarding libc6: syscall() doesn't support 6 args system calls on alpha
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
583911: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=583911
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libc6
Version: 2.11.1-1
Severity: normal
Tags: patch upstream

Some system calls, such as mmap, take 6 arguments. Unfortunatelly, the
syscall function as provided by the glibc doesn't fill the 6th argument,
and actually, the system call ends up being called with the 5th argument
copied in 6th position (technically, that's not what happens, as the args
are shifted at the end, but well).

The attached patch /should/ work. (untested).

I'm also attaching a testcase that fails on alpha because of this bug and
should work once the bug is fixed.

Cheers

Mike


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libc6 depends on:
ii  libc-bin                      2.11.1-1   Embedded GNU C Library: Binaries
ii  libgcc1                       1:4.5.0-4  GCC support library

libc6 recommends no packages.

Versions of packages libc6 suggests:
ii  debconf [debconf-2.0]         1.5.32     Debian configuration management sy
pn  glibc-doc                     <none>     (no description available)
ii  locales                       2.11.1-1   Embedded GNU C Library: National L

-- debconf information excluded
--- ./ports/sysdeps/unix/sysv/linux/alpha/syscall.S	2008-11-26 09:02:02.000000000 +0100
+++ /tmp/syscall.S	2010-05-31 16:09:54.952364393 +0200
@@ -31,13 +31,13 @@
  *
  * Usage:
  *
- * long	syscall(syscall_number, arg1, arg2, arg3, arg4, arg5)
+ * long	syscall(syscall_number, arg1, arg2, arg3, arg4, arg5, arg6)
  *
  * syscall_number = the index of the system call we're invoking
- * arg1-arg5 = up to 5 integer arguments to the system call
+ * arg1-arg6 = up to 6 integer arguments to the system call
  *
  * We need to do some arg shifting: the kernel expects the
- * syscall number in v0 and the first five args in a0-a4.
+ * syscall number in v0 and the first six args in a0-a5.
  *
  */
 
@@ -60,6 +60,7 @@
 	mov	a3, a2
 	mov	a4, a3
 	mov	a5, a4
+	ldq	a5,0(sp)	/* arg6 -> a5 */
 
 	call_pal PAL_callsys	/* Invoke system call */
 	bne	a3, $error
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/syscall.h>
#include <fcntl.h>

static int pagesize;

#if defined(SYS_mmap) || defined(SYS_mmap2)
static inline
void *_mmap(void *addr, size_t length, int prot, int flags,
                  int fd, off_t offset)
{
#ifdef SYS_mmap2
  return (caddr_t) syscall(SYS_mmap2, addr, length, prot, flags, fd, offset / 4096);
#warning mmap2
#else
  return (caddr_t) syscall(SYS_mmap, addr, length, prot, flags, fd, offset);
#warning mmap
#endif
}
#define mmap _mmap
#endif

int main(void) {
  char *buf;
  int i, fd, ret = 0;
  pagesize = sysconf(_SC_PAGESIZE);
  fd = open("/tmp/testmmap", O_CREAT | O_RDWR, 0644);
  ftruncate(fd, pagesize * 2);
  buf = mmap((void *)0, pagesize, PROT_WRITE, MAP_SHARED, fd, pagesize);
  if (buf == MAP_FAILED) {
    perror("plop");
    ret = 1;
    goto end;
  }
  for (i = 0; i < pagesize; i++)
    buf[i] = (char) i;
  munmap(buf, pagesize);
  close(fd);
  buf = malloc(pagesize);
  fd = open("/tmp/testmmap", O_RDONLY);
  lseek(fd, pagesize, SEEK_SET);
  read(fd, buf, pagesize);
  for (i = 0; i < pagesize; i++)
    if (buf[i] != (char) i) {
      ret = 1;
      break;
    }
end:
  close(fd);
  unlink("/tmp/testmmap");
  printf("%s\n", ret == 0 ? "ok" : "fail");
  return 0;
}

--- End Message ---
--- Begin Message ---
Source: eglibc
Source-Version: 2.11.1-3

We believe that the bug you reported is fixed in the latest version of
eglibc, which is due to be installed in the Debian FTP archive:

eglibc-source_2.11.1-3_all.deb
  to main/e/eglibc/eglibc-source_2.11.1-3_all.deb
eglibc_2.11.1-3.diff.gz
  to main/e/eglibc/eglibc_2.11.1-3.diff.gz
eglibc_2.11.1-3.dsc
  to main/e/eglibc/eglibc_2.11.1-3.dsc
glibc-doc_2.11.1-3_all.deb
  to main/e/eglibc/glibc-doc_2.11.1-3_all.deb
libc-bin_2.11.1-3_amd64.deb
  to main/e/eglibc/libc-bin_2.11.1-3_amd64.deb
libc-dev-bin_2.11.1-3_amd64.deb
  to main/e/eglibc/libc-dev-bin_2.11.1-3_amd64.deb
libc6-dbg_2.11.1-3_amd64.deb
  to main/e/eglibc/libc6-dbg_2.11.1-3_amd64.deb
libc6-dev-i386_2.11.1-3_amd64.deb
  to main/e/eglibc/libc6-dev-i386_2.11.1-3_amd64.deb
libc6-dev_2.11.1-3_amd64.deb
  to main/e/eglibc/libc6-dev_2.11.1-3_amd64.deb
libc6-i386_2.11.1-3_amd64.deb
  to main/e/eglibc/libc6-i386_2.11.1-3_amd64.deb
libc6-pic_2.11.1-3_amd64.deb
  to main/e/eglibc/libc6-pic_2.11.1-3_amd64.deb
libc6-prof_2.11.1-3_amd64.deb
  to main/e/eglibc/libc6-prof_2.11.1-3_amd64.deb
libc6-udeb_2.11.1-3_amd64.udeb
  to main/e/eglibc/libc6-udeb_2.11.1-3_amd64.udeb
libc6_2.11.1-3_amd64.deb
  to main/e/eglibc/libc6_2.11.1-3_amd64.deb
libnss-dns-udeb_2.11.1-3_amd64.udeb
  to main/e/eglibc/libnss-dns-udeb_2.11.1-3_amd64.udeb
libnss-files-udeb_2.11.1-3_amd64.udeb
  to main/e/eglibc/libnss-files-udeb_2.11.1-3_amd64.udeb
locales-all_2.11.1-3_amd64.deb
  to main/e/eglibc/locales-all_2.11.1-3_amd64.deb
locales_2.11.1-3_all.deb
  to main/e/eglibc/locales_2.11.1-3_all.deb
nscd_2.11.1-3_amd64.deb
  to main/e/eglibc/nscd_2.11.1-3_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 583911@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aurelien Jarno <aurel32@debian.org> (supplier of updated eglibc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 08 Jun 2010 10:05:49 +0200
Source: eglibc
Binary: libc-bin libc-dev-bin glibc-doc eglibc-source locales locales-all nscd libc6 libc6-dev libc6-dbg libc6-prof libc6-pic libc6-udeb libc6.1 libc6.1-dev libc6.1-dbg libc6.1-prof libc6.1-pic libc6.1-udeb libc0.3 libc0.3-dev libc0.3-dbg libc0.3-prof libc0.3-pic libc0.3-udeb libc0.1 libc0.1-dev libc0.1-dbg libc0.1-prof libc0.1-pic libc0.1-udeb libc6-i386 libc6-dev-i386 libc6-sparc64 libc6-dev-sparc64 libc6-s390x libc6-dev-s390x libc6-amd64 libc6-dev-amd64 libc6-powerpc libc6-dev-powerpc libc6-ppc64 libc6-dev-ppc64 libc6-mipsn32 libc6-dev-mipsn32 libc6-mips64 libc6-dev-mips64 libc0.1-i386 libc0.1-dev-i386 libc6-sparcv9b libc6-i686 libc6-xen libc0.1-i686 libc6.1-alphaev67 libnss-dns-udeb libnss-files-udeb
Architecture: source all amd64
Version: 2.11.1-3
Distribution: unstable
Urgency: low
Maintainer: Aurelien Jarno <aurel32@debian.org>
Changed-By: Aurelien Jarno <aurel32@debian.org>
Description: 
 eglibc-source - Embedded GNU C Library: sources
 glibc-doc  - Embedded GNU C Library: Documentation
 libc-bin   - Embedded GNU C Library: Binaries
 libc-dev-bin - Embedded GNU C Library: Development binaries
 libc0.1    - Embedded GNU C Library: Shared libraries
 libc0.1-dbg - Embedded GNU C Library: detached debugging symbols
 libc0.1-dev - Embedded GNU C Library: Development Libraries and Header Files
 libc0.1-dev-i386 - GNU C Library: 32bit development libraries for AMD64
 libc0.1-i386 - GNU C Library: 32bit shared libraries for AMD64
 libc0.1-i686 - GNU C Library: Shared libraries [i686 optimized]
 libc0.1-pic - Embedded GNU C Library: PIC archive library
 libc0.1-prof - Embedded GNU C Library: Profiling Libraries
 libc0.1-udeb - Embedded GNU C Library: Shared libraries - udeb (udeb)
 libc0.3    - Embedded GNU C Library: Shared libraries
 libc0.3-dbg - Embedded GNU C Library: detached debugging symbols
 libc0.3-dev - Embedded GNU C Library: Development Libraries and Header Files
 libc0.3-pic - Embedded GNU C Library: PIC archive library
 libc0.3-prof - Embedded GNU C Library: Profiling Libraries
 libc0.3-udeb - Embedded GNU C Library: Shared libraries - udeb (udeb)
 libc6      - Embedded GNU C Library: Shared libraries
 libc6-amd64 - GNU C Library: 64bit Shared libraries for AMD64
 libc6-dbg  - Embedded GNU C Library: detached debugging symbols
 libc6-dev  - Embedded GNU C Library: Development Libraries and Header Files
 libc6-dev-amd64 - GNU C Library: 64bit Development Libraries for AMD64
 libc6-dev-i386 - GNU C Library: 32-bit development libraries for AMD64
 libc6-dev-mips64 - GNU C Library: 64bit Development Libraries for MIPS64
 libc6-dev-mipsn32 - GNU C Library: n32 Development Libraries for MIPS64
 libc6-dev-powerpc - GNU C Library: 32bit powerpc development libraries for ppc64
 libc6-dev-ppc64 - GNU C Library: 64bit Development Libraries for PowerPC64
 libc6-dev-s390x - GNU C Library: 64bit Development Libraries for IBM zSeries
 libc6-dev-sparc64 - GNU C Library: 64bit Development Libraries for UltraSPARC
 libc6-i386 - GNU C Library: 32-bit shared libraries for AMD64
 libc6-i686 - GNU C Library: Shared libraries [i686 optimized]
 libc6-mips64 - GNU C Library: 64bit Shared libraries for MIPS64
 libc6-mipsn32 - GNU C Library: n32 Shared libraries for MIPS64
 libc6-pic  - Embedded GNU C Library: PIC archive library
 libc6-powerpc - GNU C Library: 32bit powerpc shared libraries for ppc64
 libc6-ppc64 - GNU C Library: 64bit Shared libraries for PowerPC64
 libc6-prof - Embedded GNU C Library: Profiling Libraries
 libc6-s390x - GNU C Library: 64bit Shared libraries for IBM zSeries
 libc6-sparc64 - GNU C Library: 64bit Shared libraries for UltraSPARC
 libc6-sparcv9b - GNU C Library: Shared libraries [v9b optimized]
 libc6-udeb - Embedded GNU C Library: Shared libraries - udeb (udeb)
 libc6-xen  - GNU C Library: Shared libraries [Xen version]
 libc6.1    - Embedded GNU C Library: Shared libraries
 libc6.1-alphaev67 - GNU C Library: Shared libraries (EV67 optimized)
 libc6.1-dbg - Embedded GNU C Library: detached debugging symbols
 libc6.1-dev - Embedded GNU C Library: Development Libraries and Header Files
 libc6.1-pic - Embedded GNU C Library: PIC archive library
 libc6.1-prof - Embedded GNU C Library: Profiling Libraries
 libc6.1-udeb - Embedded GNU C Library: Shared libraries - udeb (udeb)
 libnss-dns-udeb - GNU C Library: NSS helper for DNS - udeb (udeb)
 libnss-files-udeb - GNU C Library: NSS helper for files - udeb (udeb)
 locales    - Embedded GNU C Library: National Language (locale) data [support]
 locales-all - Embedded GNU C Library: Precompiled locale data
 nscd       - Embedded GNU C Library: Name Service Cache Daemon
Closes: 551903 583911 584748
Changes: 
 eglibc (2.11.1-3) unstable; urgency=low
 .
   [ Samuel Thibault ]
   * Add patches/hurd-i386/cvs-linkat.diff to fix new coreutils' ln.
   * Add patches/hurd-i386/submitted-ttyname.diff to fix io/tst-ttyname_r,
     marked as such in testsuite-checking/expected-results-i486-gnu-libc.
   * Restore patches/hurd-i386/submitted-getnprocs.diff which got lost during
     the 2.11 merge.
 .
   [ Aurelien Jarno ]
   * Add patches/i386/local-cpuid-level2.diff to not trigger an abort
     when an i586 Intel CPU is running the i686 library, as valgrind does.
     Closes: bug#584748.
   * mips testsuite: allow failure of tst-tls3 as it is not a regression.
   * Add patches/any/submitted-string2-strcmp.diff to fix warnings in the
     testsuite on armel.
   * Add patches/alpha/submitted-syscall.diff from Mike Hommey to add support
     for 6th argument system calls on alpha.  Closes: bug#583911.
   * Temporarily add patches/i386/local-pthread_cond_wait.diff to use the C
     version of pthread_cond_wait() which uses cleanup functions to reacquire
     the mutex on cancellation (instead of unwinding for the assembly
     version).  Closes: bug#551903.
Checksums-Sha1: 
 1cad3aeae6f2a21044562c91b3bc9149c984cb7a 2699 eglibc_2.11.1-3.dsc
 664fb3071af028edf43715948522eb776019ae7e 797342 eglibc_2.11.1-3.diff.gz
 924a7af7f7973943b8bd5dd9840cddced6806e2d 1841790 glibc-doc_2.11.1-3_all.deb
 5ded0aa80a6b73a4009d488bc218f28539d977ed 11053404 eglibc-source_2.11.1-3_all.deb
 72c9a611c7ecf48816169f6e2ca95506220b5785 4754814 locales_2.11.1-3_all.deb
 4f2e93bc369fb113608eeee23218978a5d97ee53 4258192 libc6_2.11.1-3_amd64.deb
 688642a071c51bba45847cbba824bc1d6fbb2916 2587088 libc6-dev_2.11.1-3_amd64.deb
 07814ce57561cae4e90ed6ec6cf1eb83cd733179 2030966 libc6-prof_2.11.1-3_amd64.deb
 74ede078aa206f843e9c6798f3a8b9f3bd3ee990 1544450 libc6-pic_2.11.1-3_amd64.deb
 e46fb652fb228f1ea40ff7b13b85c511142240e8 743920 libc-bin_2.11.1-3_amd64.deb
 4031b015b63df15e042589f4ee5105263ad7ba56 205126 libc-dev-bin_2.11.1-3_amd64.deb
 0c6f7bcd84666956a2c380dd9a30326ae540d39c 3727784 locales-all_2.11.1-3_amd64.deb
 63ee23fc3d40de742b1b9feea0ad7cd8906ba40f 3802786 libc6-i386_2.11.1-3_amd64.deb
 e3e3cc1346b6ec4f8f71f93eb0cf0e393b438913 1521912 libc6-dev-i386_2.11.1-3_amd64.deb
 aee5d1dff8de2f7d450a6c433baed77472d793e6 194100 nscd_2.11.1-3_amd64.deb
 e9d8f169aca9beb6d8e0bfc6cd318b665f7dd42e 10394942 libc6-dbg_2.11.1-3_amd64.deb
 2f94fe39e705c6f32d87b0b296e3460e163ef0f2 1151204 libc6-udeb_2.11.1-3_amd64.udeb
 a9187a09672f18bda452cab141f86c9cfb87a666 11126 libnss-dns-udeb_2.11.1-3_amd64.udeb
 b69822b04633e94197bd1eb917a798b40542e1c1 19676 libnss-files-udeb_2.11.1-3_amd64.udeb
Checksums-Sha256: 
 de21512005a948d07ca8557c94910a5e0efe8ca914e29e962d31932d0caa72af 2699 eglibc_2.11.1-3.dsc
 2c15c0c4a14ca224ecadbe10795021e3d9c1020903dcc6f1c617e72071994641 797342 eglibc_2.11.1-3.diff.gz
 bba31eb8e2ed4cdbdae67597e0ad211a04566cfeb39fe0713ccf7764691e5198 1841790 glibc-doc_2.11.1-3_all.deb
 6848d0ffecf4457f1015fe6d3b462227d345f08f231bcaf20b652f62cf0b794b 11053404 eglibc-source_2.11.1-3_all.deb
 bca82699af2dac5fc2d2760cd3c8bf321f5d2dce94ee166878240f8b3236336b 4754814 locales_2.11.1-3_all.deb
 825f8bb2b0dc444ec3dc5019a512c2008e0f3bb1db1a7c7aa036fd3af9a83cf4 4258192 libc6_2.11.1-3_amd64.deb
 ac719bfe9449a45bb192ad2edd86cc23494bb230d404c225120ca7939e4a74eb 2587088 libc6-dev_2.11.1-3_amd64.deb
 27fc4987099a01cfe6fe7008821c8fc72999d2c818bbcfce7436faa2d12e98db 2030966 libc6-prof_2.11.1-3_amd64.deb
 f8c0f30a0990d464e378dfd89f0ed02b1e1c279b6849b7834aea2db36664ca6e 1544450 libc6-pic_2.11.1-3_amd64.deb
 8122fcb2da50513cb37f89d55be51a060116ff4e0c1fe20bdd3095f6c8b27ba0 743920 libc-bin_2.11.1-3_amd64.deb
 cbf8e6da66a243af024746a54c43ac287b2c04370c86a30233cfcce49454db35 205126 libc-dev-bin_2.11.1-3_amd64.deb
 560d0e9f6c6113d5fa7715ea80c4b32eb3c6f24f30349bd383980c8160543348 3727784 locales-all_2.11.1-3_amd64.deb
 4181d8532197da23bb41167003abb2a8970bf1f93addef5343a1a4cf6d94f2e1 3802786 libc6-i386_2.11.1-3_amd64.deb
 9e1609274404507744009c7ecf621129f8552293f08069aa807a2a0bab3f3ccf 1521912 libc6-dev-i386_2.11.1-3_amd64.deb
 9e89e55674902be1e9dfb6e6b7656ae7f18e7d01a0060030e76060deb832a159 194100 nscd_2.11.1-3_amd64.deb
 ff4d894c4a588108f70bf9302bed645c47b573bf91727f95ff27d64a96056aa5 10394942 libc6-dbg_2.11.1-3_amd64.deb
 85d6a05dfe21924a2b3e7f13b008cf630357185ea3e0c980a5a43489d675868f 1151204 libc6-udeb_2.11.1-3_amd64.udeb
 0c5443ea1ad6b6c2cf3ac22bfac9c095a392b8e67d8db9b3734b560bb3c76234 11126 libnss-dns-udeb_2.11.1-3_amd64.udeb
 2c58c535dd80674f59571ce1f865831e346c895bcd388af5e3335deee9f69b9c 19676 libnss-files-udeb_2.11.1-3_amd64.udeb
Files: 
 f61fa2baabfcac2544650fbca4ba2f1e 2699 libs required eglibc_2.11.1-3.dsc
 832587e4dd6b76583016b559658b3b65 797342 libs required eglibc_2.11.1-3.diff.gz
 29dbc13bebcfde151520dad97f3f3429 1841790 doc optional glibc-doc_2.11.1-3_all.deb
 dad11c1db98a5db3954844065c0290e5 11053404 devel optional eglibc-source_2.11.1-3_all.deb
 8ad5088ca79c8a98be26439ec77f8941 4754814 localization standard locales_2.11.1-3_all.deb
 8775704c17f6fb2580bb09587e538684 4258192 libs required libc6_2.11.1-3_amd64.deb
 f2e1920d27783c7b8f52fa2ea055181d 2587088 libdevel optional libc6-dev_2.11.1-3_amd64.deb
 f66d2786a59d6ba406a1a40239f8846a 2030966 libdevel extra libc6-prof_2.11.1-3_amd64.deb
 66b6c8d46c322e0b3cc0a35bd6c2e08f 1544450 libdevel optional libc6-pic_2.11.1-3_amd64.deb
 370841bf87da1ee782426edf1d8c8a7d 743920 libs required libc-bin_2.11.1-3_amd64.deb
 8bc7cd460b167347770d79fa81f268d3 205126 libdevel optional libc-dev-bin_2.11.1-3_amd64.deb
 9d87ec796aaeb187b1bb474fe6ca3bf2 3727784 localization extra locales-all_2.11.1-3_amd64.deb
 3a4f6baf625465b5d1675c6f9bc61ee2 3802786 libs optional libc6-i386_2.11.1-3_amd64.deb
 93f2a3bd57b4383e9d24146b11e07aad 1521912 libdevel optional libc6-dev-i386_2.11.1-3_amd64.deb
 268a8d0302a9da893378f9f55e3b55c8 194100 admin optional nscd_2.11.1-3_amd64.deb
 adb4559944fba7ce2074f30d88badf87 10394942 debug extra libc6-dbg_2.11.1-3_amd64.deb
 53ff324767e4378f9619e0c19b332ee4 1151204 debian-installer extra libc6-udeb_2.11.1-3_amd64.udeb
 d0304e0deb1e1e45b61e3f157436f12d 11126 debian-installer extra libnss-dns-udeb_2.11.1-3_amd64.udeb
 c6ac5607c70daf66112c55a44b44322d 19676 debian-installer extra libnss-files-udeb_2.11.1-3_amd64.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iD8DBQFMDh+Iw3ao2vG823MRAj2yAJ9Rl3gv3WL7O+UOgc1yMMpq+V8KAQCdFAfB
0augWpOAb7KQVmm5e09UmcE=
=KrPc
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: