Home
last modified time | relevance | path

Searched refs:bprm (Results 1 - 25 of 125) sorted by relevance

12345

/kernel/linux/linux-5.10/fs/
H A Dexec.c78 static int bprm_creds_from_file(struct linux_binprm *bprm);
184 * The nascent bprm->mm is not visible until exec_mmap() but it can
189 static void acct_arg_size(struct linux_binprm *bprm, unsigned long pages) in acct_arg_size() argument
192 long diff = (long)(pages - bprm->vma_pages); in acct_arg_size()
197 bprm->vma_pages = pages; in acct_arg_size()
201 static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, in get_arg_page() argument
210 ret = expand_downwards(bprm->vma, pos); in get_arg_page()
221 * doing the exec and bprm->mm is the new process's mm. in get_arg_page()
223 ret = get_user_pages_remote(bprm->mm, pos, 1, gup_flags, in get_arg_page()
229 acct_arg_size(bprm, vma_page in get_arg_page()
239 free_arg_pages(struct linux_binprm *bprm) free_arg_pages() argument
243 flush_arg_page(struct linux_binprm *bprm, unsigned long pos, struct page *page) flush_arg_page() argument
249 __bprm_mm_init(struct linux_binprm *bprm) __bprm_mm_init() argument
293 valid_arg_len(struct linux_binprm *bprm, long len) valid_arg_len() argument
300 acct_arg_size(struct linux_binprm *bprm, unsigned long pages) acct_arg_size() argument
304 get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) get_arg_page() argument
324 free_arg_page(struct linux_binprm *bprm, int i) free_arg_page() argument
332 free_arg_pages(struct linux_binprm *bprm) free_arg_pages() argument
340 flush_arg_page(struct linux_binprm *bprm, unsigned long pos, struct page *page) flush_arg_page() argument
345 __bprm_mm_init(struct linux_binprm *bprm) __bprm_mm_init() argument
351 valid_arg_len(struct linux_binprm *bprm, long len) valid_arg_len() argument
364 bprm_mm_init(struct linux_binprm *bprm) bprm_mm_init() argument
473 bprm_stack_limits(struct linux_binprm *bprm) bprm_stack_limits() argument
519 copy_strings(int argc, struct user_arg_ptr argv, struct linux_binprm *bprm) copy_strings() argument
614 copy_string_kernel(const char *arg, struct linux_binprm *bprm) copy_string_kernel() argument
655 copy_strings_kernel(int argc, const char *const *argv, struct linux_binprm *bprm) copy_strings_kernel() argument
748 setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top, int executable_stack) setup_arg_pages() argument
872 transfer_args_to_stack(struct linux_binprm *bprm, unsigned long *sp_location) transfer_args_to_stack() argument
1245 begin_new_exec(struct linux_binprm * bprm) begin_new_exec() argument
1412 would_dump(struct linux_binprm *bprm, struct file *file) would_dump() argument
1433 setup_new_exec(struct linux_binprm * bprm) setup_new_exec() argument
1453 finalize_exec(struct linux_binprm *bprm) finalize_exec() argument
1468 prepare_bprm_creds(struct linux_binprm *bprm) prepare_bprm_creds() argument
1481 free_bprm(struct linux_binprm *bprm) free_bprm() argument
1507 struct linux_binprm *bprm = kzalloc(sizeof(*bprm), GFP_KERNEL); alloc_bprm() local
1538 bprm_change_interp(const char *interp, struct linux_binprm *bprm) bprm_change_interp() argument
1555 check_unsafe_exec(struct linux_binprm *bprm) check_unsafe_exec() argument
1587 bprm_fill_uid(struct linux_binprm *bprm, struct file *file) bprm_fill_uid() argument
1640 bprm_creds_from_file(struct linux_binprm *bprm) bprm_creds_from_file() argument
1655 prepare_binprm(struct linux_binprm *bprm) prepare_binprm() argument
1668 remove_arg_zero(struct linux_binprm *bprm) remove_arg_zero() argument
1708 search_binary_handler(struct linux_binprm *bprm) search_binary_handler() argument
1754 exec_binprm(struct linux_binprm *bprm) exec_binprm() argument
1802 bprm_execve(struct linux_binprm *bprm, int fd, struct filename *filename, int flags) bprm_execve() argument
1880 struct linux_binprm *bprm; do_execveat_common() local
1964 struct linux_binprm *bprm; kernel_execve() local
[all...]
H A Dbinfmt_script.c34 static int load_script(struct linux_binprm *bprm) in load_script() argument
41 if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!')) in load_script()
47 * because bprm->buf is not yet guaranteed to be NUL-terminated in load_script()
58 buf_end = bprm->buf + sizeof(bprm->buf) - 1; in load_script()
59 i_end = strnchr(bprm->buf, sizeof(bprm->buf), '\n'); in load_script()
61 i_end = next_non_spacetab(bprm->buf + 2, buf_end); in load_script()
77 i_name = next_non_spacetab(bprm in load_script()
[all...]
H A Dbinfmt_em86.c26 static int load_em86(struct linux_binprm *bprm) in load_em86() argument
35 elf_ex = *((struct elfhdr *)bprm->buf); in load_em86()
43 !bprm->file->f_op->mmap) { in load_em86()
48 if (bprm->interp_flags & BINPRM_FLAGS_PATH_INACCESSIBLE) in load_em86()
66 remove_arg_zero(bprm); in load_em86()
67 retval = copy_string_kernel(bprm->filename, bprm); in load_em86()
69 bprm->argc++; in load_em86()
71 retval = copy_string_kernel(i_arg, bprm); in load_em86()
73 bprm in load_em86()
[all...]
H A Dbinfmt_aout.c59 static unsigned long __user *create_aout_tables(char __user *p, struct linux_binprm * bprm) in create_aout_tables() argument
64 int argc = bprm->argc; in create_aout_tables()
65 int envc = bprm->envc; in create_aout_tables()
72 if (bprm->loader) { in create_aout_tables()
75 put_user(bprm->loader, --sp); in create_aout_tables()
78 put_user(bprm->exec, --sp); in create_aout_tables()
117 static int load_aout_binary(struct linux_binprm * bprm) in load_aout_binary() argument
126 ex = *((struct exec *) bprm->buf); /* exec-header */ in load_aout_binary()
130 i_size_read(file_inode(bprm->file)) < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { in load_aout_binary()
138 if (!bprm in load_aout_binary()
[all...]
H A Dbinfmt_flat.c123 static int create_flat_tables(struct linux_binprm *bprm, unsigned long arg_start) in create_flat_tables() argument
132 sp -= bprm->envc + 1; in create_flat_tables()
133 sp -= bprm->argc + 1; in create_flat_tables()
141 if (put_user(bprm->argc, sp++)) in create_flat_tables()
146 envp = (unsigned long)(sp + 2 + bprm->argc + 1); in create_flat_tables()
152 for (i = bprm->argc; i > 0; i--) { in create_flat_tables()
165 for (i = bprm->envc; i > 0; i--) { in create_flat_tables()
197 static int decompress_exec(struct linux_binprm *bprm, loff_t fpos, char *dst, in decompress_exec() argument
218 ret = kernel_read(bprm->file, buf, LBUFSIZE, &fpos); in decompress_exec()
288 ret = kernel_read(bprm in decompress_exec()
454 load_flat_file(struct linux_binprm *bprm, struct lib_info *libinfo, int id, unsigned long *extra_stack) load_flat_file() argument
920 struct linux_binprm bprm; load_flat_shared_library() local
956 load_flat_binary(struct linux_binprm *bprm) load_flat_binary() argument
[all...]
H A Dbinfmt_misc.c90 static Node *check_file(struct linux_binprm *bprm) in check_file() argument
92 char *p = strrchr(bprm->interp, '.'); in check_file()
113 s = bprm->buf + e->offset; in check_file()
132 static int load_misc_binary(struct linux_binprm *bprm) in load_misc_binary() argument
144 fmt = check_file(bprm); in load_misc_binary()
153 if (bprm->interp_flags & BINPRM_FLAGS_PATH_INACCESSIBLE) in load_misc_binary()
157 retval = remove_arg_zero(bprm); in load_misc_binary()
163 bprm->have_execfd = 1; in load_misc_binary()
166 retval = copy_string_kernel(bprm->interp, bprm); in load_misc_binary()
[all...]
/kernel/linux/linux-6.6/fs/
H A Dexec.c80 static int bprm_creds_from_file(struct linux_binprm *bprm);
181 * The nascent bprm->mm is not visible until exec_mmap() but it can
186 static void acct_arg_size(struct linux_binprm *bprm, unsigned long pages) in acct_arg_size() argument
189 long diff = (long)(pages - bprm->vma_pages); in acct_arg_size()
194 bprm->vma_pages = pages; in acct_arg_size()
198 static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, in get_arg_page() argument
202 struct vm_area_struct *vma = bprm->vma; in get_arg_page()
203 struct mm_struct *mm = bprm->mm; in get_arg_page()
234 acct_arg_size(bprm, vma_pages(vma)); in get_arg_page()
244 static void free_arg_pages(struct linux_binprm *bprm) in free_arg_pages() argument
248 flush_arg_page(struct linux_binprm *bprm, unsigned long pos, struct page *page) flush_arg_page() argument
254 __bprm_mm_init(struct linux_binprm *bprm) __bprm_mm_init() argument
298 valid_arg_len(struct linux_binprm *bprm, long len) valid_arg_len() argument
305 acct_arg_size(struct linux_binprm *bprm, unsigned long pages) acct_arg_size() argument
309 get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) get_arg_page() argument
329 free_arg_page(struct linux_binprm *bprm, int i) free_arg_page() argument
337 free_arg_pages(struct linux_binprm *bprm) free_arg_pages() argument
345 flush_arg_page(struct linux_binprm *bprm, unsigned long pos, struct page *page) flush_arg_page() argument
350 __bprm_mm_init(struct linux_binprm *bprm) __bprm_mm_init() argument
356 valid_arg_len(struct linux_binprm *bprm, long len) valid_arg_len() argument
369 bprm_mm_init(struct linux_binprm *bprm) bprm_mm_init() argument
478 bprm_stack_limits(struct linux_binprm *bprm) bprm_stack_limits() argument
524 copy_strings(int argc, struct user_arg_ptr argv, struct linux_binprm *bprm) copy_strings() argument
619 copy_string_kernel(const char *arg, struct linux_binprm *bprm) copy_string_kernel() argument
656 copy_strings_kernel(int argc, const char *const *argv, struct linux_binprm *bprm) copy_strings_kernel() argument
750 setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top, int executable_stack) setup_arg_pages() argument
878 transfer_args_to_stack(struct linux_binprm *bprm, unsigned long *sp_location) transfer_args_to_stack() argument
1247 begin_new_exec(struct linux_binprm * bprm) begin_new_exec() argument
1422 would_dump(struct linux_binprm *bprm, struct file *file) would_dump() argument
1444 setup_new_exec(struct linux_binprm * bprm) setup_new_exec() argument
1464 finalize_exec(struct linux_binprm *bprm) finalize_exec() argument
1479 prepare_bprm_creds(struct linux_binprm *bprm) prepare_bprm_creds() argument
1492 free_bprm(struct linux_binprm *bprm) free_bprm() argument
1518 struct linux_binprm *bprm = kzalloc(sizeof(*bprm), GFP_KERNEL); alloc_bprm() local
1549 bprm_change_interp(const char *interp, struct linux_binprm *bprm) bprm_change_interp() argument
1566 check_unsafe_exec(struct linux_binprm *bprm) check_unsafe_exec() argument
1604 bprm_fill_uid(struct linux_binprm *bprm, struct file *file) bprm_fill_uid() argument
1653 bprm_creds_from_file(struct linux_binprm *bprm) bprm_creds_from_file() argument
1668 prepare_binprm(struct linux_binprm *bprm) prepare_binprm() argument
1681 remove_arg_zero(struct linux_binprm *bprm) remove_arg_zero() argument
1721 search_binary_handler(struct linux_binprm *bprm) search_binary_handler() argument
1768 exec_binprm(struct linux_binprm *bprm) exec_binprm() argument
1816 bprm_execve(struct linux_binprm *bprm, int fd, struct filename *filename, int flags) bprm_execve() argument
1898 struct linux_binprm *bprm; do_execveat_common() local
1982 struct linux_binprm *bprm; kernel_execve() local
[all...]
H A Dbinfmt_script.c34 static int load_script(struct linux_binprm *bprm) in load_script() argument
41 if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!')) in load_script()
47 * because bprm->buf is not yet guaranteed to be NUL-terminated in load_script()
58 buf_end = bprm->buf + sizeof(bprm->buf) - 1; in load_script()
59 i_end = strnchr(bprm->buf, sizeof(bprm->buf), '\n'); in load_script()
61 i_end = next_non_spacetab(bprm->buf + 2, buf_end); in load_script()
77 i_name = next_non_spacetab(bprm in load_script()
[all...]
H A Dbinfmt_flat.c106 static int create_flat_tables(struct linux_binprm *bprm, unsigned long arg_start) in create_flat_tables() argument
115 sp -= bprm->envc + 1; in create_flat_tables()
116 sp -= bprm->argc + 1; in create_flat_tables()
124 if (put_user(bprm->argc, sp++)) in create_flat_tables()
129 envp = (unsigned long)(sp + 2 + bprm->argc + 1); in create_flat_tables()
135 for (i = bprm->argc; i > 0; i--) { in create_flat_tables()
148 for (i = bprm->envc; i > 0; i--) { in create_flat_tables()
180 static int decompress_exec(struct linux_binprm *bprm, loff_t fpos, char *dst, in decompress_exec() argument
201 ret = kernel_read(bprm->file, buf, LBUFSIZE, &fpos); in decompress_exec()
271 ret = kernel_read(bprm in decompress_exec()
404 load_flat_file(struct linux_binprm *bprm, struct lib_info *libinfo, unsigned long *extra_stack) load_flat_file() argument
853 load_flat_binary(struct linux_binprm *bprm) load_flat_binary() argument
[all...]
H A Dbinfmt_misc.c90 static Node *check_file(struct linux_binprm *bprm) in check_file() argument
92 char *p = strrchr(bprm->interp, '.'); in check_file()
113 s = bprm->buf + e->offset; in check_file()
132 static int load_misc_binary(struct linux_binprm *bprm) in load_misc_binary() argument
144 fmt = check_file(bprm); in load_misc_binary()
153 if (bprm->interp_flags & BINPRM_FLAGS_PATH_INACCESSIBLE) in load_misc_binary()
157 bprm->interp_flags |= BINPRM_FLAGS_PRESERVE_ARGV0; in load_misc_binary()
159 retval = remove_arg_zero(bprm); in load_misc_binary()
165 bprm->have_execfd = 1; in load_misc_binary()
168 retval = copy_string_kernel(bprm in load_misc_binary()
[all...]
/kernel/linux/linux-5.10/arch/alpha/kernel/
H A Dbinfmt_loader.c9 static int load_binary(struct linux_binprm *bprm) in load_binary() argument
11 struct exec *eh = (struct exec *)bprm->buf; in load_binary()
19 if (bprm->loader) in load_binary()
22 loader = bprm->vma->vm_end - sizeof(void *); in load_binary()
30 bprm->taso = eh->ah.entry < 0x100000000UL; in load_binary()
32 bprm->interpreter = file; in load_binary()
33 bprm->loader = loader; in load_binary()
/kernel/linux/linux-5.10/include/linux/
H A Dbinfmts.h119 extern int begin_new_exec(struct linux_binprm * bprm);
120 extern void setup_new_exec(struct linux_binprm * bprm);
121 extern void finalize_exec(struct linux_binprm *bprm);
131 extern int setup_arg_pages(struct linux_binprm * bprm,
134 extern int transfer_args_to_stack(struct linux_binprm *bprm,
136 extern int bprm_change_interp(const char *interp, struct linux_binprm *bprm);
137 int copy_string_kernel(const char *arg, struct linux_binprm *bprm);
/kernel/linux/linux-6.6/include/linux/
H A Dbinfmts.h109 extern int begin_new_exec(struct linux_binprm * bprm);
110 extern void setup_new_exec(struct linux_binprm * bprm);
111 extern void finalize_exec(struct linux_binprm *bprm);
121 extern int setup_arg_pages(struct linux_binprm * bprm,
124 extern int transfer_args_to_stack(struct linux_binprm *bprm,
126 extern int bprm_change_interp(const char *interp, struct linux_binprm *bprm);
127 int copy_string_kernel(const char *arg, struct linux_binprm *bprm);
/kernel/linux/linux-6.6/security/apparmor/
H A Ddomain.c299 * @bprm: binprm struct for the process to validate
305 static int aa_xattrs_match(const struct linux_binprm *bprm, in aa_xattrs_match() argument
314 if (!bprm || !attach->xattr_count) in aa_xattrs_match()
320 d = bprm->file->f_path.dentry; in aa_xattrs_match()
369 * @bprm - binprm structure of transitioning task
384 static struct aa_label *find_attach(const struct linux_binprm *bprm, in find_attach() argument
432 if (bprm && attach->xattr_count) { in find_attach()
438 ret = aa_xattrs_match(bprm, profile, in find_attach()
551 * @bprm: binprm structure of transitioning task
561 const struct linux_binprm *bprm, in x_to_label()
560 x_to_label(struct aa_profile *profile, const struct linux_binprm *bprm, const char *name, u32 xindex, const char **lookupname, const char **info) x_to_label() argument
629 profile_transition(const struct cred *subj_cred, struct aa_profile *profile, const struct linux_binprm *bprm, char *buffer, struct path_cond *cond, bool *secure_exec) profile_transition() argument
731 profile_onexec(const struct cred *subj_cred, struct aa_profile *profile, struct aa_label *onexec, bool stack, const struct linux_binprm *bprm, char *buffer, struct path_cond *cond, bool *secure_exec) profile_onexec() argument
807 handle_onexec(const struct cred *subj_cred, struct aa_label *label, struct aa_label *onexec, bool stack, const struct linux_binprm *bprm, char *buffer, struct path_cond *cond, bool *unsafe) handle_onexec() argument
871 apparmor_bprm_creds_for_exec(struct linux_binprm *bprm) apparmor_bprm_creds_for_exec() argument
[all...]
/kernel/linux/linux-5.10/security/apparmor/
H A Ddomain.c303 * @bprm: binprm struct for the process to validate
309 static int aa_xattrs_match(const struct linux_binprm *bprm, in aa_xattrs_match() argument
318 if (!bprm || !profile->xattr_count) in aa_xattrs_match()
324 d = bprm->file->f_path.dentry; in aa_xattrs_match()
371 * @bprm - binprm structure of transitioning task
386 static struct aa_label *find_attach(const struct linux_binprm *bprm, in find_attach() argument
429 if (bprm && profile->xattr_count) { in find_attach()
435 ret = aa_xattrs_match(bprm, profile, in find_attach()
546 * @bprm: binprm structure of transitioning task
556 const struct linux_binprm *bprm, in x_to_label()
555 x_to_label(struct aa_profile *profile, const struct linux_binprm *bprm, const char *name, u32 xindex, const char **lookupname, const char **info) x_to_label() argument
622 profile_transition(struct aa_profile *profile, const struct linux_binprm *bprm, char *buffer, struct path_cond *cond, bool *secure_exec) profile_transition() argument
720 profile_onexec(struct aa_profile *profile, struct aa_label *onexec, bool stack, const struct linux_binprm *bprm, char *buffer, struct path_cond *cond, bool *secure_exec) profile_onexec() argument
792 handle_onexec(struct aa_label *label, struct aa_label *onexec, bool stack, const struct linux_binprm *bprm, char *buffer, struct path_cond *cond, bool *unsafe) handle_onexec() argument
852 apparmor_bprm_creds_for_exec(struct linux_binprm *bprm) apparmor_bprm_creds_for_exec() argument
[all...]
/kernel/linux/linux-5.10/arch/x86/ia32/
H A Dia32_aout.c63 static u32 __user *create_aout_tables(char __user *p, struct linux_binprm *bprm) in create_aout_tables() argument
66 int argc = bprm->argc, envc = bprm->envc; in create_aout_tables()
104 static int load_aout_binary(struct linux_binprm *bprm) in load_aout_binary() argument
111 ex = *((struct exec *) bprm->buf); /* exec-header */ in load_aout_binary()
115 i_size_read(file_inode(bprm->file)) < in load_aout_binary()
133 retval = begin_new_exec(bprm); in load_aout_binary()
141 setup_new_exec(bprm); in load_aout_binary()
154 retval = setup_arg_pages(bprm, IA32_STACK_TOP, EXSTACK_DEFAULT); in load_aout_binary()
169 error = read_code(bprm in load_aout_binary()
[all...]
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/
H A Dima.c67 void BPF_PROG(bprm_committed_creds, struct linux_binprm *bprm) in BPF_PROG() argument
69 ima_test_common(bprm->file); in BPF_PROG()
73 int BPF_PROG(bprm_creds_for_exec, struct linux_binprm *bprm) in BPF_PROG() argument
78 ima_test_common(bprm->file); in BPF_PROG()
/kernel/linux/linux-6.6/security/tomoyo/
H A Ddomain.c616 struct linux_binprm *bprm = ee->bprm; in tomoyo_environ() local
621 unsigned long pos = bprm->p; in tomoyo_environ()
623 int argv_count = bprm->argc; in tomoyo_environ()
624 int envp_count = bprm->envc; in tomoyo_environ()
637 if (!tomoyo_dump_page(bprm, pos, &env_page)) in tomoyo_environ()
695 * @bprm: Pointer to "struct linux_binprm".
701 int tomoyo_find_next_domain(struct linux_binprm *bprm) in tomoyo_find_next_domain() argument
705 const char *original_name = bprm->filename; in tomoyo_find_next_domain()
722 ee->bprm in tomoyo_find_next_domain()
895 tomoyo_dump_page(struct linux_binprm *bprm, unsigned long pos, struct tomoyo_page_dump *dump) tomoyo_dump_page() argument
[all...]
H A Daudit.c14 * @bprm: Pointer to "struct linux_binprm".
17 * Returns the contents of @bprm on success, NULL otherwise.
22 static char *tomoyo_print_bprm(struct linux_binprm *bprm, in tomoyo_print_bprm() argument
30 unsigned long pos = bprm->p; in tomoyo_print_bprm()
32 int argv_count = bprm->argc; in tomoyo_print_bprm()
33 int envp_count = bprm->envc; in tomoyo_print_bprm()
46 if (!tomoyo_dump_page(bprm, pos, dump)) in tomoyo_print_bprm()
261 struct file *file = r->ee->bprm->file; in tomoyo_init_log()
264 bprm_info = tomoyo_print_bprm(r->ee->bprm, &r->ee->dump); in tomoyo_init_log()
281 struct linux_binprm *bprm in tomoyo_init_log() local
[all...]
H A Dcondition.c109 struct linux_binprm *bprm = ee->bprm; in tomoyo_scan_bprm() local
113 unsigned long pos = bprm->p; in tomoyo_scan_bprm()
115 int argv_count = bprm->argc; in tomoyo_scan_bprm()
116 int envp_count = bprm->envc; in tomoyo_scan_bprm()
130 if (!tomoyo_dump_page(bprm, pos, dump)) { in tomoyo_scan_bprm()
160 if (!tomoyo_argv(bprm->argc - argv_count, in tomoyo_scan_bprm()
199 * bprm->argv[] are not matched. in tomoyo_scan_bprm()
211 * in bprm->envp[] are either undefined or not matched. in tomoyo_scan_bprm()
780 struct linux_binprm *bprm in tomoyo_condition() local
[all...]
/kernel/linux/linux-5.10/security/
H A Dcommoncap.c550 struct linux_binprm *bprm, in bprm_caps_from_vfs_caps()
554 struct cred *new = bprm->cred; in bprm_caps_from_vfs_caps()
671 static int get_file_caps(struct linux_binprm *bprm, struct file *file, in get_file_caps() argument
677 cap_clear(bprm->cred->cap_permitted); in get_file_caps()
697 bprm->filename); in get_file_caps()
703 rc = bprm_caps_from_vfs_caps(&vcaps, bprm, effective, has_fcap); in get_file_caps()
707 cap_clear(bprm->cred->cap_permitted); in get_file_caps()
725 * @bprm: The execution parameters, including the proposed creds
735 static void handle_privileged_root(struct linux_binprm *bprm, bool has_fcap, in handle_privileged_root() argument
739 struct cred *new = bprm in handle_privileged_root()
549 bprm_caps_from_vfs_caps(struct cpu_vfs_cap_data *caps, struct linux_binprm *bprm, bool *effective, bool *has_fcap) bprm_caps_from_vfs_caps() argument
830 cap_bprm_creds_from_file(struct linux_binprm *bprm, struct file *file) cap_bprm_creds_from_file() argument
[all...]
/kernel/linux/linux-6.6/security/
H A Dcommoncap.c587 struct linux_binprm *bprm, in bprm_caps_from_vfs_caps()
591 struct cred *new = bprm->cred; in bprm_caps_from_vfs_caps()
723 static int get_file_caps(struct linux_binprm *bprm, struct file *file, in get_file_caps() argument
729 cap_clear(bprm->cred->cap_permitted); in get_file_caps()
750 bprm->filename); in get_file_caps()
756 rc = bprm_caps_from_vfs_caps(&vcaps, bprm, effective, has_fcap); in get_file_caps()
760 cap_clear(bprm->cred->cap_permitted); in get_file_caps()
778 * @bprm: The execution parameters, including the proposed creds
788 static void handle_privileged_root(struct linux_binprm *bprm, bool has_fcap, in handle_privileged_root() argument
792 struct cred *new = bprm in handle_privileged_root()
586 bprm_caps_from_vfs_caps(struct cpu_vfs_cap_data *caps, struct linux_binprm *bprm, bool *effective, bool *has_fcap) bprm_caps_from_vfs_caps() argument
885 cap_bprm_creds_from_file(struct linux_binprm *bprm, struct file *file) cap_bprm_creds_from_file() argument
[all...]
/kernel/linux/linux-5.10/security/tomoyo/
H A Ddomain.c618 struct linux_binprm *bprm = ee->bprm; in tomoyo_environ() local
623 unsigned long pos = bprm->p; in tomoyo_environ()
625 int argv_count = bprm->argc; in tomoyo_environ()
626 int envp_count = bprm->envc; in tomoyo_environ()
639 if (!tomoyo_dump_page(bprm, pos, &env_page)) in tomoyo_environ()
697 * @bprm: Pointer to "struct linux_binprm".
703 int tomoyo_find_next_domain(struct linux_binprm *bprm) in tomoyo_find_next_domain() argument
707 const char *original_name = bprm->filename; in tomoyo_find_next_domain()
724 ee->bprm in tomoyo_find_next_domain()
898 tomoyo_dump_page(struct linux_binprm *bprm, unsigned long pos, struct tomoyo_page_dump *dump) tomoyo_dump_page() argument
[all...]
H A Daudit.c14 * @bprm: Pointer to "struct linux_binprm".
17 * Returns the contents of @bprm on success, NULL otherwise.
22 static char *tomoyo_print_bprm(struct linux_binprm *bprm, in tomoyo_print_bprm() argument
30 unsigned long pos = bprm->p; in tomoyo_print_bprm()
32 int argv_count = bprm->argc; in tomoyo_print_bprm()
33 int envp_count = bprm->envc; in tomoyo_print_bprm()
46 if (!tomoyo_dump_page(bprm, pos, dump)) in tomoyo_print_bprm()
261 struct file *file = r->ee->bprm->file; in tomoyo_init_log()
264 bprm_info = tomoyo_print_bprm(r->ee->bprm, &r->ee->dump); in tomoyo_init_log()
281 struct linux_binprm *bprm in tomoyo_init_log() local
[all...]
H A Dcondition.c109 struct linux_binprm *bprm = ee->bprm; in tomoyo_scan_bprm() local
113 unsigned long pos = bprm->p; in tomoyo_scan_bprm()
115 int argv_count = bprm->argc; in tomoyo_scan_bprm()
116 int envp_count = bprm->envc; in tomoyo_scan_bprm()
130 if (!tomoyo_dump_page(bprm, pos, dump)) { in tomoyo_scan_bprm()
160 if (!tomoyo_argv(bprm->argc - argv_count, in tomoyo_scan_bprm()
199 * bprm->argv[] are not matched. in tomoyo_scan_bprm()
211 * in bprm->envp[] are either undefined or not matched. in tomoyo_scan_bprm()
780 struct linux_binprm *bprm in tomoyo_condition() local
[all...]

Completed in 18 milliseconds

12345