Lines Matching refs:sd
175 const struct seccomp_data *sd) in seccomp_cache_check_allow() argument
241 static void populate_seccomp_data(struct seccomp_data *sd) in populate_seccomp_data() argument
251 sd->nr = syscall_get_nr(task, regs); in populate_seccomp_data()
252 sd->arch = syscall_get_arch(task); in populate_seccomp_data()
254 sd->args[0] = args[0]; in populate_seccomp_data()
255 sd->args[1] = args[1]; in populate_seccomp_data()
256 sd->args[2] = args[2]; in populate_seccomp_data()
257 sd->args[3] = args[3]; in populate_seccomp_data()
258 sd->args[4] = args[4]; in populate_seccomp_data()
259 sd->args[5] = args[5]; in populate_seccomp_data()
260 sd->instruction_pointer = KSTK_EIP(task); in populate_seccomp_data()
365 const struct seccomp_data *sd) in seccomp_cache_check_allow() argument
367 int syscall_nr = sd->nr; in seccomp_cache_check_allow()
376 if (likely(sd->arch == SECCOMP_ARCH_NATIVE)) in seccomp_cache_check_allow()
380 if (likely(sd->arch == SECCOMP_ARCH_COMPAT)) in seccomp_cache_check_allow()
401 static u32 seccomp_run_filters(const struct seccomp_data *sd, in seccomp_run_filters() argument
413 if (seccomp_cache_check_allow(f, sd)) in seccomp_run_filters()
421 u32 cur_ret = bpf_prog_run_pin_on_cpu(f->prog, sd); in seccomp_run_filters()
721 struct seccomp_data *sd) in seccomp_is_const_allow() argument
739 reg_value = sd->nr; in seccomp_is_const_allow()
742 reg_value = sd->arch; in seccomp_is_const_allow()
798 struct seccomp_data sd; in seccomp_cache_prepare_bitmap() local
814 sd.nr = nr; in seccomp_cache_prepare_bitmap()
815 sd.arch = arch; in seccomp_cache_prepare_bitmap()
818 if (seccomp_is_const_allow(fprog, &sd)) in seccomp_cache_prepare_bitmap()
1098 const struct seccomp_data *sd) in seccomp_do_user_notification() argument
1113 n.data = sd; in seccomp_do_user_notification()
1191 static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd, in __seccomp_filter() argument
1205 if (!sd) { in __seccomp_filter()
1207 sd = &sd_local; in __seccomp_filter()
1210 filter_ret = seccomp_run_filters(sd, &match); in __seccomp_filter()
1274 if (seccomp_do_user_notification(this_syscall, match, sd)) in __seccomp_filter()
1316 static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd, in __seccomp_filter() argument
1325 int __secure_computing(const struct seccomp_data *sd) in __secure_computing() argument
1334 this_syscall = sd ? sd->nr : in __secure_computing()
1342 return __seccomp_filter(this_syscall, sd, false); in __secure_computing()