linux-mips
[Top] [All Lists]

Re: [PATCH] Use compat code to translate siginfo_t for N32

To: Peter Watkins <treestem@gmail.com>
Subject: Re: [PATCH] Use compat code to translate siginfo_t for N32
From: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Date: Fri, 28 Jul 2006 10:44:24 +0900
Cc: linux-mips@linux-mips.org
In-reply-to: <44C94FEA.1010607@gmail.com>
Organization: TriPeaks Corporation
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <44C94FEA.1010607@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
Hi,

> diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
> index 881c467..108171a 100644
> --- a/arch/mips/kernel/Makefile
> +++ b/arch/mips/kernel/Makefile
> @@ -56,8 +56,8 @@ obj-$(CONFIG_32BIT)           += scall32-o32.o
>  obj-$(CONFIG_64BIT)            += scall64-64.o
>  obj-$(CONFIG_BINFMT_IRIX)      += binfmt_irix.o
>  obj-$(CONFIG_MIPS32_COMPAT)    += linux32.o signal32.o
> -obj-$(CONFIG_MIPS32_N32)       += binfmt_elfn32.o scall64-n32.o signal_n32.o
> -obj-$(CONFIG_MIPS32_O32)       += binfmt_elfo32.o scall64-o32.o ptrace32.o
> +obj-$(CONFIG_MIPS32_N32)       += binfmt_elfn32.o scall64-n32.o signal_n32.o 
> compat32.o
> +obj-$(CONFIG_MIPS32_O32)       += binfmt_elfo32.o scall64-o32.o ptrace32.o 
> compat32.o

Why do you separate comapt32.o ?

> diff --git a/arch/mips/kernel/compat32.c b/arch/mips/kernel/compat32.c
> new file mode 100644
> index 0000000..858f7db
> --- /dev/null
> +++ b/arch/mips/kernel/compat32.c

<snip>

> +int copy_siginfo_to_user32(compat_siginfo_t *to, siginfo_t *from)

see include/linux/compat.h .

int copy_siginfo_to_user32(struct compat_siginfo __user *to, siginfo_t *from);


> diff --git a/arch/mips/kernel/compat32.h b/arch/mips/kernel/compat32.h
> new file mode 100644
> index 0000000..e2bb23b
> --- /dev/null
> +++ b/arch/mips/kernel/compat32.h
> @@ -0,0 +1,76 @@

<snip>

> +int copy_siginfo_to_user32(compat_siginfo_t *to, siginfo_t *from);

It's already defined in include/linux/compat.h .

> diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c
> index 477c533..f805bea 100644
> --- a/arch/mips/kernel/signal_n32.c
> +++ b/arch/mips/kernel/signal_n32.c

<snip>

> @@ -74,7 +76,7 @@ #if ICACHE_REFILLS_WORKAROUND_WAR
>  #else
>       u32 rs_code[2];                 /* signal trampoline */
>  #endif
> -     struct siginfo rs_info;
> +     compat_siginfo_t rs_info;

use struct compat_siginfo .

Yoichi


<Prev in Thread] Current Thread [Next in Thread>