opnsense-src/sys
Rick Macklem 2e1b32c0e3 Add a vop_stdioctl() that performs a trivial FIOSEEKDATA/FIOSEEKHOLE.
Without this patch, when an application performed lseek(SEEK_DATA/SEEK_HOLE)
on a file in a file system that does not have its own VOP_IOCTL(), the
lseek(2) fails with errno ENOTTY. This didn't seem appropriate, since
ENOTTY is not listed as an error return by either the lseek(2) man page
nor the POSIX draft for lseek(2).
A discussion on freebsd-current@ seemed to indicate that implementing
a trivial algorithm that returns the offset argument for FIOSEEKDATA and
returns the file's size for FIOSEEKHOLE was the preferred fix.
http://docs.FreeBSD.org/cgi/mid.cgi?CAOtMX2iiQdv1+15e1N_r7V6aCx_VqAJCTP1AW+qs3Yg7sPg9wA
The Linux kernel appears to implement this trivial algorithm as well.

This patch adds a vop_stdioctl() that implements this trivial algorithm.
It returns errors consistent with vn_bmap_seekhole() and, as such, will
still return ENOTTY for non-regular files.

I have proposed a separate patch that maps errors not described by the
lseek(2) man page nor POSIX draft to EINVAL. This patch is under separate
review.

Reviewed by:	kib
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D21299
2019-08-19 00:29:05 +00:00
..
amd64 Allocate all per-cpu datastructures in domain correct memory. 2019-08-18 23:44:23 +00:00
arm Revert r351130 2019-08-17 19:06:05 +00:00
arm64 Improve rk_pinctrl driver: 2019-08-18 09:19:33 +00:00
bsm Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
cam Make camcontrol modepage support block descriptors. 2019-08-07 14:45:10 +00:00
cddl zfs_vget: fix vnode reference count leak in error path 2019-08-17 09:23:03 +00:00
compat Change locking requirements for VOP_UNSET_TEXT(). 2019-08-18 20:24:52 +00:00
conf ng_ubt(4): do not attach Intel Wireless 8260/8265 in bootloader mode. 2019-08-18 22:11:42 +00:00
contrib MFV: r351091 2019-08-15 17:43:36 +00:00
crypto armv8crypto: add missing unlock for session (after r336439) 2019-08-08 14:34:53 +00:00
ddb Cache kernel stacks in UMA. This gives us NUMA support, better concurrency, 2019-08-06 23:15:34 +00:00
dev Allocate all per-cpu datastructures in domain correct memory. 2019-08-18 23:44:23 +00:00
dts dtso: allwinner: Add an overlay for H3 i2c0 2019-07-20 17:42:46 +00:00
fs Fix an issue with executing tmpfs binary. 2019-08-18 20:36:11 +00:00
gdb amd64: Protect the kernel text, data, and BSS by setting the RW/NX bits 2018-03-06 14:28:37 +00:00
geom geom_uzip(4), mkuzip(8): Add Zstd image mode 2019-08-13 23:32:56 +00:00
gnu arm: dts: am33xx: Fix the region for uart0 2019-08-07 13:11:53 +00:00
i386 i386: Implement atomic_load_64(9) and atomic_store_64(9). 2019-08-18 15:58:44 +00:00
isa Reapply, with minor tweaks, r338025, from the original commit: 2018-09-26 17:12:14 +00:00
kern Add a vop_stdioctl() that performs a trivial FIOSEEKDATA/FIOSEEKHOLE. 2019-08-19 00:29:05 +00:00
kgssapi Make the warning intervals for deprecated crypto algorithms tunable. 2019-06-11 23:00:55 +00:00
libkern Allow Kernel to link in both legacy libkern/zlib and new sys/contrib/zlib, 2019-08-01 06:35:33 +00:00
mips Move phys_avail definition into MI code. It is consumed in the MI layer and 2019-08-16 00:45:14 +00:00
modules ng_ubt(4): do not attach Intel Wireless 8260/8265 in bootloader mode. 2019-08-18 22:11:42 +00:00
net net: Update SFF-8024 definitions and strings with values from rev 4.6 2019-08-17 00:10:56 +00:00
net80211 Enhance the comment ieee80211_add_channel() to avoid a 2019-06-10 14:31:18 +00:00
netgraph ng_ubt(4): do not attach Intel Wireless 8260/8265 in bootloader mode. 2019-08-18 22:11:42 +00:00
netinet Save ip_ttl value and restore it after checksum calculation. 2019-08-13 12:47:53 +00:00
netinet6 frag6: move public structure into file local space. 2019-08-08 10:59:54 +00:00
netipsec Add missing new line in several log messages. 2019-08-09 08:58:09 +00:00
netpfil Fix rule truncation on external action module unloading. 2019-08-15 13:44:33 +00:00
netsmb Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
nfs Switch RIB and RADIX_NODE_HEAD lock from rwlock(9) to rmlock(9). 2018-06-16 08:26:23 +00:00
nfsclient style: Remove remaining deprecated MALLOC/FREE macros 2018-01-25 22:25:13 +00:00
nfsserver
nlm Use syscall_helper_register() to register syscalls and initialize though 2018-02-10 01:09:22 +00:00
ofed OFED: Fix accidental double-copy of rdma_sdp.h in r351176 2019-08-18 04:19:41 +00:00
opencrypto Allow Kernel to link in both legacy libkern/zlib and new sys/contrib/zlib, 2019-08-01 06:35:33 +00:00
powerpc Move phys_avail definition into MI code. It is consumed in the MI layer and 2019-08-16 00:45:14 +00:00
riscv Move phys_avail definition into MI code. It is consumed in the MI layer and 2019-08-16 00:45:14 +00:00
rpc Avoid relying on header pollution from sys/refcount.h. 2019-07-29 20:26:01 +00:00
security Fix mac_veriexec_parser build after r347938 2019-08-08 16:51:49 +00:00
sparc64 Move phys_avail definition into MI code. It is consumed in the MI layer and 2019-08-16 00:45:14 +00:00
sys Fix an issue with executing tmpfs binary. 2019-08-18 20:36:11 +00:00
teken Attempt to complete fixing programmable function keys for syscons. 2019-02-20 02:14:41 +00:00
tests Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
tools Add SDIO support. 2019-06-08 16:26:56 +00:00
ufs Clarify comment that describes how the FS_METACKHASH is managed. 2019-08-13 20:56:44 +00:00
vm Allocate amd64's page array using pages and page directory pages from the 2019-08-18 23:07:56 +00:00
x86 Move phys_avail definition into MI code. It is consumed in the MI layer and 2019-08-16 00:45:14 +00:00
xdr
xen xen: introduce a new way to setup event channel upcall 2019-01-30 11:34:52 +00:00
Makefile