2016-06-10 13:57:19 +00:00
|
|
|
# Copyright 2016 syzkaller project authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
|
|
|
|
2016-08-26 05:09:25 +00:00
|
|
|
include <linux/net.h>
|
2016-06-10 13:57:19 +00:00
|
|
|
include <linux/kcm.h>
|
2016-08-26 05:09:25 +00:00
|
|
|
include <linux/sockios.h>
|
2016-06-10 13:57:19 +00:00
|
|
|
|
2016-08-27 16:27:50 +00:00
|
|
|
resource sock_kcm[sock]
|
2016-06-10 13:57:19 +00:00
|
|
|
|
2016-08-27 16:27:50 +00:00
|
|
|
socket$kcm(domain const[AF_KCM], type flags[kcm_socket_type], proto const[KCMPROTO_CONNECTED]) sock_kcm
|
2017-04-07 15:25:31 +00:00
|
|
|
setsockopt$kcm_KCM_RECV_DISABLE(fd sock_kcm, level const[SOL_KCM], opt const[KCM_RECV_DISABLE], val ptr[in, int32], len len[val])
|
|
|
|
getsockopt$kcm_KCM_RECV_DISABLE(fd sock_kcm, level const[SOL_KCM], opt const[KCM_RECV_DISABLE], val ptr[out, int32], len len[val])
|
2016-08-27 16:27:50 +00:00
|
|
|
sendmsg$kcm(fd sock_kcm, msg ptr[in, send_msghdr], f flags[send_flags])
|
|
|
|
recvmsg$kcm(fd sock_kcm, msg ptr[in, recv_msghdr], f flags[recv_flags])
|
|
|
|
|
2017-04-07 15:15:16 +00:00
|
|
|
ioctl$sock_kcm_SIOCKCMATTACH(fd sock_kcm, cmd const[SIOCKCMATTACH], arg ptr[in, kcm_attach])
|
|
|
|
ioctl$sock_kcm_SIOCKCMUNATTACH(fd sock_kcm, cmd const[SIOCKCMUNATTACH], arg ptr[in, kcm_unattach])
|
|
|
|
ioctl$sock_kcm_SIOCKCMCLONE(fd sock_kcm, cmd const[SIOCKCMCLONE], arg ptr[inout, kcm_clone])
|
2016-06-10 13:57:19 +00:00
|
|
|
|
|
|
|
kcm_socket_type = SOCK_DGRAM, SOCK_SEQPACKET
|
|
|
|
|
|
|
|
kcm_attach {
|
2016-08-27 16:27:50 +00:00
|
|
|
fd sock
|
2016-09-09 18:27:21 +00:00
|
|
|
bpf_fd fd_bpf_prog
|
2016-06-10 13:57:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
kcm_unattach {
|
2016-08-27 16:27:50 +00:00
|
|
|
fd sock
|
2016-06-10 13:57:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
kcm_clone {
|
2016-08-27 16:27:50 +00:00
|
|
|
fd sock
|
2016-06-10 13:57:19 +00:00
|
|
|
}
|