Home
last modified time | relevance | path

Searched refs:skb (Results 1 – 11 of 11) sorted by relevance

/security/selinux/include/
Dnetlabel.h29 void selinux_netlbl_err(struct sk_buff *skb, u16 family, int error,
35 int selinux_netlbl_skbuff_getsid(struct sk_buff *skb,
39 int selinux_netlbl_skbuff_setsid(struct sk_buff *skb,
43 struct sk_buff *skb);
49 struct sk_buff *skb,
65 static inline void selinux_netlbl_err(struct sk_buff *skb, in selinux_netlbl_err() argument
85 static inline int selinux_netlbl_skbuff_getsid(struct sk_buff *skb, in selinux_netlbl_skbuff_getsid() argument
94 static inline int selinux_netlbl_skbuff_setsid(struct sk_buff *skb, in selinux_netlbl_skbuff_setsid() argument
102 struct sk_buff *skb) in selinux_netlbl_sctp_assoc_request() argument
126 struct sk_buff *skb, in selinux_netlbl_sock_rcv_skb() argument
Dxfrm.h39 int selinux_xfrm_sock_rcv_skb(u32 sk_sid, struct sk_buff *skb,
41 int selinux_xfrm_postroute_last(u32 sk_sid, struct sk_buff *skb,
43 int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ckall);
44 int selinux_xfrm_skb_sid(struct sk_buff *skb, u32 *sid);
61 static inline int selinux_xfrm_sock_rcv_skb(u32 sk_sid, struct sk_buff *skb, in selinux_xfrm_sock_rcv_skb() argument
67 static inline int selinux_xfrm_postroute_last(u32 sk_sid, struct sk_buff *skb, in selinux_xfrm_postroute_last() argument
74 static inline int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, in selinux_xfrm_decode_session() argument
85 static inline int selinux_xfrm_skb_sid(struct sk_buff *skb, u32 *sid) in selinux_xfrm_skb_sid() argument
/security/selinux/
Dnetlink.c71 struct sk_buff *skb; in selnl_notify() local
76 skb = nlmsg_new(len, GFP_USER); in selnl_notify()
77 if (!skb) in selnl_notify()
80 tmp = skb->tail; in selnl_notify()
81 nlh = nlmsg_put(skb, 0, 0, msgtype, len, 0); in selnl_notify()
85 nlh->nlmsg_len = skb->tail - tmp; in selnl_notify()
86 NETLINK_CB(skb).dst_group = SELNLGRP_AVC; in selnl_notify()
87 netlink_broadcast(selnl, skb, 0, SELNLGRP_AVC, GFP_USER); in selnl_notify()
92 kfree_skb(skb); in selnl_notify()
Dnetlabel.c41 static int selinux_netlbl_sidlookup_cached(struct sk_buff *skb, in selinux_netlbl_sidlookup_cached() argument
52 netlbl_cache_add(skb, family, secattr); in selinux_netlbl_sidlookup_cached()
141 void selinux_netlbl_err(struct sk_buff *skb, u16 family, int error, int gateway) in selinux_netlbl_err() argument
143 netlbl_skbuff_err(skb, family, error, gateway); in selinux_netlbl_err()
188 int selinux_netlbl_skbuff_getsid(struct sk_buff *skb, in selinux_netlbl_skbuff_getsid() argument
202 rc = netlbl_skbuff_getattr(skb, family, &secattr); in selinux_netlbl_skbuff_getsid()
204 rc = selinux_netlbl_sidlookup_cached(skb, family, in selinux_netlbl_skbuff_getsid()
225 int selinux_netlbl_skbuff_setsid(struct sk_buff *skb, in selinux_netlbl_skbuff_setsid() argument
236 sk = skb_to_full_sk(skb); in selinux_netlbl_skbuff_setsid()
253 rc = netlbl_skbuff_setattr(skb, family, secattr); in selinux_netlbl_skbuff_setsid()
[all …]
Dxfrm.c213 static u32 selinux_xfrm_skb_sid_egress(struct sk_buff *skb) in selinux_xfrm_skb_sid_egress() argument
215 struct dst_entry *dst = skb_dst(skb); in selinux_xfrm_skb_sid_egress()
227 static int selinux_xfrm_skb_sid_ingress(struct sk_buff *skb, in selinux_xfrm_skb_sid_ingress() argument
231 struct sec_path *sp = skb_sec_path(skb); in selinux_xfrm_skb_sid_ingress()
262 int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ckall) in selinux_xfrm_decode_session() argument
264 if (skb == NULL) { in selinux_xfrm_decode_session()
268 return selinux_xfrm_skb_sid_ingress(skb, sid, ckall); in selinux_xfrm_decode_session()
271 int selinux_xfrm_skb_sid(struct sk_buff *skb, u32 *sid) in selinux_xfrm_skb_sid() argument
275 rc = selinux_xfrm_skb_sid_ingress(skb, sid, 0); in selinux_xfrm_skb_sid()
277 *sid = selinux_xfrm_skb_sid_egress(skb); in selinux_xfrm_skb_sid()
[all …]
Dhooks.c4376 static int selinux_parse_skb_ipv4(struct sk_buff *skb, in selinux_parse_skb_ipv4() argument
4382 offset = skb_network_offset(skb); in selinux_parse_skb_ipv4()
4383 ih = skb_header_pointer(skb, offset, sizeof(_iph), &_iph); in selinux_parse_skb_ipv4()
4406 th = skb_header_pointer(skb, offset, sizeof(_tcph), &_tcph); in selinux_parse_skb_ipv4()
4422 uh = skb_header_pointer(skb, offset, sizeof(_udph), &_udph); in selinux_parse_skb_ipv4()
4438 dh = skb_header_pointer(skb, offset, sizeof(_dccph), &_dccph); in selinux_parse_skb_ipv4()
4455 sh = skb_header_pointer(skb, offset, sizeof(_sctph), &_sctph); in selinux_parse_skb_ipv4()
4474 static int selinux_parse_skb_ipv6(struct sk_buff *skb, in selinux_parse_skb_ipv6() argument
4482 offset = skb_network_offset(skb); in selinux_parse_skb_ipv6()
4483 ip6 = skb_header_pointer(skb, offset, sizeof(_ipv6h), &_ipv6h); in selinux_parse_skb_ipv6()
[all …]
/security/smack/
Dsmack_netfilter.c24 struct sk_buff *skb, in smack_ipv6_output() argument
27 struct sock *sk = skb_to_full_sk(skb); in smack_ipv6_output()
34 skb->secmark = skp->smk_secid; in smack_ipv6_output()
42 struct sk_buff *skb, in smack_ipv4_output() argument
45 struct sock *sk = skb_to_full_sk(skb); in smack_ipv4_output()
52 skb->secmark = skp->smk_secid; in smack_ipv4_output()
Dsmack_lsm.c3814 static int smk_skb_to_addr_ipv6(struct sk_buff *skb, struct sockaddr_in6 *sip) in smk_skb_to_addr_ipv6() argument
3828 offset = skb_network_offset(skb); in smk_skb_to_addr_ipv6()
3829 ip6 = skb_header_pointer(skb, offset, sizeof(_ipv6h), &_ipv6h); in smk_skb_to_addr_ipv6()
3836 offset = ipv6_skip_exthdr(skb, offset, &nexthdr, &frag_off); in smk_skb_to_addr_ipv6()
3843 th = skb_header_pointer(skb, offset, sizeof(_tcph), &_tcph); in smk_skb_to_addr_ipv6()
3849 uh = skb_header_pointer(skb, offset, sizeof(_udph), &_udph); in smk_skb_to_addr_ipv6()
3854 dh = skb_header_pointer(skb, offset, sizeof(_dccph), &_dccph); in smk_skb_to_addr_ipv6()
3870 static struct smack_known *smack_from_skb(struct sk_buff *skb) in smack_from_skb() argument
3872 if (skb == NULL || skb->secmark == 0) in smack_from_skb()
3875 return smack_from_secid(skb->secmark); in smack_from_skb()
[all …]
/security/
Dlsm_audit.c40 int ipv4_skb_to_auditdata(struct sk_buff *skb, in ipv4_skb_to_auditdata() argument
46 ih = ip_hdr(skb); in ipv4_skb_to_auditdata()
61 struct tcphdr *th = tcp_hdr(skb); in ipv4_skb_to_auditdata()
70 struct udphdr *uh = udp_hdr(skb); in ipv4_skb_to_auditdata()
79 struct dccp_hdr *dh = dccp_hdr(skb); in ipv4_skb_to_auditdata()
88 struct sctphdr *sh = sctp_hdr(skb); in ipv4_skb_to_auditdata()
109 int ipv6_skb_to_auditdata(struct sk_buff *skb, in ipv6_skb_to_auditdata() argument
117 ip6 = ipv6_hdr(skb); in ipv6_skb_to_auditdata()
124 offset = skb_network_offset(skb); in ipv6_skb_to_auditdata()
127 offset = ipv6_skip_exthdr(skb, offset, &nexthdr, &frag_off); in ipv6_skb_to_auditdata()
[all …]
Dsecurity.c2104 int security_netlink_send(struct sock *sk, struct sk_buff *skb) in security_netlink_send() argument
2106 return call_int_hook(netlink_send, 0, sk, skb); in security_netlink_send()
2287 int security_sock_rcv_skb(struct sock *sk, struct sk_buff *skb) in security_sock_rcv_skb() argument
2289 return call_int_hook(socket_sock_rcv_skb, 0, sk, skb); in security_sock_rcv_skb()
2300 int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid) in security_socket_getpeersec_dgram() argument
2303 skb, secid); in security_socket_getpeersec_dgram()
2343 struct sk_buff *skb, struct request_sock *req) in security_inet_conn_request() argument
2345 return call_int_hook(inet_conn_request, 0, sk, skb, req); in security_inet_conn_request()
2356 struct sk_buff *skb) in security_inet_conn_established() argument
2358 call_void_hook(inet_conn_established, sk, skb); in security_inet_conn_established()
[all …]
/security/apparmor/
Dlsm.c1053 static int apparmor_socket_sock_rcv_skb(struct sock *sk, struct sk_buff *skb) in apparmor_socket_sock_rcv_skb() argument
1057 if (!skb->secmark) in apparmor_socket_sock_rcv_skb()
1061 skb->secmark, sk); in apparmor_socket_sock_rcv_skb()
1132 struct sk_buff *skb, u32 *secid) in apparmor_socket_getpeersec_dgram() argument
1159 static int apparmor_inet_conn_request(const struct sock *sk, struct sk_buff *skb, in apparmor_inet_conn_request() argument
1164 if (!skb->secmark) in apparmor_inet_conn_request()
1168 skb->secmark, sk); in apparmor_inet_conn_request()
1754 struct sk_buff *skb, in apparmor_ip_postroute() argument
1760 if (!skb->secmark) in apparmor_ip_postroute()
1763 sk = skb_to_full_sk(skb); in apparmor_ip_postroute()
[all …]