* undefined reference to `copy_siginfo_from_user32'
@ 2008-04-28 19:23 Giuseppe Sacco
2008-04-29 9:00 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Giuseppe Sacco @ 2008-04-28 19:23 UTC (permalink / raw)
To: linux-mips
Hi list,
since a few days, whenever I try to recompile the latest kernel (from git) it always print this error message:
[...]
AS arch/mips/lib/strlen_user.o
AS arch/mips/lib/strncpy_user.o
AS arch/mips/lib/strnlen_user.o
CC arch/mips/lib/uncached.o
AR arch/mips/lib/lib.a
LD vmlinux.o
MODPOST vmlinux.o
WARNING: modpost: Found 11 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
GEN .version
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
kernel/built-in.o: In function `$L261':
ptrace.c:(.text+0x13550): undefined reference to `copy_siginfo_from_user32'
ptrace.c:(.text+0x13550): relocation truncated to fit: R_MIPS_26 against `copy_siginfo_from_user32'
make[1]: *** [.tmp_vmlinux1] Error 1
make[1]: Leaving directory `/usr/local/src/kernel/2.6.25'
make: *** [debian/stamp-build-kernel] Error 2
Any idea about a possible cause/solution?
Thank you very mcuh,
Giuseppe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: undefined reference to `copy_siginfo_from_user32'
2008-04-28 19:23 undefined reference to `copy_siginfo_from_user32' Giuseppe Sacco
@ 2008-04-29 9:00 ` Christoph Hellwig
2008-05-01 18:11 ` Giuseppe Sacco
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2008-04-29 9:00 UTC (permalink / raw)
To: Giuseppe Sacco; +Cc: linux-mips
On Mon, Apr 28, 2008 at 09:23:27PM +0200, Giuseppe Sacco wrote:
> Hi list,
> since a few days, whenever I try to recompile the latest kernel (from git) it always print this error message:
This should be fixed in mainline. But the right fix would be to switch
mips to the generic compat_ptrace. And untested (and in fact even
uncompiled) patch ontop of the copy_siginfo_to_user32 posted to the list
a while ago is below to sketch how this should look like:
Index: linux-2.6/arch/mips/kernel/ptrace32.c
===================================================================
--- linux-2.6.orig/arch/mips/kernel/ptrace32.c 2008-04-29 10:54:44.000000000 +0200
+++ linux-2.6/arch/mips/kernel/ptrace32.c 2008-04-29 10:59:17.000000000 +0200
@@ -42,56 +42,17 @@ int ptrace_setregs(struct task_struct *c
int ptrace_getfpregs(struct task_struct *child, __u32 __user *data);
int ptrace_setfpregs(struct task_struct *child, __u32 __user *data);
+
/*
* Tracing a 32-bit process with a 64-bit strace and vice versa will not
* work. I don't know how to fix this.
*/
-asmlinkage int sys32_ptrace(int request, int pid, int addr, int data)
+long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
+ compat_ulong_t addr, compat_ulong_t data)
{
- struct task_struct *child;
int ret;
-#if 0
- printk("ptrace(r=%d,pid=%d,addr=%08lx,data=%08lx)\n",
- (int) request, (int) pid, (unsigned long) addr,
- (unsigned long) data);
-#endif
- lock_kernel();
- if (request == PTRACE_TRACEME) {
- ret = ptrace_traceme();
- goto out;
- }
-
- child = ptrace_get_task_struct(pid);
- if (IS_ERR(child)) {
- ret = PTR_ERR(child);
- goto out;
- }
-
- if (request == PTRACE_ATTACH) {
- ret = ptrace_attach(child);
- goto out_tsk;
- }
-
- ret = ptrace_check_attach(child, request == PTRACE_KILL);
- if (ret < 0)
- goto out_tsk;
-
switch (request) {
- /* when I and D space are separate, these will need to be fixed. */
- case PTRACE_PEEKTEXT: /* read word at location addr. */
- case PTRACE_PEEKDATA: {
- unsigned int tmp;
- int copied;
-
- copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
- ret = -EIO;
- if (copied != sizeof(tmp))
- break;
- ret = put_user(tmp, (unsigned int __user *) (unsigned long) data);
- break;
- }
-
/*
* Read 4 bytes of the other process' storage
* data is a pointer specifying where the user wants the
@@ -237,16 +198,6 @@ asmlinkage int sys32_ptrace(int request,
break;
}
- /* when I and D space are separate, this will have to be fixed. */
- case PTRACE_POKETEXT: /* write the word at location addr. */
- case PTRACE_POKEDATA:
- ret = 0;
- if (access_process_vm(child, addr, &data, sizeof(data), 1)
- == sizeof(data))
- break;
- ret = -EIO;
- break;
-
/*
* Write 4 bytes into the other process' storage
* data is the 4 bytes that the user wants written
@@ -400,24 +351,15 @@ asmlinkage int sys32_ptrace(int request,
ret = ptrace_detach(child, data);
break;
- case PTRACE_GETEVENTMSG:
- ret = put_user(child->ptrace_message,
- (unsigned int __user *) (unsigned long) data);
- break;
-
case PTRACE_GET_THREAD_AREA_3264:
ret = put_user(task_thread_info(child)->tp_value,
(unsigned long __user *) (unsigned long) data);
break;
default:
- ret = ptrace_request(child, request, addr, data);
+ ret = compat_ptrace_request(child, request, addr, data);
break;
}
-out_tsk:
- put_task_struct(child);
-out:
- unlock_kernel();
return ret;
}
Index: linux-2.6/include/asm-mips/ptrace.h
===================================================================
--- linux-2.6.orig/include/asm-mips/ptrace.h 2008-04-29 11:00:10.000000000 +0200
+++ linux-2.6/include/asm-mips/ptrace.h 2008-04-29 11:00:19.000000000 +0200
@@ -76,6 +76,8 @@ struct pt_regs {
#include <linux/linkage.h>
#include <asm/isadep.h>
+#define __ARCH_WANT_COMPAT_SYS_PTRACE
+
/*
* Does the process account for user or for system time?
*/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: undefined reference to `copy_siginfo_from_user32'
2008-04-29 9:00 ` Christoph Hellwig
@ 2008-05-01 18:11 ` Giuseppe Sacco
2008-05-11 6:31 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Giuseppe Sacco @ 2008-05-01 18:11 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-mips
Il giorno mar, 29/04/2008 alle 11.00 +0200, Christoph Hellwig ha
scritto:
> On Mon, Apr 28, 2008 at 09:23:27PM +0200, Giuseppe Sacco wrote:
> > Hi list,
> > since a few days, whenever I try to recompile the latest kernel (from git) it always print this error message:
>
> This should be fixed in mainline. But the right fix would be to switch
> mips to the generic compat_ptrace. And untested (and in fact even
> uncompiled) patch ontop of the copy_siginfo_to_user32 posted to the list
> a while ago is below to sketch how this should look like:
I cannot apply this patch to the latest kernel from git. Could you
provide a new one?
Thanks a lot,
Giuseppe Sacco
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: undefined reference to `copy_siginfo_from_user32'
2008-05-01 18:11 ` Giuseppe Sacco
@ 2008-05-11 6:31 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2008-05-11 6:31 UTC (permalink / raw)
To: Giuseppe Sacco; +Cc: Christoph Hellwig, linux-mips
On Thu, May 01, 2008 at 08:11:52PM +0200, Giuseppe Sacco wrote:
> I cannot apply this patch to the latest kernel from git. Could you
> provide a new one?
It still applies against the latest Linus tree, I don't currently
have a mips tree at hand. But Ralf promised to look into the
compat_sys_ptrace conversion.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-11 6:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-28 19:23 undefined reference to `copy_siginfo_from_user32' Giuseppe Sacco
2008-04-29 9:00 ` Christoph Hellwig
2008-05-01 18:11 ` Giuseppe Sacco
2008-05-11 6:31 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox