twx-linux/include/uapi/linux
Petar Penkov 90e33d4594 tun: enable napi_gro_frags() for TUN/TAP driver
Add a TUN/TAP receive mode that exercises the napi_gro_frags()
interface. This mode is available only in TAP mode, as the interface
expects packets with Ethernet headers.

Furthermore, packets follow the layout of the iovec_iter that was
received. The first iovec is the linear data, and every one after the
first is a fragment. If there are more fragments than the max number,
drop the packet. Additionally, invoke eth_get_headlen() to exercise flow
dissector code and to verify that the header resides in the linear data.

The napi_gro_frags() mode requires setting the IFF_NAPI_FRAGS option.
This is imposed because this mode is intended for testing via tools like
syzkaller and packetdrill, and the increased flexibility it provides can
introduce security vulnerabilities. This flag is accepted only if the
device is in TAP mode and has the IFF_NAPI flag set as well. This is
done because both of these are explicit requirements for correct
operation in this mode.

Signed-off-by: Petar Penkov <peterpenkov96@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Mahesh Bandewar <maheshb@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Cc: davem@davemloft.net
Cc: ppenkov@stanford.edu
Acked-by: Mahesh Bandewar <maheshb@google,com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-09-25 20:16:13 -07:00
..
android ANDROID: binder: Add BINDER_GET_NODE_DEBUG_INFO ioctl 2017-09-01 09:21:12 +02:00
byteorder uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
caif uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
can uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
cifs
dvb media: dvb headers: make checkpatch happier 2017-09-05 07:10:24 -04:00
genwqe
hdlc uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
hsi uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
iio uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
isdn uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
mmc uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
netfilter netfilter: nft_limit: add stateful object type 2017-09-04 13:25:16 +02:00
netfilter_arp uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
netfilter_bridge uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
netfilter_ipv4 uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
netfilter_ipv6 uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
nfsd Kbuild UAPI header export updates for v4.12 2017-05-10 20:45:36 -07:00
raid md: Runtime support for multiple ppls 2017-08-28 07:45:48 -07:00
sched sched/headers/uapi: Fix linux/sched/types.h userspace compilation errors 2017-07-08 11:17:55 +02:00
spi uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
sunrpc uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
tc_act bpf: expose prog id for cls_bpf and act_bpf 2017-06-21 15:14:23 -04:00
tc_ematch uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
usb include: uapi: usb: Introduce USB charger type and state definition 2017-08-15 15:05:00 +03:00
wimax uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
a.out.h uapi/linux/a.out.h: don't use deprecated system-specific predefines. 2017-06-30 13:53:07 -07:00
acct.h
adb.h
adfs_fs.h
affs_hardblocks.h
agpgart.h
aio_abi.h annotate RWF_... flags 2017-08-31 17:32:38 -04:00
am437x-vpfe.h
apm_bios.h
arcfb.h
aspeed-lpc-ctrl.h aspeed-lpc-ctrl: include linux/types.h for uapi header 2017-04-08 17:37:20 +02:00
atalk.h
atm_eni.h
atm_he.h
atm_idt77105.h
atm_nicstar.h
atm_tcp.h
atm_zatm.h
atm.h
atmapi.h
atmarp.h
atmbr2684.h
atmclip.h
atmdev.h
atmioc.h
atmlec.h
atmmpc.h
atmppp.h
atmsap.h
atmsvc.h
audit.h
auto_dev-ioctl.h autofs: make dev ioctl version and ismountpoint user accessible 2017-09-08 18:26:50 -07:00
auto_fs4.h autofs: remove unused AUTOFS_IOC_EXPIRE_DIRECT/INDIRECT 2017-09-08 18:26:50 -07:00
auto_fs.h Fix up over-eager 'wait_queue_t' renaming 2017-07-10 11:40:19 -07:00
auxvec.h
ax25.h
b1lli.h
batman_adv.h
baycom.h
bcache.h uapi: includes linux/types.h before exporting files 2017-05-11 00:18:38 +09:00
bcm933xx_hcs.h
bfs_fs.h
binfmts.h
blkpg.h
blktrace_api.h blktrace: export cgroup info in trace 2017-07-29 09:00:03 -06:00
blkzoned.h
bpf_common.h
bpf_perf_event.h
bpf.h bpf: make error reporting in bpf_warn_invalid_xdp_action more clear 2017-09-08 21:13:09 -07:00
bpqether.h
bsg.h
bt-bmc.h
btrfs_tree.h btrfs_tree.h: fix include from userland 2017-05-11 00:18:38 +09:00
btrfs.h btrfs: Add zstd support 2017-08-15 09:02:09 -07:00
can.h
capability.h Introduce v3 namespaced file capabilities 2017-09-01 14:57:15 -05:00
capi.h
cciss_defs.h
cciss_ioctl.h
cdrom.h
cec-funcs.h media: cec-funcs.h: cec_ops_report_features: set *dev_features to NULL 2017-08-09 09:36:13 -04:00
cec.h media: cec: rename pin events/function 2017-08-20 08:14:03 -04:00
cgroupstats.h
chio.h
cm4000_cs.h
cn_proc.h
coda_psdev.h
coda.h
coff.h
connector.h
const.h
coresight-stm.h
cramfs_fs.h
cryptouser.h uapi: includes linux/types.h before exporting files 2017-05-11 00:18:38 +09:00
cuda.h
cyclades.h
cycx_cfm.h
dcbnl.h
dccp.h
devlink.h devlink: Add IPv6 header for dpipe 2017-08-31 14:42:19 -07:00
dlm_device.h
dlm_netlink.h uapi linux/dlm_netlink.h: include linux/dlmconstants.h 2017-08-07 11:23:09 -05:00
dlm_plock.h
dlm.h
dlmconstants.h
dm-ioctl.h dm ioctl: add a new DM_DEV_ARM_POLL ioctl 2017-06-19 11:03:49 -04:00
dm-log-userspace.h
dma-buf.h
dn.h
dqblk_xfs.h
edd.h
efs_fs_sb.h
elf-em.h avr32: remove support for AVR32 architecture 2017-05-01 09:27:15 +02:00
elf-fdpic.h
elf.h ARC updates for 4.12 2017-05-09 10:10:15 -07:00
elfcore.h
errno.h
errqueue.h sock: add MSG_ZEROCOPY 2017-08-03 21:37:29 -07:00
ethtool.h net: ethtool: Add back transceiver type 2017-09-21 15:20:40 -07:00
eventpoll.h
fadvise.h
falloc.h
fanotify.h
fb.h
fcntl.h fs: add fcntl() interface for setting/getting write life time hints 2017-06-27 12:05:22 -06:00
fd.h
fdreg.h
fib_rules.h
fiemap.h
filter.h
firewire-cdev.h
firewire-constants.h
flat.h
fou.h
fs.h annotate RWF_... flags 2017-08-31 17:32:38 -04:00
fsl_hypervisor.h
fsmap.h fsmap: fix documentation of FMR_OF_LAST 2017-09-01 13:08:26 -07:00
fuse.h
futex.h
gameport.h
gen_stats.h
genetlink.h
gfs2_ondisk.h
gigaset_dev.h
gpio.h
gsmmux.h
gtp.h gtp: rename SGSN netlink attribute 2017-03-25 20:11:19 -07:00
hash_info.h
hdlc.h
hdlcdrv.h
hdreg.h
hid.h
hiddev.h
hidraw.h
hpet.h
hsr_netlink.h
hw_breakpoint.h
hyperv.h
hysdn_if.h
i2c-dev.h
i2c.h
i2o-dev.h
i8k.h
icmp.h
icmpv6.h
if_addr.h
if_addrlabel.h
if_alg.h
if_arcnet.h
if_arp.h net: arp: Add support for raw IP device 2017-08-30 11:41:13 -07:00
if_bonding.h
if_bridge.h
if_cablemodem.h
if_eql.h
if_ether.h net: ether: Add support for multiplexing and aggregation type 2017-08-30 11:41:13 -07:00
if_fc.h
if_fddi.h
if_frad.h
if_hippi.h
if_infiniband.h
if_link.h xdp: add reporting of offload mode 2017-06-23 13:42:20 -04:00
if_ltalk.h
if_macsec.h
if_packet.h packet: add PACKET_FANOUT_FLAG_UNIQUEID to assign new fanout group id. 2017-04-24 12:46:00 -04:00
if_phonet.h
if_plip.h
if_ppp.h
if_pppol2tp.h
if_pppox.h
if_slip.h
if_team.h
if_tun.h tun: enable napi_gro_frags() for TUN/TAP driver 2017-09-25 20:16:13 -07:00
if_tunnel.h gre: introduce native tunnel support for ERSPAN 2017-08-22 14:29:30 -07:00
if_vlan.h
if_x25.h
if.h
ife.h
igmp.h
ila.h
in6.h
in_route.h
in.h
inet_diag.h tcp_diag: report TCP MD5 signing keys and addresses 2017-09-01 18:38:09 -07:00
inotify.h
input-event-codes.h Input: introduce KEY_ASSISTANT 2017-07-02 13:40:25 -07:00
input.h
ioctl.h
ip6_tunnel.h
ip_vs.h
ip.h
ipc.h
ipmi_msgdefs.h
ipmi.h scripts/spelling.txt: add regsiter -> register spelling mistake 2017-05-08 17:15:13 -07:00
ipsec.h
ipv6_route.h ipv6: fib: Provide offload indication using nexthop flags 2017-08-15 17:05:03 -07:00
ipv6.h
ipx.h
irda.h
irqnr.h
isdn_divertif.h
isdn_ppp.h
isdn.h
isdnif.h
iso_fs.h
ivtv.h
ivtvfb.h
ixjuser.h
jffs2.h
joystick.h
Kbuild uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
kcm.h
kcmp.h kcmp: add KCMP_EPOLL_TFD mode to compare epoll target files 2017-07-12 16:26:01 -07:00
kcov.h
kd.h
kdev_t.h
kernel-page-flags.h
kernel.h
kernelcapi.h
kexec.h
keyboard.h
keyctl.h KEYS: DH: add __user annotations to keyctl_kdf_params 2017-06-09 13:29:49 +10:00
kfd_ioctl.h drm/amdkfd: Implement image tiling mode support v2 2017-08-15 23:00:22 -04:00
kvm_para.h
kvm.h KVM: PPC: Book3S HV: Report storage key support to userspace 2017-08-31 12:36:44 +10:00
l2tp.h
libc-compat.h
lightnvm.h lightnvm: allow to init targets on factory mode 2017-04-16 10:06:25 -06:00
limits.h
lirc.h
llc.h
loop.h loop: add ioctl for changing logical block size 2017-08-31 13:51:14 -06:00
lp.h
lwtunnel.h ipv6: sr: define core operations for seg6local lightweight tunnel 2017-08-07 14:16:22 -07:00
magic.h ocfs2: use magic.h 2017-07-06 16:24:30 -07:00
major.h
map_to_7segment.h
matroxfb.h
max2175.h [media] media: i2c: max2175: Add MAX2175 support 2017-06-20 07:02:43 -03:00
mdio.h
media-bus-format.h media: uapi: Add RGB and YUV bus formats for Synopsys HDMI TX Controller 2017-04-03 11:45:08 -04:00
media.h media: drop use of MEDIA_API_VERSION 2017-08-08 06:03:15 -04:00
mei.h
membarrier.h membarrier: Provide expedited private command 2017-08-17 07:28:05 -07:00
memfd.h mm/shmem: add hugetlbfs support to memfd_create() 2017-09-06 17:27:29 -07:00
mempolicy.h mm, mempolicy: simplify rebinding mempolicies when updating cpusets 2017-07-06 16:24:34 -07:00
meye.h
mic_common.h
mic_ioctl.h
mii.h
minix_fs.h
mman.h mm: arch: consolidate mmap hugetlb size encodings 2017-09-06 17:27:28 -07:00
mmtimer.h
module.h
mpls_iptunnel.h
mpls.h
mqueue.h
mroute6.h ip6mr: add netlink notifications on mrt6msg cache reports 2017-06-21 11:22:53 -04:00
mroute.h ipmr: add netlink notifications on igmpmsg cache reports 2017-06-21 11:22:52 -04:00
msdos_fs.h
msg.h
mtio.h
n_r3964.h
nbd-netlink.h nbd: add a status netlink command 2017-04-17 09:58:42 -06:00
nbd.h nbd: add FUA op support 2017-05-30 08:20:25 -06:00
ncp_fs.h
ncp_mount.h
ncp_no.h
ncp.h
ndctl.h libnvdimm: clean up command definitions 2017-08-28 08:33:20 -07:00
neighbour.h net: bridge: Receive notification about successful FDB offload 2017-06-08 14:16:25 -04:00
net_dropmon.h
net_namespace.h
net_tstamp.h net: allow simultaneous SW and HW transmit timestamping 2017-05-21 13:37:32 -04:00
net.h
netconf.h
netdevice.h
netfilter_arp.h
netfilter_bridge.h
netfilter_decnet.h
netfilter_ipv4.h
netfilter_ipv6.h
netfilter.h
netlink_diag.h netlink/diag: report flags for netlink sockets 2017-04-05 07:13:56 -07:00
netlink.h netlink: add NLM_F_NONREC flag for deletion requests 2017-09-04 17:34:54 +02:00
netrom.h
nfc.h
nfs2.h
nfs3.h
nfs4_mount.h
nfs4.h
nfs_fs.h
nfs_idmap.h
nfs_mount.h
nfs.h
nfsacl.h
nilfs2_api.h
nilfs2_ondisk.h
nl80211.h nl80211: Don't verify owner_nlportid on NAN commands 2017-06-30 09:44:17 +03:00
nsfs.h
nubus.h nubus: Add MVC and VSC video card definitions 2017-04-20 09:54:24 +02:00
nvme_ioctl.h
nvram.h
omap3isp.h
omapfb.h
oom.h
openvswitch.h openvswitch: warn about missing first netlink attribute 2017-06-08 15:57:09 -04:00
packet_diag.h
param.h
parport.h
patchkey.h
pci_regs.h Merge branch 'pci/misc' into next 2017-09-07 13:24:16 -05:00
pci.h
pcitest.h misc: Add host side PCI driver for PCI test function device 2017-04-28 10:23:19 -05:00
perf_event.h perf/core, x86: Add PERF_SAMPLE_PHYS_ADDR 2017-08-29 15:09:25 +02:00
personality.h
pfkeyv2.h
pg.h
phantom.h
phonet.h
pkt_cls.h bpf: expose prog id for cls_bpf and act_bpf 2017-06-21 15:14:23 -04:00
pkt_sched.h
pktcdvd.h
pmu.h
poll.h
posix_acl_xattr.h
posix_acl.h
posix_types.h
ppdev.h
ppp_defs.h
ppp-comp.h
ppp-ioctl.h
pps.h drivers/pps: aesthetic tweaks to PPS-related content 2017-09-08 18:26:51 -07:00
pr.h uapi: includes linux/types.h before exporting files 2017-05-11 00:18:38 +09:00
prctl.h
psample.h
psci.h
ptp_clock.h
ptrace.h
qnx4_fs.h
qnxtypes.h
qrtr.h uapi: includes linux/types.h before exporting files 2017-05-11 00:18:38 +09:00
quota.h uapi/linux/quota.h: Do not include linux/errno.h 2017-08-14 11:53:34 +02:00
radeonfb.h
random.h
raw.h
rds.h
reboot.h
reiserfs_fs.h
reiserfs_xattr.h
resource.h
rfkill.h
rio_cm_cdev.h
rio_mport_cdev.h
romfs_fs.h
rose.h
route.h
rpmsg.h
rtc.h
rtnetlink.h net sched actions: add time filter for action dumping 2017-07-30 19:28:08 -07:00
rxrpc.h rxrpc: Move the packet.h include file into net/rxrpc/ 2017-07-21 11:00:20 +01:00
scc.h
sched.h sched/deadline: Make GRUB a task's flag 2017-06-08 10:31:52 +02:00
scif_ioctl.h
screen_info.h
sctp.h sctp: Add peeloff-flags socket option 2017-07-01 15:26:11 -07:00
sdla.h
seccomp.h seccomp: Implement SECCOMP_RET_KILL_PROCESS action 2017-08-14 13:46:50 -07:00
securebits.h
sed-opal.h
seg6_genl.h
seg6_hmac.h
seg6_iptunnel.h ipv6: sr: add support for encapsulation of L2 frames 2017-08-25 17:10:23 -07:00
seg6_local.h ipv6: sr: define core operations for seg6local lightweight tunnel 2017-08-07 14:16:22 -07:00
seg6.h
selinux_netlink.h
sem.h include/linux/sem.h: correctly document sem_ctime 2017-07-12 16:26:01 -07:00
serial_core.h serial: 8250: of: Add new port type for MediaTek BTIF controller on MT7622/23 SoC 2017-08-28 20:51:22 +02:00
serial_reg.h
serial.h serial: uapi: Add support for bus termination 2017-05-18 16:34:55 +02:00
serio.h [media] serio.h: add SERIO_RAINSHADOW_CEC ID 2017-04-10 12:34:01 -03:00
shm.h mm: shm: use new hugetlb size encoding definitions 2017-09-06 17:27:28 -07:00
signal.h
signalfd.h
smc_diag.h smc_diag.h: fix include from userland 2017-05-11 00:18:39 +09:00
smc.h
smiapp.h
snmp.h tcp: Revert "tcp: remove header prediction" 2017-08-30 11:20:09 -07:00
sock_diag.h
socket.h
sockios.h
sonet.h
sonypi.h
sound.h
soundcard.h
stat.h uapi: change the type of struct statx_timestamp.tv_nsec to unsigned 2017-04-26 21:19:05 -04:00
stddef.h
stm.h
string.h
suspend_ioctls.h
swab.h
switchtec_ioctl.h switchtec: Add "running" status flag to fw partition info ioctl 2017-06-27 18:23:14 -05:00
sync_file.h
synclink.h
sysctl.h net: Remove NET_CORE_BUDGET_USECS from sysctl binary interface. 2017-04-21 15:59:52 -04:00
sysinfo.h
target_core_user.h tcmu: perfom device add, del and reconfig synchronously 2017-07-06 23:11:39 -07:00
taskstats.h
tcp_metrics.h
tcp.h tcp_diag: report TCP MD5 signing keys and addresses 2017-09-01 18:38:09 -07:00
tee.h tee: indicate privileged dev in gen_caps 2017-08-04 10:30:27 +02:00
telephony.h
termios.h
thermal.h
time.h mmtimer: Remove the SGI SN2 mmtimer driver 2017-05-26 12:52:19 +02:00
timerfd.h
times.h
timex.h
tiocl.h
tipc_config.h
tipc_netlink.h
tipc.h
tls.h tls: kernel TLS support 2017-06-15 12:12:40 -04:00
toshiba.h
tty_flags.h
tty.h tty: handle the case where we cannot restore a line discipline 2017-06-03 18:43:46 +09:00
types.h
udf_fs_i.h
udp.h
uhid.h
uinput.h
uio.h
uleds.h
ultrasound.h
un.h
unistd.h
unix_diag.h
usbdevice_fs.h USB: add usbfs ioctl to retrieve the connection speed 2017-06-13 10:48:24 +02:00
usbip.h
userfaultfd.h userfaultfd: provide pid in userfault msg - add feat union 2017-09-06 17:27:29 -07:00
userio.h
utime.h
utsname.h
uuid.h uuid: rename uuid types 2017-06-05 16:58:59 +02:00
uvcvideo.h
v4l2-common.h
v4l2-controls.h [media] v4l: ctrls: Add a control for digital gain 2017-06-20 08:14:34 -03:00
v4l2-dv-timings.h
v4l2-mediabus.h
v4l2-subdev.h
veth.h
vfio_ccw.h vfio: ccw: introduce ccw_io_region 2017-03-31 12:55:06 +02:00
vfio.h vfio: ccw: realize VFIO_DEVICE_G(S)ET_IRQ_INFO ioctls 2017-03-31 12:55:09 +02:00
vhost.h
videodev2.h media: v4l: Add packed Bayer raw12 pixel formats 2017-08-26 14:45:24 -04:00
virtio_9p.h
virtio_balloon.h
virtio_blk.h
virtio_config.h
virtio_console.h
virtio_crypto.h
virtio_gpu.h
virtio_ids.h
virtio_input.h
virtio_mmio.h
virtio_net.h
virtio_pci.h Revert "virtio_pci: don't duplicate the msix_enable flag in struct pci_dev" 2017-04-11 00:28:41 +03:00
virtio_ring.h x86/lguest: Remove lguest support 2017-08-24 09:57:28 +02:00
virtio_rng.h
virtio_scsi.h
virtio_types.h
virtio_vsock.h
vm_sockets.h
vsockmon.h VSOCK: Add vsockmon device 2017-04-24 12:35:56 -04:00
vt.h
vtpm_proxy.h tpm: vtpm_proxy: Implement request_locality function. 2017-06-13 22:02:09 +03:00
wait.h
wanrouter.h
watchdog.h
wimax.h
wireless.h
x25.h
xattr.h
xfrm.h net: xfrm: support setting an output mark. 2017-08-11 07:03:00 +02:00
xilinx-v4l2-controls.h
zorro_ids.h
zorro.h