alpha: introduce field 'taso' into struct linux_binprm
authorKirill A. Shutemov <kirill@shutemov.name>
Thu, 16 Oct 2008 05:02:37 +0000 (22:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 16 Oct 2008 18:21:38 +0000 (11:21 -0700)
This change is Alpha-specific.  It adds field 'taso' into struct
linux_binprm to remember if the application is TASO.  Previously, field
sh_bang was used for this purpose.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/alpha/include/asm/a.out.h
fs/exec.c
include/linux/binfmts.h

index 02ce8473870a96c326b91fe8a8f321b0c734dc0f..acdc681231cb49c2c11b8e47564bf02542bd3742 100644 (file)
@@ -95,7 +95,7 @@ struct exec
    Worse, we have to notice the start address before swapping to use
    /sbin/loader, which of course is _not_ a TASO application.  */
 #define SET_AOUT_PERSONALITY(BFPM, EX) \
-       set_personality (((BFPM->sh_bang || EX.ah.entry < 0x100000000L \
+       set_personality (((BFPM->taso || EX.ah.entry < 0x100000000L \
                           ? ADDR_LIMIT_32BIT : 0) | PER_OSF4))
 
 #endif /* __KERNEL__ */
index 7b5ed50eadeb95daf8c4617c9372ceb5f2878245..4a790f2e224ef260d1ca77f6d187f4199c14aefe 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1189,7 +1189,7 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
                        return retval;
 
                /* Remember if the application is TASO.  */
-               bprm->sh_bang = eh->ah.entry < 0x100000000UL;
+               bprm->taso = eh->ah.entry < 0x100000000UL;
 
                bprm->file = file;
                bprm->loader = loader;
index 826f62350805ed782976008db013203061306744..54980a3c7602612515063e7e7ee5da7068bc202a 100644 (file)
@@ -36,6 +36,9 @@ struct linux_binprm{
        unsigned long p; /* current top of mem */
        unsigned int sh_bang:1,
                     misc_bang:1;
+#ifdef __alpha__
+       unsigned int taso:1;
+#endif
        struct file * file;
        int e_uid, e_gid;
        kernel_cap_t cap_post_exec_permitted;