[PATCH 2/2] ARM: fix personality flag propagation across an exec
Nicolas Pitre
nicolas.pitre at linaro.org
Fri Apr 8 16:44:02 EDT 2011
On Fri, 8 Apr 2011, Russell King - ARM Linux wrote:
> On Fri, Apr 08, 2011 at 03:50:21PM -0400, Nicolas Pitre wrote:
>
> > Or is the actual personality type not supposed to be inherited?
>
> Many architectures explicitly set a personality type on exec, so that
> seems to be the thing to do. We want it set to a PER_LINUX flavour
> as the ELF executables we run tend to be Linux executables.
>
> Also, the ARM kernel doesn't really support anything but PER_LINUX
> ELF executables, so it'd be rather meaningless to set it to anything
> else here.
>
> So:
>
> unsigned int personality = current->personality & ~PER_MASK;
>
> /*
> * We only support Linux ELF executables, so always set the
> * personality to LINUX.
> */
> personality |= PER_LINUX;
>
> /* APCS-26 is only valid for OABI executables */
> if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN &&
> (eflags & EF_ARM_APCS_26))
> personality &= ~ADDR_LIMIT_32BIT;
> else
> personality |= ADDR_LIMIT_32BIT;
>
> set_personality(personality);
>
> is probably what we want.
ACK. Are you committing this directly, or do you still want me to send
you a patch?
Nicolas
More information about the linux-arm-kernel
mailing list