* [PATCH] Fixup personality in different ABI.
@ 2011-03-18 4:59 Heiher
2011-03-18 10:16 ` Sergei Shtylyov
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Heiher @ 2011-03-18 4:59 UTC (permalink / raw)
To: linux-mips
Hello,
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] Fixup personality in different ABI.
2011-03-18 4:59 [PATCH] Fixup personality in different ABI Heiher
@ 2011-03-18 10:16 ` Sergei Shtylyov
2011-03-18 16:17 ` David Daney
2011-03-18 18:18 ` Ralf Baechle
2 siblings, 0 replies; 9+ messages in thread
From: Sergei Shtylyov @ 2011-03-18 10:16 UTC (permalink / raw)
To: Heiher; +Cc: linux-mips
Hello.
On 18-03-2011 7:59, Heiher wrote:
> Hello,
> From bf3637153bc5e3d0e3f1c2982c323057a8e04801 Mon Sep 17 00:00:00 2001
> From: Heiher<admin@heiher.info>
> Date: Fri, 18 Mar 2011 12:51:08 +0800
> Subject: [PATCH] Fixup personality in different ABI.
This header (and "Hello") should be omitted, or the maintainer will have
to hand edit it out of the patch...
> * 'arch' output:
> o32 : mips
> n32 : mips64
> 64 : mips64
You should sign off the patch (with your real name) for it to be applied.
> diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
> index 455c0ac..01510d4 100644
> --- a/arch/mips/include/asm/elf.h
> +++ b/arch/mips/include/asm/elf.h
[...]
> @@ -305,7 +307,10 @@ do { \
> if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
> __SET_PERSONALITY32(ex); \
> else \
> + { \
{ should be on the same line with *else*.
WBR, Sergei
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] Fixup personality in different ABI.
2011-03-18 4:59 [PATCH] Fixup personality in different ABI Heiher
2011-03-18 10:16 ` Sergei Shtylyov
@ 2011-03-18 16:17 ` David Daney
2011-03-18 16:34 ` Heiher
2011-03-18 18:18 ` Ralf Baechle
2 siblings, 1 reply; 9+ messages in thread
From: David Daney @ 2011-03-18 16:17 UTC (permalink / raw)
To: Heiher; +Cc: linux-mips
On 03/17/2011 09:59 PM, Heiher wrote:
> Hello,
Why, hello to you too.
Can you explain what problem you are trying to solve?
Presumably if someone has set the personality, they had a reason for
doing so. On what grounds do you think it is a good idea to override
the explicit desires of the user and restore a default personality?
This patch would break many software build systems.
Unless you can explain why this is needed, I have to say:
NAK to this patch.
Thanks,
David Daney
>
>> From bf3637153bc5e3d0e3f1c2982c323057a8e04801 Mon Sep 17 00:00:00 2001
> From: Heiher<admin@heiher.info>
> Date: Fri, 18 Mar 2011 12:51:08 +0800
> Subject: [PATCH] Fixup personality in different ABI.
>
> * 'arch' output:
> o32 : mips
> n32 : mips64
> 64 : mips64
> ---
> arch/mips/include/asm/elf.h | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
> index 455c0ac..01510d4 100644
> --- a/arch/mips/include/asm/elf.h
> +++ b/arch/mips/include/asm/elf.h
> @@ -262,6 +262,7 @@ do { \
> #ifdef CONFIG_MIPS32_N32
> #define __SET_PERSONALITY32_N32() \
> do { \
> + set_personality(PER_LINUX); \
> set_thread_flag(TIF_32BIT_ADDR); \
> current->thread.abi =&mips_abi_n32; \
> } while (0)
> @@ -273,6 +274,7 @@ do { \
> #ifdef CONFIG_MIPS32_O32
> #define __SET_PERSONALITY32_O32() \
> do { \
> + set_personality(PER_LINUX32); \
> set_thread_flag(TIF_32BIT_REGS); \
> set_thread_flag(TIF_32BIT_ADDR); \
> current->thread.abi =&mips_abi_32; \
> @@ -305,7 +307,10 @@ do { \
> if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
> __SET_PERSONALITY32(ex); \
> else \
> + { \
> + set_personality(PER_LINUX); \
> current->thread.abi =&mips_abi; \
> + } \
> \
> p = personality(current->personality); \
> if (p != PER_LINUX32&& p != PER_LINUX) \
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] Fixup personality in different ABI.
2011-03-18 16:17 ` David Daney
@ 2011-03-18 16:34 ` Heiher
2011-03-18 16:57 ` David Daney
0 siblings, 1 reply; 9+ messages in thread
From: Heiher @ 2011-03-18 16:34 UTC (permalink / raw)
To: David Daney; +Cc: linux-mips
Hello,
I think the o32 process personality default value is PER_LINUX32, n32
& n64 abi process is PER_LINUX in 64-bit Kernel. The kernel should
automatic set a 'right' personality to every process for different
abi. Isn't it?
On Sat, Mar 19, 2011 at 12:17 AM, David Daney <ddaney@caviumnetworks.com> wrote:
> On 03/17/2011 09:59 PM, Heiher wrote:
>>
>> Hello,
>
> Why, hello to you too.
>
>
> Can you explain what problem you are trying to solve?
>
> Presumably if someone has set the personality, they had a reason for doing
> so. On what grounds do you think it is a good idea to override the explicit
> desires of the user and restore a default personality?
>
> This patch would break many software build systems.
>
> Unless you can explain why this is needed, I have to say:
>
> NAK to this patch.
>
> Thanks,
> David Daney
>
>>
>>> From bf3637153bc5e3d0e3f1c2982c323057a8e04801 Mon Sep 17 00:00:00 2001
>>
>> From: Heiher<admin@heiher.info>
>> Date: Fri, 18 Mar 2011 12:51:08 +0800
>> Subject: [PATCH] Fixup personality in different ABI.
>>
>> * 'arch' output:
>> o32 : mips
>> n32 : mips64
>> 64 : mips64
>> ---
>> arch/mips/include/asm/elf.h | 5 +++++
>> 1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
>> index 455c0ac..01510d4 100644
>> --- a/arch/mips/include/asm/elf.h
>> +++ b/arch/mips/include/asm/elf.h
>> @@ -262,6 +262,7 @@ do {
>> \
>> #ifdef CONFIG_MIPS32_N32
>> #define __SET_PERSONALITY32_N32() \
>> do { \
>> + set_personality(PER_LINUX); \
>> set_thread_flag(TIF_32BIT_ADDR); \
>> current->thread.abi =&mips_abi_n32; \
>> } while (0)
>> @@ -273,6 +274,7 @@ do {
>> \
>> #ifdef CONFIG_MIPS32_O32
>> #define __SET_PERSONALITY32_O32() \
>> do { \
>> + set_personality(PER_LINUX32); \
>> set_thread_flag(TIF_32BIT_REGS); \
>> set_thread_flag(TIF_32BIT_ADDR); \
>> current->thread.abi =&mips_abi_32; \
>> @@ -305,7 +307,10 @@ do {
>> \
>> if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
>> __SET_PERSONALITY32(ex); \
>> else \
>> + { \
>> + set_personality(PER_LINUX); \
>> current->thread.abi =&mips_abi; \
>> + } \
>> \
>> p = personality(current->personality); \
>> if (p != PER_LINUX32&& p != PER_LINUX) \
>
>
--
Best regards!
Heiher
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] Fixup personality in different ABI.
2011-03-18 16:34 ` Heiher
@ 2011-03-18 16:57 ` David Daney
0 siblings, 0 replies; 9+ messages in thread
From: David Daney @ 2011-03-18 16:57 UTC (permalink / raw)
To: Heiher; +Cc: linux-mips
On 03/18/2011 09:34 AM, Heiher wrote:
> Hello,
>
> I think the o32 process personality default value is PER_LINUX32, n32
> & n64 abi process is PER_LINUX in 64-bit Kernel. The kernel should
> automatic set a 'right' personality to every process for different
> abi. Isn't it?
No.
Did you see my first question below?
>
> On Sat, Mar 19, 2011 at 12:17 AM, David Daney<ddaney@caviumnetworks.com> wrote:
>> On 03/17/2011 09:59 PM, Heiher wrote:
>>>
>>> Hello,
>>
>> Why, hello to you too.
>>
>>
>> Can you explain what problem you are trying to solve?
Please answer this question.
There are millions of lines of code in the Linux kernel. A change to
any of which requires justification. You cannot just say I don't like
the looks of things, so I am going to make an arbitrary change to the
kernel ABI that will break existing code.
David Daney
>>
>> Presumably if someone has set the personality, they had a reason for doing
>> so. On what grounds do you think it is a good idea to override the explicit
>> desires of the user and restore a default personality?
>>
>> This patch would break many software build systems.
>>
>> Unless you can explain why this is needed, I have to say:
>>
>> NAK to this patch.
>>
>> Thanks,
>> David Daney
>>
>>>
>>>> From bf3637153bc5e3d0e3f1c2982c323057a8e04801 Mon Sep 17 00:00:00 2001
>>>
>>> From: Heiher<admin@heiher.info>
>>> Date: Fri, 18 Mar 2011 12:51:08 +0800
>>> Subject: [PATCH] Fixup personality in different ABI.
>>>
>>> * 'arch' output:
>>> o32 : mips
>>> n32 : mips64
>>> 64 : mips64
>>> ---
>>> arch/mips/include/asm/elf.h | 5 +++++
>>> 1 files changed, 5 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
>>> index 455c0ac..01510d4 100644
>>> --- a/arch/mips/include/asm/elf.h
>>> +++ b/arch/mips/include/asm/elf.h
>>> @@ -262,6 +262,7 @@ do {
>>> \
>>> #ifdef CONFIG_MIPS32_N32
>>> #define __SET_PERSONALITY32_N32() \
>>> do { \
>>> + set_personality(PER_LINUX); \
>>> set_thread_flag(TIF_32BIT_ADDR); \
>>> current->thread.abi =&mips_abi_n32; \
>>> } while (0)
>>> @@ -273,6 +274,7 @@ do {
>>> \
>>> #ifdef CONFIG_MIPS32_O32
>>> #define __SET_PERSONALITY32_O32() \
>>> do { \
>>> + set_personality(PER_LINUX32); \
>>> set_thread_flag(TIF_32BIT_REGS); \
>>> set_thread_flag(TIF_32BIT_ADDR); \
>>> current->thread.abi =&mips_abi_32; \
>>> @@ -305,7 +307,10 @@ do {
>>> \
>>> if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
>>> __SET_PERSONALITY32(ex); \
>>> else \
>>> + { \
>>> + set_personality(PER_LINUX); \
>>> current->thread.abi =&mips_abi; \
>>> + } \
>>> \
>>> p = personality(current->personality); \
>>> if (p != PER_LINUX32&& p != PER_LINUX) \
>>
>>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Fixup personality in different ABI.
2011-03-18 4:59 [PATCH] Fixup personality in different ABI Heiher
2011-03-18 10:16 ` Sergei Shtylyov
2011-03-18 16:17 ` David Daney
@ 2011-03-18 18:18 ` Ralf Baechle
2 siblings, 0 replies; 9+ messages in thread
From: Ralf Baechle @ 2011-03-18 18:18 UTC (permalink / raw)
To: Heiher; +Cc: linux-mips
On Fri, Mar 18, 2011 at 12:59:40PM +0800, Heiher wrote:
> From bf3637153bc5e3d0e3f1c2982c323057a8e04801 Mon Sep 17 00:00:00 2001
> From: Heiher <admin@heiher.info>
> Date: Fri, 18 Mar 2011 12:51:08 +0800
> Subject: [PATCH] Fixup personality in different ABI.
>
> * 'arch' output:
> o32 : mips
> n32 : mips64
> 64 : mips64
That's the correct behaviour - the personality gets inherited by the parent.
If you want to invoke a process with a different personality you can do this
with a utility like arch32 or setarch.
Ralf
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] Fixup personality in different ABI.
@ 2011-03-18 4:58 Heiher
2011-03-24 12:03 ` Ralf Baechle
0 siblings, 1 reply; 9+ messages in thread
From: Heiher @ 2011-03-18 4:58 UTC (permalink / raw)
To: linux-kernel
Hello,
>From bf3637153bc5e3d0e3f1c2982c323057a8e04801 Mon Sep 17 00:00:00 2001
From: Heiher <admin@heiher.info>
Date: Fri, 18 Mar 2011 12:51:08 +0800
Subject: [PATCH] Fixup personality in different ABI.
* 'arch' output:
o32 : mips
n32 : mips64
64 : mips64
---
arch/mips/include/asm/elf.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
index 455c0ac..01510d4 100644
--- a/arch/mips/include/asm/elf.h
+++ b/arch/mips/include/asm/elf.h
@@ -262,6 +262,7 @@ do { \
#ifdef CONFIG_MIPS32_N32
#define __SET_PERSONALITY32_N32() \
do { \
+ set_personality(PER_LINUX); \
set_thread_flag(TIF_32BIT_ADDR); \
current->thread.abi = &mips_abi_n32; \
} while (0)
@@ -273,6 +274,7 @@ do { \
#ifdef CONFIG_MIPS32_O32
#define __SET_PERSONALITY32_O32() \
do { \
+ set_personality(PER_LINUX32); \
set_thread_flag(TIF_32BIT_REGS); \
set_thread_flag(TIF_32BIT_ADDR); \
current->thread.abi = &mips_abi_32; \
@@ -305,7 +307,10 @@ do { \
if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
__SET_PERSONALITY32(ex); \
else \
+ { \
+ set_personality(PER_LINUX); \
current->thread.abi = &mips_abi; \
+ } \
\
p = personality(current->personality); \
if (p != PER_LINUX32 && p != PER_LINUX) \
--
1.7.4.1.225.g83c3c
--
Best regards!
Heiher
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH] Fixup personality in different ABI.
2011-03-18 4:58 Heiher
@ 2011-03-24 12:03 ` Ralf Baechle
0 siblings, 0 replies; 9+ messages in thread
From: Ralf Baechle @ 2011-03-24 12:03 UTC (permalink / raw)
To: Heiher; +Cc: linux-kernel, linux-mips, David Daney, akmp
On Fri, Mar 18, 2011 at 12:58:23PM +0800, Heiher wrote:
> Date: Fri, 18 Mar 2011 12:58:23 +0800
> From: Heiher <admin@heiher.info>
> To: linux-kernel@vger.kernel.org
Please don't post a patch seperately to multiple lists. Cc is prefered
so everybody gets to see all replies.
> >From bf3637153bc5e3d0e3f1c2982c323057a8e04801 Mon Sep 17 00:00:00 2001
> From: Heiher <admin@heiher.info>
> Date: Fri, 18 Mar 2011 12:51:08 +0800
> Subject: [PATCH] Fixup personality in different ABI.
>
> * 'arch' output:
> o32 : mips
> n32 : mips64
> 64 : mips64
That's the correct behaviour - the personality gets inherited by the parent.
If you want to invoke a process with a different personality you can do this
with a utility like arch32 or setarch.
Ralf
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] Fixup personality in different ABI.
@ 2011-03-18 4:51 Heiher
0 siblings, 0 replies; 9+ messages in thread
From: Heiher @ 2011-03-18 4:51 UTC (permalink / raw)
* 'arch' output:
o32 : mips
n32 : mips64
64 : mips64
---
arch/mips/include/asm/elf.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
index 455c0ac..01510d4 100644
--- a/arch/mips/include/asm/elf.h
+++ b/arch/mips/include/asm/elf.h
@@ -262,6 +262,7 @@ do { \
#ifdef CONFIG_MIPS32_N32
#define __SET_PERSONALITY32_N32() \
do { \
+ set_personality(PER_LINUX); \
set_thread_flag(TIF_32BIT_ADDR); \
current->thread.abi = &mips_abi_n32; \
} while (0)
@@ -273,6 +274,7 @@ do { \
#ifdef CONFIG_MIPS32_O32
#define __SET_PERSONALITY32_O32() \
do { \
+ set_personality(PER_LINUX32); \
set_thread_flag(TIF_32BIT_REGS); \
set_thread_flag(TIF_32BIT_ADDR); \
current->thread.abi = &mips_abi_32; \
@@ -305,7 +307,10 @@ do { \
if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
__SET_PERSONALITY32(ex); \
else \
+ { \
+ set_personality(PER_LINUX); \
current->thread.abi = &mips_abi; \
+ } \
\
p = personality(current->personality); \
if (p != PER_LINUX32 && p != PER_LINUX) \
--
1.7.4.1.225.g83c3c
--
Best regards!
Heiher
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-03-24 12:03 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-18 4:59 [PATCH] Fixup personality in different ABI Heiher
2011-03-18 10:16 ` Sergei Shtylyov
2011-03-18 16:17 ` David Daney
2011-03-18 16:34 ` Heiher
2011-03-18 16:57 ` David Daney
2011-03-18 18:18 ` Ralf Baechle
-- strict thread matches above, loose matches on Subject: below --
2011-03-18 4:58 Heiher
2011-03-24 12:03 ` Ralf Baechle
2011-03-18 4:51 Heiher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.