/Linux-v6.1/tools/testing/selftests/bpf/prog_tests/ |
D | tc_bpf.c | 25 static int test_tc_bpf_basic(const struct bpf_tc_hook *hook, int fd) in test_tc_bpf_basic() argument 36 ret = bpf_tc_attach(hook, &opts); in test_tc_bpf_basic() 47 ret = bpf_tc_attach(hook, &opts); in test_tc_bpf_basic() 52 ret = bpf_tc_query(hook, &opts); in test_tc_bpf_basic() 63 ret = bpf_tc_detach(hook, &opts); in test_tc_bpf_basic() 68 static int test_tc_bpf_api(struct bpf_tc_hook *hook, int fd) in test_tc_bpf_api() argument 76 if (!ASSERT_EQ(ret, -EINVAL, "bpf_tc_hook_create invalid hook = NULL")) in test_tc_bpf_api() 79 /* hook ifindex = 0 */ in test_tc_bpf_api() 81 if (!ASSERT_EQ(ret, -EINVAL, "bpf_tc_hook_create invalid hook ifindex == 0")) in test_tc_bpf_api() 85 if (!ASSERT_EQ(ret, -EINVAL, "bpf_tc_hook_destroy invalid hook ifindex == 0")) in test_tc_bpf_api() [all …]
|
D | test_tunnel.c | 214 static int attach_tc_prog(struct bpf_tc_hook *hook, int igr_fd, int egr_fd) in attach_tc_prog() argument 222 ret = bpf_tc_hook_create(hook); in attach_tc_prog() 223 if (!ASSERT_OK(ret, "create tc hook")) in attach_tc_prog() 227 hook->attach_point = BPF_TC_INGRESS; in attach_tc_prog() 228 ret = bpf_tc_attach(hook, &opts1); in attach_tc_prog() 230 bpf_tc_hook_destroy(hook); in attach_tc_prog() 236 hook->attach_point = BPF_TC_EGRESS; in attach_tc_prog() 237 ret = bpf_tc_attach(hook, &opts2); in attach_tc_prog() 239 bpf_tc_hook_destroy(hook); in attach_tc_prog() 265 /* load and attach bpf prog to tunnel dev tc hook point */ in test_vxlan_tunnel() [all …]
|
/Linux-v6.1/include/linux/ |
D | netfilter.h | 68 u8 hook; member 87 nf_hookfn *hook; member 98 nf_hookfn *hook; member 112 /* trailer: pointers to original orig_ops of each hook, 117 * needed in slow path (hook register/unregister): 121 * only needed when a hook is deleted, not during 142 return entry->hook(entry->priv, skb, state); in nf_hook_entry_hookfn() 146 unsigned int hook, in nf_hook_state_init() argument 154 p->hook = hook; in nf_hook_state_init() 182 /* Function to register/unregister hook points. */ [all …]
|
D | lsm_hooks.h | 33 * union security_list_options - Linux Security Module hook function list 41 * new program. This hook may also optionally check permissions 43 * The hook must set @bprm->secureexec to 1 if AT_SECURE should be set to 46 * Return 0 if the hook is successful and permission is granted. 54 * hook may also optionally check permissions (e.g. for transitions 56 * The hook must set @bprm->secureexec to 1 if AT_SECURE should be set to 58 * The hook must add to @bprm->per_clear any personality flags that 61 * Return 0 if the hook is successful and permission is granted. 63 * This hook mediates the point when a search for a binary handler will 66 * envp list are reliably available in @bprm. This hook may be called [all …]
|
/Linux-v6.1/net/netfilter/ |
D | utils.c | 10 __sum16 nf_ip_checksum(struct sk_buff *skb, unsigned int hook, in nf_ip_checksum() argument 18 if (hook != NF_INET_PRE_ROUTING && hook != NF_INET_LOCAL_IN) in nf_ip_checksum() 43 static __sum16 nf_ip_checksum_partial(struct sk_buff *skb, unsigned int hook, in nf_ip_checksum_partial() argument 53 return nf_ip_checksum(skb, hook, dataoff, protocol); in nf_ip_checksum_partial() 64 __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, in nf_ip6_checksum() argument 72 if (hook != NF_INET_PRE_ROUTING && hook != NF_INET_LOCAL_IN) in nf_ip6_checksum() 97 static __sum16 nf_ip6_checksum_partial(struct sk_buff *skb, unsigned int hook, in nf_ip6_checksum_partial() argument 108 return nf_ip6_checksum(skb, hook, dataoff, protocol); in nf_ip6_checksum_partial() 123 __sum16 nf_checksum(struct sk_buff *skb, unsigned int hook, in nf_checksum() argument 131 csum = nf_ip_checksum(skb, hook, dataoff, protocol); in nf_checksum() [all …]
|
D | nfnetlink_hook.c | 57 u8 hook; member 134 ret = snprintf(sym, sizeof(sym), "%ps", ops->hook); in nfnl_hook_dump_one() 186 nfnl_hook_entries_head(u8 pf, unsigned int hook, struct net *net, const char *dev) in nfnl_hook_entries_head() argument 195 if (hook >= ARRAY_SIZE(net->nf.hooks_ipv4)) in nfnl_hook_entries_head() 197 hook_head = rcu_dereference(net->nf.hooks_ipv4[hook]); in nfnl_hook_entries_head() 200 if (hook >= ARRAY_SIZE(net->nf.hooks_ipv6)) in nfnl_hook_entries_head() 202 hook_head = rcu_dereference(net->nf.hooks_ipv6[hook]); in nfnl_hook_entries_head() 206 if (hook >= ARRAY_SIZE(net->nf.hooks_arp)) in nfnl_hook_entries_head() 208 hook_head = rcu_dereference(net->nf.hooks_arp[hook]); in nfnl_hook_entries_head() 213 if (hook >= ARRAY_SIZE(net->nf.hooks_bridge)) in nfnl_hook_entries_head() [all …]
|
D | nft_reject_netdev.c | 30 int hook) in nft_reject_netdev_send_v4_tcp_reset() argument 34 nskb = nf_reject_skb_v4_tcp_reset(net, oldskb, dev, hook); in nft_reject_netdev_send_v4_tcp_reset() 44 int hook, u8 code) in nft_reject_netdev_send_v4_unreach() argument 48 nskb = nf_reject_skb_v4_unreach(net, oldskb, dev, hook, code); in nft_reject_netdev_send_v4_unreach() 58 int hook) in nft_reject_netdev_send_v6_tcp_reset() argument 62 nskb = nf_reject_skb_v6_tcp_reset(net, oldskb, dev, hook); in nft_reject_netdev_send_v6_tcp_reset() 73 int hook, u8 code) in nft_reject_netdev_send_v6_unreach() argument 77 nskb = nf_reject_skb_v6_unreach(net, oldskb, dev, hook, code); in nft_reject_netdev_send_v6_unreach()
|
D | core.c | 95 return NF_ACCEPT; /* ACCEPT makes nf_hook_slow call next hook */ in accept_all() 99 .hook = accept_all, 148 new->hooks[nhooks].hook = reg->hook; in nf_hook_entries_grow() 157 new->hooks[nhooks].hook = reg->hook; in nf_hook_entries_grow() 207 * __nf_hook_entries_try_shrink - try to shrink hook array 209 * @old -- current hook blob at @pp 210 * @pp -- location of hook blob 212 * Hook unregistration must always succeed, so to-be-removed hooks 213 * are replaced by a dummy one that will just move to next hook. 450 * nf_remove_net_hook - remove a hook from blob [all …]
|
/Linux-v6.1/arch/arm64/kernel/ |
D | debug-monitors.c | 179 void register_user_step_hook(struct step_hook *hook) in register_user_step_hook() argument 181 register_debug_hook(&hook->node, &user_step_hook); in register_user_step_hook() 184 void unregister_user_step_hook(struct step_hook *hook) in unregister_user_step_hook() argument 186 unregister_debug_hook(&hook->node); in unregister_user_step_hook() 189 void register_kernel_step_hook(struct step_hook *hook) in register_kernel_step_hook() argument 191 register_debug_hook(&hook->node, &kernel_step_hook); in register_kernel_step_hook() 194 void unregister_kernel_step_hook(struct step_hook *hook) in unregister_kernel_step_hook() argument 196 unregister_debug_hook(&hook->node); in unregister_kernel_step_hook() 207 struct step_hook *hook; in call_step_hook() local 217 list_for_each_entry_rcu(hook, list, node) { in call_step_hook() [all …]
|
D | traps.c | 379 void register_undef_hook(struct undef_hook *hook) in register_undef_hook() argument 384 list_add(&hook->node, &undef_hook); in register_undef_hook() 388 void unregister_undef_hook(struct undef_hook *hook) in unregister_undef_hook() argument 393 list_del(&hook->node); in unregister_undef_hook() 399 struct undef_hook *hook; in call_undef_hook() local 433 list_for_each_entry(hook, &undef_hook, node) in call_undef_hook() 434 if ((instr & hook->instr_mask) == hook->instr_val && in call_undef_hook() 435 (regs->pstate & hook->pstate_mask) == hook->pstate_val) in call_undef_hook() 436 fn = hook->fn; in call_undef_hook() 753 const struct sys64_hook *hook, *hook_base; in do_cp15instr() local [all …]
|
/Linux-v6.1/tools/lib/bpf/ |
D | netlink.c | 435 static int attach_point_to_config(struct bpf_tc_hook *hook, in attach_point_to_config() argument 438 switch (OPTS_GET(hook, attach_point, 0)) { in attach_point_to_config() 442 if (OPTS_GET(hook, parent, 0)) in attach_point_to_config() 475 static int tc_qdisc_modify(struct bpf_tc_hook *hook, int cmd, int flags) in tc_qdisc_modify() argument 481 ret = attach_point_to_config(hook, &config); in tc_qdisc_modify() 490 req.tc.tcm_ifindex = OPTS_GET(hook, ifindex, 0); in tc_qdisc_modify() 499 static int tc_qdisc_create_excl(struct bpf_tc_hook *hook) in tc_qdisc_create_excl() argument 501 return tc_qdisc_modify(hook, RTM_NEWQDISC, NLM_F_CREATE | NLM_F_EXCL); in tc_qdisc_create_excl() 504 static int tc_qdisc_delete(struct bpf_tc_hook *hook) in tc_qdisc_delete() argument 506 return tc_qdisc_modify(hook, RTM_DELQDISC, 0); in tc_qdisc_delete() [all …]
|
/Linux-v6.1/include/drm/ |
D | drm_simple_kms_helper.h | 34 * This hook is used by the probe helpers to filter the mode list in 60 * This hook is optional. 70 * This hook is optional. 82 * This hook is optional. 98 * This hook is optional. 116 * the documentation for the &drm_plane_helper_funcs.prepare_fb hook for 119 * For GEM drivers who neither have a @prepare_fb nor @cleanup_fb hook 123 * their @prepare_fb hook. 132 * the documentation for the &drm_plane_helper_funcs.cleanup_fb hook for 142 * the documentation for the &drm_crtc_funcs.enable_vblank hook for [all …]
|
D | drm_modeset_helper_vtables.h | 71 * DRM_MODE_DPMS_OFF if the @disable hook isn't used. 74 * also support using this hook for enabling and disabling a CRTC to 86 * @dpms hook with DRM_MODE_DPMS_OFF. 89 * also support using this hook for disabling a CRTC to facilitate 100 * drivers ended up implementing this by calling their @dpms hook with 104 * also support using this hook for enabling a CRTC to facilitate 121 * This hook is used by the probe helpers to filter the mode list in 217 * @mode_set hook in drm_helper_crtc_mode_set(). 222 * should not use this hook. This is because the helper library calls 223 * this hook only once per mode change and not every time the display [all …]
|
/Linux-v6.1/net/ipv4/netfilter/ |
D | ipt_REJECT.c | 34 int hook = xt_hooknum(par); in reject_tg() local 38 nf_send_unreach(skb, ICMP_NET_UNREACH, hook); in reject_tg() 41 nf_send_unreach(skb, ICMP_HOST_UNREACH, hook); in reject_tg() 44 nf_send_unreach(skb, ICMP_PROT_UNREACH, hook); in reject_tg() 47 nf_send_unreach(skb, ICMP_PORT_UNREACH, hook); in reject_tg() 50 nf_send_unreach(skb, ICMP_NET_ANO, hook); in reject_tg() 53 nf_send_unreach(skb, ICMP_HOST_ANO, hook); in reject_tg() 56 nf_send_unreach(skb, ICMP_PKT_FILTERED, hook); in reject_tg() 59 nf_send_reset(xt_net(par), par->state->sk, skb, hook); in reject_tg()
|
D | nf_reject_ipv4.c | 42 int hook) in nf_reject_skb_v4_tcp_reset() argument 52 oth = nf_reject_ip_tcphdr_get(oldskb, &_oth, hook); in nf_reject_skb_v4_tcp_reset() 77 int hook, u8 code) in nf_reject_skb_v4_unreach() argument 108 nf_ip_checksum(oldskb, hook, ip_hdrlen(oldskb), proto)) in nf_reject_skb_v4_unreach() 140 struct tcphdr *_oth, int hook) in nf_reject_ip_tcphdr_get() argument 161 if (nf_ip_checksum(oldskb, hook, ip_hdrlen(oldskb), IPPROTO_TCP)) in nf_reject_ip_tcphdr_get() 240 int hook) in nf_send_reset() argument 248 oth = nf_reject_ip_tcphdr_get(oldskb, &_oth, hook); in nf_send_reset() 252 if ((hook == NF_INET_PRE_ROUTING || hook == NF_INET_INGRESS) && in nf_send_reset() 313 void nf_send_unreach(struct sk_buff *skb_in, int code, int hook) in nf_send_unreach() argument [all …]
|
/Linux-v6.1/arch/arm64/include/asm/ |
D | debug-monitors.h | 70 void register_user_step_hook(struct step_hook *hook); 71 void unregister_user_step_hook(struct step_hook *hook); 73 void register_kernel_step_hook(struct step_hook *hook); 74 void unregister_kernel_step_hook(struct step_hook *hook); 83 void register_user_break_hook(struct break_hook *hook); 84 void unregister_user_break_hook(struct break_hook *hook); 86 void register_kernel_break_hook(struct break_hook *hook); 87 void unregister_kernel_break_hook(struct break_hook *hook);
|
/Linux-v6.1/security/integrity/ima/ |
D | ima.h | 49 /* bitset of digests algorithms allowed in the setxattr hook */ 189 #define __ima_hooks(hook) \ argument 190 hook(NONE, none) \ 191 hook(FILE_CHECK, file) \ 192 hook(MMAP_CHECK, mmap) \ 193 hook(BPRM_CHECK, bprm) \ 194 hook(CREDS_CHECK, creds) \ 195 hook(POST_SETATTR, post_setattr) \ 196 hook(MODULE_CHECK, module) \ 197 hook(FIRMWARE_CHECK, firmware) \ [all …]
|
/Linux-v6.1/include/uapi/linux/netfilter/ |
D | nfnetlink_hook.h | 11 * enum nfnl_hook_attributes - netfilter hook netlink attributes 13 * @NFNLA_HOOK_HOOKNUM: netfilter hook number (NLA_U32) 14 * @NFNLA_HOOK_PRIORITY: netfilter hook priority (NLA_U32) 16 * @NFNLA_HOOK_FUNCTION_NAME: hook function name (NLA_STRING) 17 * @NFNLA_HOOK_MODULE_NAME: kernel module that registered this hook (NLA_STRING) 18 * @NFNLA_HOOK_CHAIN_INFO: basechain hook metadata (NLA_NESTED)
|
/Linux-v6.1/security/selinux/ |
D | xfrm.c | 5 * This file contains the SELinux XFRM hook function implementations. 150 * LSM hook implementation that authorizes that a flow can use a xfrm policy 173 * LSM hook implementation that authorizes that a state matches 259 * LSM hook implementation that checks and/or returns the xfrm sid for the 283 * LSM hook implementation that allocs and transfers uctx spec to xfrm_policy. 293 * LSM hook implementation that copies security data structure from old to new 315 * LSM hook implementation that frees xfrm_sec_ctx security information. 323 * LSM hook implementation that authorizes deletion of labeled policies. 331 * LSM hook implementation that allocates a xfrm_sec_state, populates it using 341 * LSM hook implementation that allocates a xfrm_sec_state and populates based [all …]
|
/Linux-v6.1/drivers/gpu/drm/ |
D | drm_atomic_state_helper.c | 88 * hook. 107 * drm_atomic_helper_crtc_reset - default &drm_crtc_funcs.reset hook for CRTCs 163 * drm_atomic_helper_crtc_duplicate_state - default state duplicate hook 166 * Default CRTC state duplicate hook for drivers which don't have their own 222 * drm_atomic_helper_crtc_destroy_state - default state destroy hook 226 * Default CRTC state destroy hook for drivers which don't have their own 289 * hook. 304 * drm_atomic_helper_plane_reset - default &drm_plane_funcs.reset hook for planes 345 * drm_atomic_helper_plane_duplicate_state - default state duplicate hook 348 * Default plane state duplicate hook for drivers which don't have their own [all …]
|
/Linux-v6.1/include/net/netfilter/ipv4/ |
D | nf_reject.h | 10 void nf_send_unreach(struct sk_buff *skb_in, int code, int hook); 12 int hook); 14 struct tcphdr *_oth, int hook); 24 int hook, u8 code); 28 int hook);
|
/Linux-v6.1/tools/testing/selftests/netfilter/ |
D | nft_queue.sh | 101 type filter hook prerouting priority $prio; policy accept; 105 type filter hook input priority $prio; policy accept; 109 type filter hook forward priority $prio; policy accept; 114 type filter hook output priority $prio; policy accept; 120 type filter hook postrouting priority $prio; policy accept; 133 type filter hook prerouting priority $prio; policy accept; 137 type filter hook input priority $prio; policy accept; 141 type filter hook forward priority $prio; policy accept; 145 type filter hook output priority $prio; policy accept; 149 type filter hook postrouting priority $prio; policy accept; [all …]
|
/Linux-v6.1/net/ipv6/netfilter/ |
D | nf_reject_ipv6.c | 15 static bool nf_reject_v6_csum_ok(struct sk_buff *skb, int hook) in nf_reject_v6_csum_ok() argument 37 return nf_ip6_checksum(skb, hook, thoff, proto) == 0; in nf_reject_v6_csum_ok() 62 int hook) in nf_reject_skb_v6_tcp_reset() argument 73 oth = nf_reject_ip6_tcphdr_get(oldskb, &_oth, &otcplen, hook); in nf_reject_skb_v6_tcp_reset() 97 int hook, u8 code) in nf_reject_skb_v6_unreach() argument 115 if (!nf_reject_v6_csum_ok(oldskb, hook)) in nf_reject_skb_v6_unreach() 151 unsigned int *otcplen, int hook) in nf_reject_ip6_tcphdr_get() argument 188 if (nf_ip6_checksum(oldskb, hook, tcphoff, IPPROTO_TCP)) { in nf_reject_ip6_tcphdr_get() 279 int hook) in nf_send_reset6() argument 297 otcph = nf_reject_ip6_tcphdr_get(oldskb, &_otcph, &otcplen, hook); in nf_send_reset6() [all …]
|
/Linux-v6.1/sound/core/ |
D | vmaster.c | 36 void (*hook)(void *private_data, int); member 130 if (master->hook) in master_init() 131 master->hook(master->hook_private_data, master->val); in master_init() 351 if (master->hook && !first_init) in master_put() 352 master->hook(master->hook_private_data, master->val); in master_put() 437 * snd_ctl_add_vmaster_hook - Add a hook to a vmaster control 439 * @hook: the hook function 442 * Adds the given hook to the vmaster control element so that it's called 448 void (*hook)(void *private_data, int), in snd_ctl_add_vmaster_hook() 452 master->hook = hook; in snd_ctl_add_vmaster_hook() [all …]
|
/Linux-v6.1/net/bridge/netfilter/ |
D | nft_reject_bridge.c | 48 int hook) in nft_reject_br_send_v4_tcp_reset() argument 52 nskb = nf_reject_skb_v4_tcp_reset(net, oldskb, NULL, hook); in nft_reject_br_send_v4_tcp_reset() 64 int hook, u8 code) in nft_reject_br_send_v4_unreach() argument 68 nskb = nf_reject_skb_v4_unreach(net, oldskb, NULL, hook, code); in nft_reject_br_send_v4_unreach() 80 int hook) in nft_reject_br_send_v6_tcp_reset() argument 84 nskb = nf_reject_skb_v6_tcp_reset(net, oldskb, NULL, hook); in nft_reject_br_send_v6_tcp_reset() 97 int hook, u8 code) in nft_reject_br_send_v6_unreach() argument 101 nskb = nf_reject_skb_v6_unreach(net, oldskb, NULL, hook, code); in nft_reject_br_send_v6_unreach()
|