Home
last modified time | relevance | path

Searched refs:hook (Results 1 – 25 of 222) sorted by relevance

123456789

/linux-6.1.9/tools/testing/selftests/bpf/prog_tests/
Dtc_bpf.c25 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
208 ret = bpf_tc_detach(hook, NULL); in test_tc_bpf_api()
212 ret = bpf_tc_detach(hook, &opts_hpr); in test_tc_bpf_api()
216 ret = bpf_tc_detach(hook, &opts_hpf); in test_tc_bpf_api()
220 ret = bpf_tc_detach(hook, &opts_hpi); in test_tc_bpf_api()
[all …]
Dtest_tunnel.c214 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()
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()
/linux-6.1.9/include/linux/
Dnetfilter.h68 u8 hook; member
87 nf_hookfn *hook; member
98 nf_hookfn *hook; member
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()
211 static inline int nf_hook(u_int8_t pf, unsigned int hook, struct net *net, in nf_hook() argument
221 __builtin_constant_p(hook) && in nf_hook()
222 !static_key_false(&nf_hooks_needed[pf][hook])) in nf_hook()
229 hook_head = rcu_dereference(net->nf.hooks_ipv4[hook]); in nf_hook()
[all …]
Dpci.h1991 void (*hook)(struct pci_dev *dev); member
2008 class_shift, hook) \ argument
2009 __ADDRESSABLE(hook) \
2014 ".long " #hook " - . \n" \
2024 class_shift, hook, stub) \ argument
2028 hook(dev); \
2034 class_shift, hook, stub) \ argument
2036 class_shift, hook)
2040 class_shift, hook) \ argument
2042 class_shift, hook, __UNIQUE_ID(hook))
[all …]
/linux-6.1.9/arch/arm64/kernel/
Ddebug-monitors.c179 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 …]
Dtraps.c379 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 …]
Darmv8_deprecated.c66 struct undef_hook *hook; in register_emulation_hooks() local
70 for (hook = ops->hooks; hook->instr_mask; hook++) in register_emulation_hooks()
71 register_undef_hook(hook); in register_emulation_hooks()
78 struct undef_hook *hook; in remove_emulation_hooks() local
82 for (hook = ops->hooks; hook->instr_mask; hook++) in remove_emulation_hooks()
83 unregister_undef_hook(hook); in remove_emulation_hooks()
/linux-6.1.9/net/netfilter/
Dutils.c10 __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 …]
Dnfnetlink_hook.c57 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 …]
Dnft_reject_netdev.c30 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()
Dnf_conntrack_pptp.c92 const struct nf_nat_pptp_hook *hook; in pptp_expectfn() local
103 hook = rcu_dereference(nf_nat_pptp_hook); in pptp_expectfn()
104 if (hook && ct->master->status & IPS_NAT_MASK) in pptp_expectfn()
105 hook->expectfn(ct, exp); in pptp_expectfn()
190 const struct nf_nat_pptp_hook *hook; in exp_gre() local
220 hook = rcu_dereference(nf_nat_pptp_hook); in exp_gre()
221 if (hook && ct->status & IPS_NAT_MASK) in exp_gre()
222 hook->exp_gre(exp_orig, exp_reply); in exp_gre()
260 const struct nf_nat_pptp_hook *hook; in pptp_inbound_pkt() local
364 hook = rcu_dereference(nf_nat_pptp_hook); in pptp_inbound_pkt()
[all …]
Dnf_tables_offload.c223 struct nft_hook *hook; in nft_chain_offload_support() local
228 list_for_each_entry(hook, &basechain->hook_list, list) { in nft_chain_offload_support()
229 if (hook->ops.pf != NFPROTO_NETDEV || in nft_chain_offload_support()
230 hook->ops.hooknum != NF_NETDEV_INGRESS) in nft_chain_offload_support()
233 dev = hook->ops.dev; in nft_chain_offload_support()
458 struct nft_hook *hook; in nft_flow_block_chain() local
461 list_for_each_entry(hook, &basechain->hook_list, list) { in nft_flow_block_chain()
462 dev = hook->ops.dev; in nft_flow_block_chain()
479 list_for_each_entry(hook, &basechain->hook_list, list) { in nft_flow_block_chain()
483 dev = hook->ops.dev; in nft_flow_block_chain()
[all …]
/linux-6.1.9/tools/lib/bpf/
Dnetlink.c435 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-6.1.9/net/ipv4/netfilter/
Dipt_REJECT.c34 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()
Dnf_reject_ipv4.c42 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-6.1.9/arch/arm64/include/asm/
Ddebug-monitors.h70 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-6.1.9/security/integrity/ima/
Dima.h189 #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) \
198 hook(KEXEC_KERNEL_CHECK, kexec_kernel) \
[all …]
/linux-6.1.9/include/net/netfilter/ipv4/
Dnf_reject.h10 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-6.1.9/net/bridge/netfilter/
Dnft_reject_bridge.c48 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()
/linux-6.1.9/net/ipv6/netfilter/
Dnf_reject_ipv6.c15 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-6.1.9/include/net/netfilter/ipv6/
Dnf_reject.h11 int hook);
14 unsigned int *otcplen, int hook);
25 int hook);
29 int hook, u8 code);
/linux-6.1.9/drivers/gpu/drm/i915/display/
Dintel_quirks.c72 void (*hook)(struct drm_i915_private *i915); member
77 void (*hook)(struct drm_i915_private *i915); member
115 .hook = quirk_invert_brightness,
137 .hook = quirk_no_pps_backlight_power_hook,
217 q->hook(i915); in intel_init_quirks()
221 intel_dmi_quirks[i].hook(i915); in intel_init_quirks()
/linux-6.1.9/tools/testing/selftests/netfilter/
Dnft_queue.sh101 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-6.1.9/arch/csky/kernel/
Dftrace.c70 static int ftrace_check_current_nop(unsigned long hook) in ftrace_check_current_nop() argument
73 unsigned long hook_pos = hook - 2; in ftrace_check_current_nop()
91 static int ftrace_modify_code(unsigned long hook, unsigned long target, in ftrace_modify_code() argument
96 unsigned long hook_pos = hook - 2; in ftrace_modify_code()
99 make_jbsr(target, hook, call, nolr); in ftrace_modify_code()
/linux-6.1.9/drivers/acpi/
Dbattery.c689 static void __battery_hook_unregister(struct acpi_battery_hook *hook, int lock) in __battery_hook_unregister() argument
699 hook->remove_battery(battery->bat); in __battery_hook_unregister()
701 list_del(&hook->list); in __battery_hook_unregister()
704 pr_info("extension unregistered: %s\n", hook->name); in __battery_hook_unregister()
707 void battery_hook_unregister(struct acpi_battery_hook *hook) in battery_hook_unregister() argument
709 __battery_hook_unregister(hook, 1); in battery_hook_unregister()
713 void battery_hook_register(struct acpi_battery_hook *hook) in battery_hook_register() argument
718 INIT_LIST_HEAD(&hook->list); in battery_hook_register()
719 list_add(&hook->list, &battery_hook_list); in battery_hook_register()
727 if (hook->add_battery(battery->bat)) { in battery_hook_register()
[all …]

123456789