Home
last modified time | relevance | path

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

12345678910

/linux/tools/testing/selftests/bpf/prog_tests/
H A Dtc_bpf.c26 static int test_tc_bpf_basic(const struct bpf_tc_hook *hook, int fd) in test_tc_bpf_basic() argument
37 ret = bpf_tc_attach(hook, &opts); in test_tc_bpf_basic()
48 ret = bpf_tc_attach(hook, &opts); in test_tc_bpf_basic()
53 ret = bpf_tc_query(hook, &opts); in test_tc_bpf_basic()
64 ret = bpf_tc_detach(hook, &opts); in test_tc_bpf_basic()
69 static int test_tc_bpf_api(struct bpf_tc_hook *hook, int fd) in test_tc_bpf_api() argument
209 ret = bpf_tc_detach(hook, NULL); in test_tc_bpf_api()
213 ret = bpf_tc_detach(hook, &opts_hpr); in test_tc_bpf_api()
217 ret = bpf_tc_detach(hook, &opts_hpf); in test_tc_bpf_api()
221 ret = bpf_tc_detach(hook, &opts_hpi); in test_tc_bpf_api()
[all …]
H A Dxfrm_info.c72 static int attach_tc_prog(struct bpf_tc_hook *hook, int igr_fd, int egr_fd) in attach_tc_prog() argument
80 ret = bpf_tc_hook_create(hook); in attach_tc_prog()
85 hook->attach_point = BPF_TC_INGRESS; in attach_tc_prog()
86 ret = bpf_tc_attach(hook, &opts1); in attach_tc_prog()
88 bpf_tc_hook_destroy(hook); in attach_tc_prog()
94 hook->attach_point = BPF_TC_EGRESS; in attach_tc_prog()
95 ret = bpf_tc_attach(hook, &opts2); in attach_tc_prog()
97 bpf_tc_hook_destroy(hook); in attach_tc_prog()
/linux/net/netfilter/
H A Dnf_bpf_link.c38 const struct nf_defrag_hook *hook; in get_proto_defrag_hook() local
43 hook = rcu_dereference(*ptr_global_hook); in get_proto_defrag_hook()
44 if (!hook) { in get_proto_defrag_hook()
51 hook = rcu_dereference(*ptr_global_hook); in get_proto_defrag_hook()
54 if (hook && try_module_get(hook->owner)) { in get_proto_defrag_hook()
56 hook = rcu_pointer_handoff(hook); in get_proto_defrag_hook()
58 WARN_ONCE(!hook, "%s has bad registration", mod); in get_proto_defrag_hook()
59 hook = ERR_PTR(-ENOENT); in get_proto_defrag_hook()
63 if (!IS_ERR(hook)) { in get_proto_defrag_hook()
64 err = hook->enable(link->net); in get_proto_defrag_hook()
[all …]
H A 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 …]
H A Dnfnetlink_hook.c58 u8 hook; member
176 ret = snprintf(sym, sizeof(sym), "%ps", ops->hook); in nfnl_hook_dump_one()
241 nfnl_hook_entries_head(u8 pf, unsigned int hook, struct net *net, const char *dev) in nfnl_hook_entries_head() argument
250 if (hook >= ARRAY_SIZE(net->nf.hooks_ipv4)) in nfnl_hook_entries_head()
252 hook_head = rcu_dereference(net->nf.hooks_ipv4[hook]); in nfnl_hook_entries_head()
255 if (hook >= ARRAY_SIZE(net->nf.hooks_ipv6)) in nfnl_hook_entries_head()
257 hook_head = rcu_dereference(net->nf.hooks_ipv6[hook]); in nfnl_hook_entries_head()
261 if (hook >= ARRAY_SIZE(net->nf.hooks_arp)) in nfnl_hook_entries_head()
263 hook_head = rcu_dereference(net->nf.hooks_arp[hook]); in nfnl_hook_entries_head()
268 if (hook >= ARRAY_SIZE(net->nf.hooks_bridge)) in nfnl_hook_entries_head()
[all …]
H A 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()
H A 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 …]
H A Dnf_tables_offload.c224 struct nft_hook *hook; in nft_chain_offload_support() local
229 list_for_each_entry(hook, &basechain->hook_list, list) { in nft_chain_offload_support()
230 if (hook->ops.pf != NFPROTO_NETDEV || in nft_chain_offload_support()
231 hook->ops.hooknum != NF_NETDEV_INGRESS) in nft_chain_offload_support()
234 dev = hook->ops.dev; in nft_chain_offload_support()
459 struct nft_hook *hook; in nft_flow_block_chain() local
462 list_for_each_entry(hook, &basechain->hook_list, list) { in nft_flow_block_chain()
463 dev = hook->ops.dev; in nft_flow_block_chain()
480 list_for_each_entry(hook, &basechain->hook_list, list) { in nft_flow_block_chain()
484 dev = hook->ops.dev; in nft_flow_block_chain()
[all …]
/linux/include/linux/
H A Dnetfilter.h79 u8 hook; member
99 nf_hookfn *hook; member
110 nf_hookfn *hook; member
154 return entry->hook(entry->priv, skb, state); in nf_hook_entry_hookfn()
158 unsigned int hook, in nf_hook_state_init() argument
166 p->hook = hook; in nf_hook_state_init()
223 static inline int nf_hook(u_int8_t pf, unsigned int hook, struct net *net, in nf_hook() argument
233 __builtin_constant_p(hook) && in nf_hook()
234 !static_key_false(&nf_hooks_needed[pf][hook])) in nf_hook()
241 hook_head = rcu_dereference(net->nf.hooks_ipv4[hook]); in nf_hook()
[all …]
H A Dpci.h2174 void (*hook)(struct pci_dev *dev);
2191 class_shift, hook) \
2192 __ADDRESSABLE(hook) \
2197 ".long " #hook " - . \n" \
2207 class_shift, hook, stub) \
2211 hook(dev); \
2217 class_shift, hook, stub) \
2219 class_shift, hook) argument
2223 class_shift, hook) \
2225 class_shift, hook, __UNIQUE_I argument
2170 void (*hook)(struct pci_dev *dev); global() member
2187 ___DECLARE_PCI_FIXUP_SECTION(sec,name,vendor,device,class,class_shift,hook) global() argument
2203 __DECLARE_PCI_FIXUP_SECTION(sec,name,vendor,device,class,class_shift,hook,stub) global() argument
2213 __DECLARE_PCI_FIXUP_SECTION(sec,name,vendor,device,class,class_shift,hook,stub) global() argument
2232 DECLARE_PCI_FIXUP_CLASS_EARLY(vendor,device,class,class_shift,hook) global() argument
2236 DECLARE_PCI_FIXUP_CLASS_HEADER(vendor,device,class,class_shift,hook) global() argument
2240 DECLARE_PCI_FIXUP_CLASS_FINAL(vendor,device,class,class_shift,hook) global() argument
2244 DECLARE_PCI_FIXUP_CLASS_ENABLE(vendor,device,class,class_shift,hook) global() argument
2248 DECLARE_PCI_FIXUP_CLASS_RESUME(vendor,device,class,class_shift,hook) global() argument
2252 DECLARE_PCI_FIXUP_CLASS_RESUME_EARLY(vendor,device,class,class_shift,hook) global() argument
2256 DECLARE_PCI_FIXUP_CLASS_SUSPEND(vendor,device,class,class_shift,hook) global() argument
2260 DECLARE_PCI_FIXUP_CLASS_SUSPEND_LATE(vendor,device,class,class_shift,hook) global() argument
2264 DECLARE_PCI_FIXUP_EARLY(vendor,device,hook) global() argument
2267 DECLARE_PCI_FIXUP_HEADER(vendor,device,hook) global() argument
2270 DECLARE_PCI_FIXUP_FINAL(vendor,device,hook) global() argument
2273 DECLARE_PCI_FIXUP_ENABLE(vendor,device,hook) global() argument
2276 DECLARE_PCI_FIXUP_RESUME(vendor,device,hook) global() argument
2279 DECLARE_PCI_FIXUP_RESUME_EARLY(vendor,device,hook) global() argument
2282 DECLARE_PCI_FIXUP_SUSPEND(vendor,device,hook) global() argument
2285 DECLARE_PCI_FIXUP_SUSPEND_LATE(vendor,device,hook) global() argument
[all...]
/linux/net/ipv4/netfilter/
H A 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()
H A 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
246 oth = nf_reject_ip_tcphdr_get(oldskb, &_oth, hook); in nf_send_reset()
250 if ((hook == NF_INET_PRE_ROUTING || hook == NF_INET_INGRESS) && in nf_send_reset()
315 void nf_send_unreach(struct sk_buff *skb_in, int code, int hook) in nf_send_unreach() argument
[all …]
/linux/tools/lib/bpf/
H A Dnetlink.c542 static int attach_point_to_config(struct bpf_tc_hook *hook, in attach_point_to_config() argument
545 switch (OPTS_GET(hook, attach_point, 0)) { in attach_point_to_config()
549 if (OPTS_GET(hook, parent, 0)) in attach_point_to_config()
582 static int tc_qdisc_modify(struct bpf_tc_hook *hook, int cmd, int flags) in tc_qdisc_modify() argument
588 ret = attach_point_to_config(hook, &config); in tc_qdisc_modify()
597 req.tc.tcm_ifindex = OPTS_GET(hook, ifindex, 0); in tc_qdisc_modify()
606 static int tc_qdisc_create_excl(struct bpf_tc_hook *hook) in tc_qdisc_create_excl() argument
608 return tc_qdisc_modify(hook, RTM_NEWQDISC, NLM_F_CREATE | NLM_F_EXCL); in tc_qdisc_create_excl()
611 static int tc_qdisc_delete(struct bpf_tc_hook *hook) in tc_qdisc_delete() argument
613 return tc_qdisc_modify(hook, RTM_DELQDISC, 0); in tc_qdisc_delete()
[all …]
/linux/fs/xfs/
H A Dxfs_hooks.h37 typedef int (*xfs_hook_fn_t)(struct xfs_hook *hook, unsigned long action,
41 int xfs_hooks_add(struct xfs_hooks *chain, struct xfs_hook *hook);
42 void xfs_hooks_del(struct xfs_hooks *chain, struct xfs_hook *hook);
46 static inline void xfs_hook_setup(struct xfs_hook *hook, notifier_fn_t fn) in xfs_hook_setup() argument
48 hook->nb.notifier_call = fn; in xfs_hook_setup()
49 hook->nb.priority = 0; in xfs_hook_setup()
H A Dxfs_hooks.c27 struct xfs_hook *hook) in xfs_hooks_add() argument
29 ASSERT(hook->nb.notifier_call != NULL); in xfs_hooks_add()
32 return blocking_notifier_chain_register(&chain->head, &hook->nb); in xfs_hooks_add()
39 struct xfs_hook *hook) in xfs_hooks_del() argument
41 blocking_notifier_chain_unregister(&chain->head, &hook->nb); in xfs_hooks_del()
/linux/security/integrity/ima/
H A Dima.h302 #define __ima_hooks(hook) \ argument
303 hook(NONE, none) \
304 hook(FILE_CHECK, file) \
305 hook(MMAP_CHECK, mmap) \
306 hook(MMAP_CHECK_REQPROT, mmap_reqprot) \
307 hook(BPRM_CHECK, bprm) \
308 hook(CREDS_CHECK, creds) \
309 hook(POST_SETATTR, post_setattr) \
310 hook(MODULE_CHECK, module) \
311 hook(FIRMWARE_CHECK, firmware) \
[all …]
/linux/include/acpi/
H A Dbattery.h16 int (*add_battery)(struct power_supply *battery, struct acpi_battery_hook *hook);
17 int (*remove_battery)(struct power_supply *battery, struct acpi_battery_hook *hook);
21 void battery_hook_register(struct acpi_battery_hook *hook);
22 void battery_hook_unregister(struct acpi_battery_hook *hook);
23 int devm_battery_hook_register(struct device *dev, struct acpi_battery_hook *hook);
/linux/include/net/netfilter/ipv4/
H A 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/drivers/gpu/drm/i915/display/
H A Dintel_quirks.c85 void (*hook)(struct intel_display *display); member
94 void (*hook)(struct intel_dp *intel_dp); member
105 void (*hook)(struct intel_display *display); member
143 .hook = quirk_invert_brightness,
165 .hook = quirk_no_pps_backlight_power_hook,
241 .hook = quirk_fw_sync_len,
259 q->hook(display); in intel_init_quirks()
263 intel_dmi_quirks[i].hook(display); in intel_init_quirks()
286 q->hook(intel_dp); in intel_init_dpcd_quirks()
/linux/net/ipv6/netfilter/
H A 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()
269 int hook) in nf_send_reset6() argument
285 otcph = nf_reject_ip6_tcphdr_get(oldskb, &_otcph, &otcplen, hook); in nf_send_reset6()
[all …]
/linux/net/bridge/netfilter/
H A 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/drivers/acpi/
H A Dbattery.c706 static void battery_hook_unregister_unlocked(struct acpi_battery_hook *hook) in battery_hook_unregister_unlocked() argument
715 if (!hook->remove_battery(battery->bat, hook)) in battery_hook_unregister_unlocked()
718 list_del_init(&hook->list); in battery_hook_unregister_unlocked()
720 pr_info("extension unregistered: %s\n", hook->name); in battery_hook_unregister_unlocked()
723 void battery_hook_unregister(struct acpi_battery_hook *hook) in battery_hook_unregister() argument
731 if (!list_empty(&hook->list)) in battery_hook_unregister()
732 battery_hook_unregister_unlocked(hook); in battery_hook_unregister()
738 void battery_hook_register(struct acpi_battery_hook *hook) in battery_hook_register() argument
743 list_add(&hook->list, &battery_hook_list); in battery_hook_register()
751 if (hook->add_battery(battery->bat, hook)) { in battery_hook_register()
[all …]
/linux/tools/testing/selftests/net/netfilter/
H A Dnft_queue.sh95 type filter hook prerouting priority $prio; policy accept;
99 type filter hook input priority $prio; policy accept;
103 type filter hook forward priority $prio; policy accept;
108 type filter hook output priority $prio; policy accept;
114 type filter hook postrouting priority $prio; policy accept;
127 type filter hook prerouting priority $prio; policy accept;
131 type filter hook input priority $prio; policy accept;
135 type filter hook forward priority $prio; policy accept;
139 type filter hook output priority $prio; policy accept;
143 type filter hook postrouting priority $prio; policy accept;
[all …]
/linux/include/net/netfilter/ipv6/
H A Dnf_reject.h11 int hook);
14 unsigned int *otcplen, int hook);
25 int hook);
29 int hook, u8 code);
/linux/arch/csky/kernel/
H A 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()

12345678910