Re: [PATCH] Fixup personality in different ABI.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxx>
>> 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



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux