Home
last modified time | relevance | path

Searched refs:prog (Results 1 – 16 of 16) sorted by relevance

/systemd-251/src/core/
Dbpf-devices.c43 BPFProgram *prog, in bpf_prog_allow_list_device() argument
51 assert(prog); in bpf_prog_allow_list_device()
75 r = bpf_program_add_instructions(prog, insn + 3, ELEMENTSOF(insn) - 3); in bpf_prog_allow_list_device()
77 r = bpf_program_add_instructions(prog, insn, ELEMENTSOF(insn)); in bpf_prog_allow_list_device()
85 BPFProgram *prog, in bpf_prog_allow_list_major() argument
92 assert(prog); in bpf_prog_allow_list_major()
115 r = bpf_program_add_instructions(prog, insn + 3, ELEMENTSOF(insn) - 3); in bpf_prog_allow_list_major()
117 r = bpf_program_add_instructions(prog, insn, ELEMENTSOF(insn)); in bpf_prog_allow_list_major()
125 BPFProgram *prog, in bpf_prog_allow_list_class() argument
131 assert(prog); in bpf_prog_allow_list_class()
[all …]
Dbpf-foreign.c58 BPFProgram *prog; in attach_programs() local
63 HASHMAP_FOREACH_KEY(prog, key, foreign_by_key) { in attach_programs()
64 r = bpf_program_cgroup_attach(prog, key->attach_type, path, attach_flags); in attach_programs()
81 _cleanup_(bpf_program_freep) BPFProgram *prog = NULL; in bpf_foreign_prepare()
97 r = bpf_program_new_from_bpffs_path(bpffs_path, &prog); in bpf_foreign_prepare()
101 r = bpf_program_get_id_by_fd(prog->kernel_fd, &prog_id); in bpf_foreign_prepare()
110 r = hashmap_ensure_put(&u->bpf_foreign_by_key, &bpf_foreign_by_key_hash_ops, key, prog); in bpf_foreign_prepare()
119 TAKE_PTR(prog); in bpf_foreign_prepare()
Dbpf-devices.h12 BPFProgram **prog,
19 int bpf_devices_allow_list_device(BPFProgram *prog, const char *path, const char *node, const char …
20 int bpf_devices_allow_list_major(BPFProgram *prog, const char *path, const char *name, char type, c…
21 int bpf_devices_allow_list_static(BPFProgram *prog, const char *path);
Dbpf-lsm.c42 static bool bpf_can_link_lsm_program(struct bpf_program *prog) { in bpf_can_link_lsm_program() argument
45 assert(prog); in bpf_can_link_lsm_program()
47 link = sym_bpf_program__attach_lsm(prog); in bpf_can_link_lsm_program()
299 void lsm_bpf_destroy(struct restrict_fs_bpf *prog) { in lsm_bpf_destroy() argument
300 restrict_fs_bpf__destroy(prog); in lsm_bpf_destroy()
323 void lsm_bpf_destroy(struct restrict_fs_bpf *prog) { in lsm_bpf_destroy() argument
Dbpf-firewall.c611 _cleanup_(bpf_program_freep) BPFProgram *prog = NULL; in load_bpf_progs_from_fs_to_set()
614 r = bpf_program_new(BPF_PROG_TYPE_CGROUP_SKB, NULL, &prog); in load_bpf_progs_from_fs_to_set()
618 r = bpf_program_load_from_bpf_fs(prog, *bpf_fs_path); in load_bpf_progs_from_fs_to_set()
622 r = set_ensure_consume(set, &bpf_program_hash_ops, TAKE_PTR(prog)); in load_bpf_progs_from_fs_to_set()
661 BPFProgram *prog; in attach_custom_bpf_progs() local
671 SET_FOREACH_MOVE(prog, *set_installed, *set) { in attach_custom_bpf_progs()
672 r = bpf_program_cgroup_attach(prog, attach_type, path, BPF_F_ALLOW_MULTI); in attach_custom_bpf_progs()
Dbpf-lsm.h22 void lsm_bpf_destroy(struct restrict_fs_bpf *prog);
Dcgroup.c1242 _cleanup_(bpf_program_freep) BPFProgram *prog = NULL; in cgroup_apply_devices()
1254 r = bpf_devices_cgroup_init(&prog, policy, c->device_allow); in cgroup_apply_devices()
1274 (void) bpf_devices_allow_list_static(prog, path); in cgroup_apply_devices()
1292 r = bpf_devices_allow_list_device(prog, path, a->path, acc); in cgroup_apply_devices()
1294 r = bpf_devices_allow_list_major(prog, path, val, 'b', acc); in cgroup_apply_devices()
1296 r = bpf_devices_allow_list_major(prog, path, val, 'c', acc); in cgroup_apply_devices()
1306 if (prog && !any) { in cgroup_apply_devices()
1315 r = bpf_devices_apply_policy(&prog, policy, any, path, &u->bpf_device_control_installed); in cgroup_apply_devices()
/systemd-251/src/test/
Dtest-bpf-devices.c18 _cleanup_(bpf_program_freep) BPFProgram *prog = NULL; in test_policy_closed()
24 r = bpf_devices_cgroup_init(&prog, CGROUP_DEVICE_POLICY_CLOSED, true); in test_policy_closed()
27 r = bpf_devices_allow_list_static(prog, cgroup_path); in test_policy_closed()
30 …r = bpf_devices_apply_policy(&prog, CGROUP_DEVICE_POLICY_CLOSED, true, cgroup_path, installed_prog… in test_policy_closed()
55 _cleanup_(bpf_program_freep) BPFProgram *prog = NULL; in test_policy_strict()
61 r = bpf_devices_cgroup_init(&prog, CGROUP_DEVICE_POLICY_STRICT, true); in test_policy_strict()
64 r = bpf_devices_allow_list_device(prog, cgroup_path, "/dev/null", "rw"); in test_policy_strict()
67 r = bpf_devices_allow_list_device(prog, cgroup_path, "/dev/random", "r"); in test_policy_strict()
70 r = bpf_devices_allow_list_device(prog, cgroup_path, "/dev/zero", "w"); in test_policy_strict()
73 …r = bpf_devices_apply_policy(&prog, CGROUP_DEVICE_POLICY_STRICT, true, cgroup_path, installed_prog… in test_policy_strict()
[all …]
Dtest-bpf-foreign-programs.c156 _cleanup_(bpf_program_freep) BPFProgram *prog = NULL; in pin_programs()
163 r = bpf_program_new(test_suite[i].prog_type, "sd_trivial", &prog); in pin_programs()
167 r = bpf_program_add_instructions(prog, trivial, ELEMENTSOF(trivial)); in pin_programs()
171 r = bpf_program_load_kernel(prog, log_buf, ELEMENTSOF(log_buf)); in pin_programs()
182 r = bpf_program_pin(prog->kernel_fd, test_suite[i].bpffs_path); in pin_programs()
/systemd-251/src/shared/
Dbpf-link.c7 bool bpf_can_link_program(struct bpf_program *prog) { in bpf_can_link_program() argument
10 assert(prog); in bpf_can_link_program()
16 link = sym_bpf_program__attach_cgroup(prog, /*cgroup_fd=*/-1); in bpf_can_link_program()
Dbpf-link.h11 bool bpf_can_link_program(struct bpf_program *prog);
/systemd-251/src/udev/
Dmeson.build144 foreach prog : udev_progs
145 name = prog[0].split('/')[0]
149 prog,
/systemd-251/test/
Dtest-functions2495 local prog bin
2497 sed -rn 's/^.*?PROGRAM==?"([^ "]+).*$/\1/p' "$rule" | while read -r prog; do
2498 if [ -x "/lib/udev/$prog" ]; then
2499 bin="/lib/udev/$prog"
2501 if ! bin="$(find_binary "$prog")"; then
2502 … dinfo "Skipping program $prog used in udev rule $(basename "$rule") as it cannot be found"
2603 local prog="${1:?}"
2605 if [[ "$prog" = '-o' ]]; then
2610 for prog in "$@"; do
2611 if ! inst "$prog" ; then
[all …]
/systemd-251/
Dmeson.build635 foreach prog : progs
636 path = get_option(prog[0] + '-path')
638 message('Using @1@ for @0@'.format(prog[0], path))
640 exe = find_program(prog[0],
641 '/usr/sbin/' + prog[0],
642 '/sbin/' + prog[0],
644 path = exe.found() ? exe.path() : prog[1]
646 name = prog.length() > 2 ? prog[2] : prog[0].to_upper()
1052 llvm_strip_bin = run_command(clang, '--print-prog-name', 'llvm-strip',
/systemd-251/src/boot/efi/
Dmeson.build57 objcopy = run_command(cc.cmd_array(), '-print-prog-name=objcopy', check: true).stdout().strip()
/systemd-251/hwdb.d/
Dpci.ids35052 # prog-if prog-if_name <-- two tabs