Debian Bug report logs - #448802
[PATCH] strace FTBFS on mips/mipsel

version graph

Package: strace; Maintainer for strace is Steve McIntyre <93sam@debian.org>; Source for strace is src:strace (PTS, buildd, popcon).

Reported by: Thiemo Seufer <ths@networkno.de>

Date: Thu, 1 Nov 2007 02:42:02 UTC

Severity: important

Tags: patch

Found in version strace/4.5.15-1

Fixed in versions strace/4.5.15-1.2, 4.5.16-1

Done: Joey Hess <joeyh@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Roland McGrath <frob@debian.org>:
Bug#448802; Package strace. (full text, mbox, link).


Acknowledgement sent to Thiemo Seufer <ths@networkno.de>:
New Bug report received and forwarded. Copy sent to Roland McGrath <frob@debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Thiemo Seufer <ths@networkno.de>
To: submit@bugs.debian.org
Subject: [PATCH] strace FTBFS on mips/mipsel
Date: Thu, 1 Nov 2007 02:40:58 +0000
Package: strace
Version: 4.5.15-1
Severity: important
Tags: patch

Strace currently fails to build on Linux/MIPS because sigcontext
has changed (sc_sigset is gone). The appended patch fixes it.


Thiemo


--- signal.c.orig	2007-10-31 02:18:25.000000000 +0000
+++ signal.c	2007-11-01 01:48:41.000000000 +0000
@@ -97,6 +97,11 @@ typedef struct {
 	struct regs		si_regs;
 	int			si_mask;
 } m_siginfo_t;
+#elif defined (MIPS)
+typedef struct {
+	struct pt_regs		si_regs;
+	int			si_mask;
+} m_siginfo_t;
 #elif defined HAVE_ASM_SIGCONTEXT_H
 #if !defined(IA64) && !defined(X86_64)
 #include <asm/sigcontext.h>
@@ -1426,21 +1431,27 @@ struct tcb *tcp;
 #else
 #ifdef MIPS
 	long sp;
-	struct sigcontext sc;
+	struct pt_regs regs;
+	m_siginfo_t si;
 
+	if(ptrace(PTRACE_GETREGS, tcp->pid, (char *)&regs, 0) < 0) {
+		perror("sigreturn: PTRACE_GETREGS ");
+		return 0;
+	}
 	if(entering(tcp)) {
 	  	tcp->u_arg[0] = 0;
-		if (upeek(tcp->pid, REG_SP, &sp) < 0)
-		  	return 0;
-		if (umove(tcp, sp, &sc) < 0)
+		sp = regs.regs[29];
+		if (umove(tcp, sp, &si) < 0)
 		  	return 0;
 		tcp->u_arg[0] = 1;
-		tcp->u_arg[1] = sc.sc_sigset;
+		tcp->u_arg[1] = si.si_mask;
 	} else {
-	  	tcp->u_rval = tcp->u_error = 0;
+		sigset_t sigm;
+		long_to_sigset(tcp->u_arg[1], &sigm);
+		tcp->u_rval = tcp->u_error = 0;
 		if(tcp->u_arg[0] == 0)
-		  	return 0;
-		tcp->auxstr = sprintsigmask("mask now ", tcp->u_arg[1]);
+			return 0;
+		tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
 		return RVAL_NONE | RVAL_STR;
 	}
 	return 0;




Information forwarded to debian-bugs-dist@lists.debian.org, Roland McGrath <frob@debian.org>:
Bug#448802; Package strace. (full text, mbox, link).


Acknowledgement sent to Roland McGrath <roland@redhat.com>:
Extra info received and forwarded to list. Copy sent to Roland McGrath <frob@debian.org>. (full text, mbox, link).


Message #10 received at 448802@bugs.debian.org (full text, mbox, reply):

From: Roland McGrath <roland@redhat.com>
To: Thiemo Seufer <ths@networkno.de>, 448802@bugs.debian.org
Subject: Re: Bug#448802: [PATCH] strace FTBFS on mips/mipsel
Date: Thu, 1 Nov 2007 14:58:58 -0700 (PDT)
This patch does not apply to the current upstream strace sources.  Can you
please post a current patch along with complete ChangeLog entry (in the
format you see in the file) to strace-devel@lists.sourceforge.net?


Thanks,
Roland




Information forwarded to debian-bugs-dist@lists.debian.org, Roland McGrath <frob@debian.org>:
Bug#448802; Package strace. (full text, mbox, link).


Acknowledgement sent to Thiemo Seufer <ths@networkno.de>:
Extra info received and forwarded to list. Copy sent to Roland McGrath <frob@debian.org>. (full text, mbox, link).


Message #15 received at 448802@bugs.debian.org (full text, mbox, reply):

From: Thiemo Seufer <ths@networkno.de>
To: strace-devel@lists.sourceforge.net
Cc: Roland McGrath <roland@redhat.com>, 448802@bugs.debian.org, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: Bug#448802: [PATCH] strace FTBFS on mips/mipsel
Date: Fri, 2 Nov 2007 13:30:36 +0000
Roland McGrath wrote:
> This patch does not apply to the current upstream strace sources.  Can you
> please post a current patch along with complete ChangeLog entry (in the
> format you see in the file) to strace-devel@lists.sourceforge.net?

This patch fixes the sigreturn arguments on MIPS. The old version
is bogus, it uses the hi part of the second DSP accumulator register
as signal mask. :-) The sigset_t which used to be in that place was
never actually life, it was scrapped when DSP support was added.


Thiemo


