diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2009-12-17 21:33:26 -0500 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-29 17:16:27 -0400 |
commit | fa3c94fc9cd1619fe0dd6081a1a980c09ef3e119 (patch) | |
tree | 2e389b77431e55e8b81f4f256b93f23137dd4e2f /fs/exec.c | |
parent | f5936ecf0cff0b94419b6768efba3e15622beeb6 (diff) |
[ported from 2008.3] Add File Descriptor Attached Shared Objects (FDSO) infrastructure
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -19,7 +19,7 @@ | |||
19 | * current->executable is only used by the procfs. This allows a dispatch | 19 | * current->executable is only used by the procfs. This allows a dispatch |
20 | * table to check for several different types of binary formats. We keep | 20 | * table to check for several different types of binary formats. We keep |
21 | * trying until we recognize the file or we run out of supported binary | 21 | * trying until we recognize the file or we run out of supported binary |
22 | * formats. | 22 | * formats. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
@@ -57,6 +57,8 @@ | |||
57 | #include <linux/fs_struct.h> | 57 | #include <linux/fs_struct.h> |
58 | #include <linux/pipe_fs_i.h> | 58 | #include <linux/pipe_fs_i.h> |
59 | 59 | ||
60 | #include <litmus/litmus.h> | ||
61 | |||
60 | #include <asm/uaccess.h> | 62 | #include <asm/uaccess.h> |
61 | #include <asm/mmu_context.h> | 63 | #include <asm/mmu_context.h> |
62 | #include <asm/tlb.h> | 64 | #include <asm/tlb.h> |
@@ -80,7 +82,7 @@ int __register_binfmt(struct linux_binfmt * fmt, int insert) | |||
80 | insert ? list_add(&fmt->lh, &formats) : | 82 | insert ? list_add(&fmt->lh, &formats) : |
81 | list_add_tail(&fmt->lh, &formats); | 83 | list_add_tail(&fmt->lh, &formats); |
82 | write_unlock(&binfmt_lock); | 84 | write_unlock(&binfmt_lock); |
83 | return 0; | 85 | return 0; |
84 | } | 86 | } |
85 | 87 | ||
86 | EXPORT_SYMBOL(__register_binfmt); | 88 | EXPORT_SYMBOL(__register_binfmt); |
@@ -1006,7 +1008,7 @@ int flush_old_exec(struct linux_binprm * bprm) | |||
1006 | group */ | 1008 | group */ |
1007 | 1009 | ||
1008 | current->self_exec_id++; | 1010 | current->self_exec_id++; |
1009 | 1011 | ||
1010 | flush_signal_handlers(current, 0); | 1012 | flush_signal_handlers(current, 0); |
1011 | flush_old_files(current->files); | 1013 | flush_old_files(current->files); |
1012 | 1014 | ||
@@ -1102,8 +1104,8 @@ int check_unsafe_exec(struct linux_binprm *bprm) | |||
1102 | return res; | 1104 | return res; |
1103 | } | 1105 | } |
1104 | 1106 | ||
1105 | /* | 1107 | /* |
1106 | * Fill the binprm structure from the inode. | 1108 | * Fill the binprm structure from the inode. |
1107 | * Check permissions, then read the first 128 (BINPRM_BUF_SIZE) bytes | 1109 | * Check permissions, then read the first 128 (BINPRM_BUF_SIZE) bytes |
1108 | * | 1110 | * |
1109 | * This may be called multiple times for binary chains (scripts for example). | 1111 | * This may be called multiple times for binary chains (scripts for example). |
@@ -1318,6 +1320,7 @@ int do_execve(char * filename, | |||
1318 | goto out_unmark; | 1320 | goto out_unmark; |
1319 | 1321 | ||
1320 | sched_exec(); | 1322 | sched_exec(); |
1323 | litmus_exec(); | ||
1321 | 1324 | ||
1322 | bprm->file = file; | 1325 | bprm->file = file; |
1323 | bprm->filename = filename; | 1326 | bprm->filename = filename; |