// SPDX-License-Identifier: GPL-2.0 #include <linux/init.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/mm_types.h> #include <linux/binfmts.h> #include <linux/a.out.h>
static int load_binary(struct linux_binprm *bprm) { struct exec *eh = (struct exec *)bprm->buf; unsigned long loader; struct file *file; int retval; if (eh->fh.f_magic != 0x183 || (eh->fh.f_flags & 0x3000) != 0x3000) return -ENOEXEC; if (bprm->loader) return -ENOEXEC; allow_write_access(bprm->file); fput(bprm->file); bprm->file = NULL; loader = bprm->vma->vm_end - sizeof(void *); file = open_exec("/sbin/loader"); retval = PTR_ERR(file); if (IS_ERR(file)) return retval; /* Remember if the application is TASO. */ bprm->taso = eh->ah.entry < 0x100000000UL; bprm->file = file; bprm->loader = loader; retval = prepare_binprm(bprm); if (retval < 0) return retval; return search_binary_handler(bprm); }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Al Viro | 178 | 100.00% | 1 | 100.00% |
Total | 178 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Al Viro | 17 | 94.44% | 2 | 66.67% |
Ivan Kokshaysky | 1 | 5.56% | 1 | 33.33% |
Total | 18 | 100.00% | 3 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Al Viro | 230 | 99.14% | 2 | 50.00% |
Ivan Kokshaysky | 1 | 0.43% | 1 | 25.00% |
Greg Kroah-Hartman | 1 | 0.43% | 1 | 25.00% |
Total | 232 | 100.00% | 4 | 100.00% |