Debian Bug report logs -
#444087
klibc-utils: ipconfig fails on sparc64: eth0: socket(AF_INET): Function not implemented
Reported by: Vagrant Cascadian <vagrant+debianbugs@freegeek.org>
Date: Wed, 26 Sep 2007 00:36:01 UTC
Severity: normal
Found in versions klibc/1.5.5-1, klibc/1.5.12-2
Fixed in version klibc/1.5.17-1
Done: maximilian attems <maks@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, vagrant+debianbugs@freegeek.org, maximilian attems <maks@debian.org>:
Bug#444087; Package klibc-utils.
(full text, mbox, link).
Acknowledgement sent to Vagrant Cascadian <vagrant+debianbugs@freegeek.org>:
New Bug report received and forwarded. Copy sent to vagrant+debianbugs@freegeek.org, maximilian attems <maks@debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Package: klibc-utils
Version: 1.5.5-1
Severity: normal
snippet from attached log:
Begin: Running /scripts/init-premount ...
sunhme.c:v3.00 June 23, 2006 David S. Miller (davem@davemloft.net)
eth0: HAPPY MEAL (PCI/CheerIO) 10/100BaseT Ethernet 08:00:20:c0:68:9a
Done.
Begin: Mounting root file system... ...
Begin: Running /scripts/nfs-top ...
DonUnimplemented SPARC system call 97
Kernel panic - not syncing: Attempted to kill init!
Press Stop-A (L1-A) to return to the boot prom
e.
ipconfig: eth0: socket(AF_INET): Function not implemented
ipconfig: no devices to configure
/init: .: 165: Can't open /tmp/net-eth0.conf
i also tried configuring networking manually, with:
boot net:dhcp ip=10.7.7.15:10.7.7.1:::255.255.255.0:eth0:off nfsroot=10.7.7.1:/opt/ltsp/sparc BOOT=nfs
but the error message didn't change at all....
full boot log attached.
live well,
vagrant
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: sparc (sparc64)
Kernel: Linux 2.6.18-5-sparc64-smp (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages klibc-utils depends on:
ii libklibc 1.5.5-1 minimal libc subset for use with i
klibc-utils recommends no packages.
-- no debconf information
[sparc64.boot.log (text/plain, attachment)]
Information forwarded
to debian-bugs-dist@lists.debian.org, maximilian attems <maks@debian.org>:
Bug#444087; Package klibc-utils.
(Wed, 27 May 2009 07:21:08 GMT) (full text, mbox, link).
Acknowledgement sent
to jeremy buisson <jeremy.buisson@st-cyr.terre-net.defense.gouv.fr>:
Extra info received and forwarded to list. Copy sent to maximilian attems <maks@debian.org>.
(Wed, 27 May 2009 07:21:08 GMT) (full text, mbox, link).
Message #10 received at 444087@bugs.debian.org (full text, mbox, reply):
Package: klibc-utils
Version: 1.5.12-2
Followup-For: Bug #444087
The 32 bits version of socket-related syscalls for sparc/sparc64 does
not seem to conform to the interface provided by the kernel. As a
result, klibc-utils commands such as ipconfig ends with a "ipconfig:
eth0: socket(AF_INET): Function not implemented".
See bug #444087 for the log with an older version. See for the following
session for another evidence of the problem with a newer version:
jeremy@sunny:~$ /usr/lib/klibc/bin/ipconfig lo
ipconfig: lo: socket(AF_INET): Function not implemented
/usr/lib/klibc/bin/ipconfig: no devices to configure
Looking at the source code, it seems there is 2 call mechanisms:
- if the kernel header files (asm/unistd.h) defines __NR_socket (and so
on), the makefiles uses the syscall interface ;
- otherwise, the makefiles uses the socketcall interface, which wraps
the call into a common syscall (named socketcall).
See the <src>/usr/klibc/syscalls.pl and <src>/usr/klibc/socketcalls.pl
for details.
Looking at the kernel source code for the 32 bits syscall table for the
sparc64 architecture <src-2.6.26>/arch/sparc64/kernel/systbls.S, we see
at index __NR_socket (97 according to asm-sparc/unistd.h and to
asm-sparc64/unistd.h) that the entry points to sys_nis_syscall. Looking
in <src-2.6.26>/arch/sparc64/kernel/syscalls.S, it branches to
c_sys_nis_syscall, which (<src-2.6.26>/arch/sparc64/kernel/sys_sparc.c)
returns ENOSYS, the error code for non-implemented syscalls.
According to my quick tests, there are 2 workarounds:
1) compile klibc to sparc64, as the 64 bits syscall table of the kernel
provides the direct socket (and related) syscalls
2) patch klibc such that it uses socketcall when targeting sparc(32).
Here is a sample patch for the 2nd option:
diff -urN a/usr/klibc/socketcalls.pl b/usr/klibc/socketcalls.pl
--- a/usr/klibc/socketcalls.pl 2008-07-08 01:05:17.000000000 +0200
+++ b/usr/klibc/socketcalls.pl 2009-05-26 14:32:03.000000000 +0200
@@ -63,7 +63,7 @@
print OUT "#include \"socketcommon.h\"\n";
print OUT "\n";
- print OUT "#ifndef __NR_${name}\n\n";
+ print OUT "#if (defined(__sparc__) && !defined(__arch64__)) || !defined(__NR_${name})\n\n";
print OUT "extern long __socketcall(int, const unsigned long *);\n\n";
diff -urN a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
--- a/usr/klibc/SYSCALLS.def 2008-07-08 01:05:17.000000000 +0200
+++ b/usr/klibc/SYSCALLS.def 2009-05-26 14:30:16.000000000 +0200
@@ -259,4 +259,9 @@
* system calls.
*/
<?!i386> long socketcall::__socketcall(int, const unsigned long *);
+#if !defined(__sparc__) && !defined(__arch64__)
+/*
+ * SPARC does not have direct syscalls for socket
+ */
#include "SOCKETCALLS.def"
+#endif
-- System Information:
Debian Release: 5.0.1
APT prefers stable
APT policy: (500, 'stable')
Architecture: sparc (sparc64)
Kernel: Linux 2.6.26-2-sparc64
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages klibc-utils depends on:
ii libklibc 1.5.12-2 minimal libc subset for use with i
klibc-utils recommends no packages.
klibc-utils suggests no packages.
-- no debconf information
Added tag(s) pending.
Request was from maximilian attems <maks@debian.org>
to control@bugs.debian.org.
(Mon, 15 Mar 2010 05:36:02 GMT) (full text, mbox, link).
Reply sent
to maximilian attems <maks@debian.org>:
You have taken responsibility.
(Sat, 20 Mar 2010 16:36:05 GMT) (full text, mbox, link).
Notification sent
to Vagrant Cascadian <vagrant+debianbugs@freegeek.org>:
Bug acknowledged by developer.
(Sat, 20 Mar 2010 16:36:05 GMT) (full text, mbox, link).
Message #17 received at 444087-close@bugs.debian.org (full text, mbox, reply):
Source: klibc
Source-Version: 1.5.17-1
We believe that the bug you reported is fixed in the latest version of
klibc, which is due to be installed in the Debian FTP archive:
klibc-utils-floppy-udeb_1.5.17-1_amd64.udeb
to main/k/klibc/klibc-utils-floppy-udeb_1.5.17-1_amd64.udeb
klibc-utils-udeb_1.5.17-1_amd64.udeb
to main/k/klibc/klibc-utils-udeb_1.5.17-1_amd64.udeb
klibc-utils_1.5.17-1_amd64.deb
to main/k/klibc/klibc-utils_1.5.17-1_amd64.deb
klibc_1.5.17-1.debian.tar.gz
to main/k/klibc/klibc_1.5.17-1.debian.tar.gz
klibc_1.5.17-1.dsc
to main/k/klibc/klibc_1.5.17-1.dsc
klibc_1.5.17.orig.tar.bz2
to main/k/klibc/klibc_1.5.17.orig.tar.bz2
libklibc-dev_1.5.17-1_amd64.deb
to main/k/klibc/libklibc-dev_1.5.17-1_amd64.deb
libklibc-udeb_1.5.17-1_amd64.udeb
to main/k/klibc/libklibc-udeb_1.5.17-1_amd64.udeb
libklibc_1.5.17-1_amd64.deb
to main/k/klibc/libklibc_1.5.17-1_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 444087@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
maximilian attems <maks@debian.org> (supplier of updated klibc 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: Sat, 20 Mar 2010 02:11:20 +0100
Source: klibc
Binary: libklibc-dev libklibc klibc-utils klibc-utils-udeb klibc-utils-floppy-udeb libklibc-udeb
Architecture: source amd64
Version: 1.5.17-1
Distribution: unstable
Urgency: low
Maintainer: maximilian attems <maks@debian.org>
Changed-By: maximilian attems <maks@debian.org>
Description:
klibc-utils - small utilities built with klibc for early boot
klibc-utils-floppy-udeb - small utilities built with klibc for the boot floppy (udeb)
klibc-utils-udeb - small utilities built with klibc for early boot (udeb)
libklibc - minimal libc subset for use with initramfs
libklibc-dev - kernel headers used during the build of klibc
libklibc-udeb - minimal libc subset for use with initramfs (udeb)
Closes: 444087 511959 573908 573926
Changes:
klibc (1.5.17-1) unstable; urgency=low
.
[ Jan Hauke Rahm ]
* Switch from cdbs to debhelper 7
* Switch to Source Format 3.0 (quilt) (closes: #573908)
* Make documentation of klibc-utils and libklibc-dev be a symlink to
libklibc
.
[ maximilian attems ]
* New upstream release
- Fix FTFBS i386/sparc. (closes: #573926)
- sparc, sparc64 use sys_socketcall unconditionally. (closes: #444087)
- ipconfig may discard useful packets. (closes: #511959)
Checksums-Sha1:
2b1d04f849e7ae82fe90bde43e2ca5971fc7fd2a 1246 klibc_1.5.17-1.dsc
15c0a98982911c04cb3ecb24db06bb4eeb9473a5 502794 klibc_1.5.17.orig.tar.bz2
6cc616220b479ab1e0d4e890c0c6e9a16922b28e 14780 klibc_1.5.17-1.debian.tar.gz
8741aaf35490b1b138458c6d1832c37fbfc199c1 228852 libklibc-dev_1.5.17-1_amd64.deb
660ce0ddc662effc3278f65f5b9d4a31e0ab5d1b 48552 libklibc_1.5.17-1_amd64.deb
ed1d80ef843d0399fce3711404b315d2b42a94a7 180604 klibc-utils_1.5.17-1_amd64.deb
3df361ab2b3f251ae38514f849d297fafb8a815a 179328 klibc-utils-udeb_1.5.17-1_amd64.udeb
1a773d8a84ede6fafd49c1f30870e980fe4583d7 24840 klibc-utils-floppy-udeb_1.5.17-1_amd64.udeb
ff8eea50f02266ec2d7df4afd3837c5a7489c8f1 37456 libklibc-udeb_1.5.17-1_amd64.udeb
Checksums-Sha256:
83f527084dcfcbd3719d67e1ee5b9f51522067bf4dff9d5eafda1bd7e1ff2f92 1246 klibc_1.5.17-1.dsc
a67b976db1958a66bb4887d70c45f83f63751a287b5a715c929fb69bdcd7b1ca 502794 klibc_1.5.17.orig.tar.bz2
826b5952a9f8dddfab30c3b9532358d4daa72936b7336a52e32bb23bec4db5eb 14780 klibc_1.5.17-1.debian.tar.gz
4bb1acf42d589322bc2b54484767337a41dfa9d9f2452270d4a3b52ab4daaa69 228852 libklibc-dev_1.5.17-1_amd64.deb
da4306222bc03009cb0ef717128e2f3e7b1101a4b3db259242b77dd4881137bb 48552 libklibc_1.5.17-1_amd64.deb
c953a715ccb8fc508b5a33388df267df2f15448f0b2f929cb7864ede22dcddbb 180604 klibc-utils_1.5.17-1_amd64.deb
c40c4b3898a6870e95613b5e5555118c4281b3baad562ce8935abc9a469baad5 179328 klibc-utils-udeb_1.5.17-1_amd64.udeb
7e724ca7bf1d9b4047717ca17e16d4d342995a17789577c08e40a81947546ae9 24840 klibc-utils-floppy-udeb_1.5.17-1_amd64.udeb
1130fffaaba2fb15b4bee835a33783556c1845581fb5944699595b8c99665d34 37456 libklibc-udeb_1.5.17-1_amd64.udeb
Files:
d8ef3715cbee26195425d8c93f5f5077 1246 libs optional klibc_1.5.17-1.dsc
5ac5b944223f63ed037350795924d1b9 502794 libs optional klibc_1.5.17.orig.tar.bz2
9399701438405df3bb3f1a83a76151af 14780 libs optional klibc_1.5.17-1.debian.tar.gz
d9abb94fdacf97895f657159d98a6859 228852 libdevel optional libklibc-dev_1.5.17-1_amd64.deb
f7265ce39e3980182ce8ff3aef53e788 48552 libs optional libklibc_1.5.17-1_amd64.deb
5ce04ee07239978a88903cd2a660d134 180604 libs optional klibc-utils_1.5.17-1_amd64.deb
e99a84d1a8c628422725c0381c3c5bad 179328 debian-installer optional klibc-utils-udeb_1.5.17-1_amd64.udeb
e67358d25903e341edd0ef8d97fb447b 24840 debian-installer optional klibc-utils-floppy-udeb_1.5.17-1_amd64.udeb
8780de8ad23e664ad340f3527ccb2caa 37456 debian-installer optional libklibc-udeb_1.5.17-1_amd64.udeb
Package-Type: udeb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAkukIg8ACgkQeW7Lc5tEHqifowCeMuzpPfYFt772v+jiKJ6dOxED
hj8AoNGSSzsLtZrjjIkaXklbF/Jz44XY
=TArN
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Sun, 18 Apr 2010 07:37:40 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sat Jul 1 13:24:41 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.