2007-11-02  Thiemo Seufer <ths@networkno.de>

	* signal.c (m_siginfo_t): Add for MIPS.
	(sys_sigreturn): struct sigcontext on MIPS has no sigset_t member,
	acquire the signal mask with the same trick as on Sparc.

--- signal.c.original	2007-11-02 02:53:54.000000000 +0000
+++ signal.c	2007-11-02 03:02:47.000000000 +0000
@@ -97,6 +97,11 @@ typedef struct {
 	struct regs		si_regs;
 	int			si_mask;
 } m_siginfo_t;
+#elif defined (MIPS)
+typedef struct {
+	struct pt_regs		si_regs;
+	int			si_mask;
+} m_siginfo_t;
 #elif defined HAVE_ASM_SIGCONTEXT_H
 #if !defined(IA64) && !defined(X86_64)
 #include <asm/sigcontext.h>
@@ -1426,25 +1431,26 @@ struct tcb *tcp;
 #else
 #ifdef MIPS
 	long sp;
-	struct sigcontext sc;
+	struct pt_regs regs;
+	m_siginfo_t si;
 
+	if(ptrace(PTRACE_GETREGS, tcp->pid, (char *)&regs, 0) < 0) {
+		perror("sigreturn: PTRACE_GETREGS ");
+		return 0;
+	}
 	if(entering(tcp)) {
 	  	tcp->u_arg[0] = 0;
-		if (upeek(tcp->pid, REG_SP, &sp) < 0)
-		  	return 0;
-		if (umove(tcp, sp, &sc) < 0)
-		  	return 0;
+		sp = regs.regs[29];
+		if (umove(tcp, sp, &si) < 0)
 		tcp->u_arg[0] = 1;
-# ifdef HAVE_STRUCT_SIGCONTEXT_SC_HI2
-		tcp->u_arg[1] = sc.sc_hi2;
-# else
-		tcp->u_arg[1] = sc.sc_sigset;
-# endif
+		tcp->u_arg[1] = si.si_mask;
 	} else {
+		sigset_t sigm;
+		long_to_sigset(tcp->u_arg[1], &sigm);
 	  	tcp->u_rval = tcp->u_error = 0;
 		if(tcp->u_arg[0] == 0)
-		  	return 0;
-		tcp->auxstr = sprintsigmask("mask now ", tcp->u_arg[1], 0);
+			return 0;
+		tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
 		return RVAL_NONE | RVAL_STR;
 	}
 	return 0;




Reply sent to Joey Hess <joeyh@debian.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Thiemo Seufer <ths@networkno.de>:
Bug acknowledged by developer. (full text, mbox, link).


Message #20 received at 448802-close@bugs.debian.org (full text, mbox, reply):

From: Joey Hess <joeyh@debian.org>
To: 448802-close@bugs.debian.org
Subject: Bug#448802: fixed in strace 4.5.15-1.2
Date: Fri, 14 Mar 2008 21:02:18 +0000
Source: strace
Source-Version: 4.5.15-1.2

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

strace-udeb_4.5.15-1.2_i386.udeb
  to pool/main/s/strace/strace-udeb_4.5.15-1.2_i386.udeb
strace_4.5.15-1.2.diff.gz
  to pool/main/s/strace/strace_4.5.15-1.2.diff.gz
strace_4.5.15-1.2.dsc
  to pool/main/s/strace/strace_4.5.15-1.2.dsc
strace_4.5.15-1.2_i386.deb
  to pool/main/s/strace/strace_4.5.15-1.2_i386.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 448802@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joey Hess <joeyh@debian.org> (supplier of updated strace 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.7
Date: Tue, 04 Mar 2008 17:04:45 -0500
Source: strace
Binary: strace strace-udeb
Architecture: source i386
Version: 4.5.15-1.2
Distribution: unstable
Urgency: low
Maintainer: Roland McGrath <frob@debian.org>
Changed-By: Joey Hess <joeyh@debian.org>
Description: 
 strace     - A system call tracer
 strace-udeb - A system call tracer (udeb)
Closes: 448802 459255 469379
Changes: 
 strace (4.5.15-1.2) unstable; urgency=low
 .
   * NMU
   * Apply patch from Thiemo Seufer to fix FTBFS on mips and mipsel.
     Closes: #448802
   * Fix FTBFS on sparc. Closes: #469379
   * Use chmod, not chown, in debian/rules. Closes: #459255
Files: 
 f03bc7f9eaa3b17f79b3ad02ef59b1dd 880 utils standard strace_4.5.15-1.2.dsc
 4fb2612768ddfa012609e003467212de 2926 utils standard strace_4.5.15-1.2.diff.gz
 214fd45632467f67469479ef2691ac0a 79476 debian-installer extra strace-udeb_4.5.15-1.2_i386.udeb
 4a0118edfc0ef7809285fbaeb2f94e21 99876 utils standard strace_4.5.15-1.2_i386.deb

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

iD8DBQFHzckZ2tp5zXiKP0wRAh4qAJ9QQD1VGfnXaUAMwcRC+TMalh5VXQCgtM6a
68y5K6UDIEmgbxNsi3Uqzu8=
=jx0j
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 14 Apr 2008 07:25:45 GMT) (full text, mbox, link).


Bug unarchived. Request was from Lucas Nussbaum <lucas@lucas-nussbaum.net> to controlbugs.debian.org. (Sat, 09 Aug 2008 18:02:46 GMT) (full text, mbox, link).


Marked as fixed in versions 4.5.16-1. Request was from Andreas Beckmann <anbe@debian.org> to control@bugs.debian.org. (Sat, 02 Nov 2013 15:58:04 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 01 Dec 2013 07:25:48 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: Wed Oct 11 23:40:04 2017; 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.