linux_dsm_epyc7002/include/uapi/asm-generic
J. Bruce Fields ef12e72a01 locks: fix posix lock range overflow handling
In the 32-bit case fcntl assigns the 64-bit f_pos and i_size to a 32-bit
off_t.

The existing range checks also seem to depend on signed arithmetic
wrapping when it overflows.  In practice maybe that works, but we can be
more careful.  That also allows us to make a more reliable distinction
between -EINVAL and -EOVERFLOW.

Note that in the 32-bit case SEEK_CUR or SEEK_END might allow the caller
to set a lock with starting point no longer representable as a 32-bit
value.  We could return -EOVERFLOW in such cases, but the locks code is
capable of handling such ranges, so we choose to be lenient here.  The
only problem is that subsequent GETLK calls on such a lock will fail
with EOVERFLOW.

While we're here, do some cleanup including consolidating code for the
flock and flock64 cases.

Signed-off-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2014-03-31 08:24:42 -04:00
..
auxvec.h
bitsperlong.h
errno-base.h
errno.h errno.h: remove "NFS" from descriptions in comments 2013-11-13 12:09:12 +09:00
fcntl.h locks: fix posix lock range overflow handling 2014-03-31 08:24:42 -04:00
int-l64.h
int-ll64.h
ioctl.h
ioctls.h
ipcbuf.h uapi, asm-generic: Use __kernel_ulong_t in uapi struct ipc64_perm 2014-01-20 14:44:35 -08:00
Kbuild
Kbuild.asm
kvm_para.h
mman-common.h
mman.h
msgbuf.h uapi: Use __kernel_ulong_t in struct msqid64_ds 2014-01-20 14:45:01 -08:00
param.h
poll.h net: rename low latency sockets functions to busy poll 2013-07-08 19:25:45 -07:00
posix_types.h
resource.h
sembuf.h
setup.h
shmbuf.h uapi: Use __kernel_ulong_t in shmid64_ds/shminfo64/shm_info 2014-01-20 14:45:25 -08:00
shmparam.h
siginfo.h
signal-defs.h
signal.h
socket.h net: introduce SO_BPF_EXTENSIONS 2014-01-18 19:08:58 -08:00
sockios.h
stat.h
statfs.h x86, x32: Use __kernel_long_t for __statfs_word 2013-12-20 16:06:21 -08:00
swab.h
termbits.h
termios.h
types.h asm/types.h: Remove include/asm-generic/int-l64.h 2014-01-23 16:36:53 -08:00
ucontext.h
unistd.h sched: Rename sched.c as sched/core.c in comments and Documentation 2013-06-19 12:58:42 +02:00