• Jiri Kosina's avatar
    tile: fix personality bits handling upon exec() · 9f6547a3
    Jiri Kosina authored
    Historically, the top three bytes of personality have been used for
    things such as ADDR_NO_RANDOMIZE, which made sense only for specific
    architectures.
    
    We now however have a flag there that is general no matter the
    architecture (UNAME26); generally we have to be careful to preserve the
    personality flags across exec().
    
    This patch fixes tile architecture not to forcefully overwrite
    personality flags during exec().
    
    In addition to that, we fix two other things along the way:
    
    - exec_domain switching is fixed -- set_personality() should always
      be used instead of directly assigning to current->personality.
    - as pointed out by Arnd Bergmann, PER_LINUX_32BIT is not used anywhere
      by tile, so let's just drop that in favor of PER_LINUX
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    Acked-by: default avatarChris Metcalf <cmetcalf@tilera.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    9f6547a3
elf.h 5.13 KB