History log of /src/sys/compat/linux32/common/linux32_dirent.c |
Revision | | Date | Author | Comments |
1.20 |
| 23-Aug-2019 |
maxv | Fix info leaks.
|
1.19 |
| 03-Sep-2018 |
riastradh | branches: 1.19.4; Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended.
HOWEVER! Some subsystems have
#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation.
To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it.
I have left a handful of bootloaders that are too annoying to compile-test, and some dead code:
cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4))
It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them.
Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
|
1.18 |
| 28-Jul-2017 |
riastradh | branches: 1.18.2; 1.18.4; Fail, don't panic, on bad dirents from file system.
Controllable via puffs from userland.
From Ilja Van Sprundel.
|
1.17 |
| 28-Jan-2017 |
christos | branches: 1.17.6; avoid the shadow
|
1.16 |
| 28-Jan-2017 |
christos | we have space for one more.
|
1.15 |
| 28-Jan-2017 |
christos | fix size computation
|
1.14 |
| 13-Jan-2017 |
christos | branches: 1.14.2; convert strcpy to a bounded copy to avoid compiler warnings, although the reclen test prevents overflow.
|
1.13 |
| 14-Oct-2011 |
hannken | branches: 1.13.8; 1.13.12; 1.13.14; 1.13.22; 1.13.28; 1.13.30; 1.13.32; 1.13.34; 1.13.38; Change the vnode locking protocol of VOP_GETATTR() to request at least a shared lock. Make all calls outside of file systems respect it.
The calls from file systems need review.
No objections from tech-kern.
|
1.12 |
| 11-Sep-2010 |
chs | recent versions of linux (which we now claim to be) supply a BSD-style d_type value in getdents() results, after the d_name field. make our emulation do the same. fixes part of PR 43695.
|
1.11 |
| 24-Jun-2010 |
hannken | Clean up vnode lock operations pass 2:
VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.
Welcome to 5.99.32.
Discussed on tech-kern.
|
1.10 |
| 03-Mar-2010 |
he | branches: 1.10.2; When implementing "read directory", when there are too many empty entries in a row, and we need to try to read the next block, and have passed a non-NULL cookie pointer to VOP_READDIR, ensure that we free the cookie buffer before re-doing VOP_READDIR, so that we don't leak memory. This fix is similar to nfs_serv.c revisions 1.115 + 1.124.
This should fix the long-standing problem observed by e.g. using Linux- emulated programs to take backup of servers, which is one of the problems which were reported in PR#42661.
Thanks to pooka@ for the hints for traversing the VOP* layer.
|
1.9 |
| 22-Jul-2009 |
njoly | branches: 1.9.2; Make compat linux/linux32 getdents(2) fail with ENOTDIR instead of EINVAL when file descriptor does not refer to a directory.
|
1.8 |
| 29-Dec-2008 |
njoly | branches: 1.8.2; s/syscallcarg/syscallarg/ in comments.
|
1.7 |
| 19-Nov-2008 |
ad | Make the emulations, exec formats, coredump, NFS, and the NFS server into modules. By and large this commit:
- shuffles header files and ifdefs - splits code out where necessary to be modular - adds module glue for each of the components - adds/replaces hooks for things that can be installed at runtime
|
1.6 |
| 04-Sep-2008 |
njoly | branches: 1.6.2; 1.6.4; 1.6.8; Make linux32 getdents(2) do its own job instead of calling the corresponding compat linux function, where struct dirent members types differs.
|
1.5 |
| 26-Dec-2007 |
njoly | branches: 1.5.6; 1.5.10; 1.5.12; 1.5.16; Add readdir syscall.
|
1.4 |
| 20-Dec-2007 |
dsl | Convert all the system call entry points from: int foo(struct lwp *l, void *v, register_t *retval) to: int foo(struct lwp *l, const struct foo_args *uap, register_t *retval) Fixup compat code to not write into 'uap' and (in some cases) to actually pass a correctly formatted 'uap' structure with the right name to the next routine. A few 'compat' routines that just call standard ones have been deleted. All the 'compat' code compiles (along with the kernels required to test build it). 98% done by automated scripts.
|
1.3 |
| 08-Dec-2007 |
dsl | branches: 1.3.4; ANSIfy most of the function definitions in sys/compat (but not ndis). All by the magic of sed ...
|
1.2 |
| 09-Feb-2007 |
ad | branches: 1.2.18; 1.2.20; 1.2.26; 1.2.28; Merge newlock2 to head.
|
1.1 |
| 09-Feb-2006 |
manu | branches: 1.1.2; 1.1.10; 1.1.16; 1.1.20; 1.1.22; Add initial (but unfinished) COMPAT_LINUX32 for amd64. This is good enough so that the i386 license manager part of amd64 version of Fluent works.
While I'm here, add SysV IPC to COMPAT_LINUX/amd64
|
1.1.22.2 |
| 09-Sep-2006 |
rpaulo | sync with head
|
1.1.22.1 |
| 09-Feb-2006 |
rpaulo | file linux32_dirent.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:46:03 +0000
|
1.1.20.1 |
| 30-Jan-2007 |
ad | Remove support for SA. Ok core@.
|
1.1.16.4 |
| 21-Jan-2008 |
yamt | sync with head
|
1.1.16.3 |
| 26-Feb-2007 |
yamt | sync with head.
|
1.1.16.2 |
| 21-Jun-2006 |
yamt | sync with head.
|
1.1.16.1 |
| 09-Feb-2006 |
yamt | file linux32_dirent.c was added on branch yamt-lazymbuf on 2006-06-21 14:59:27 +0000
|
1.1.10.2 |
| 22-Apr-2006 |
simonb | Sync with head.
|
1.1.10.1 |
| 09-Feb-2006 |
simonb | file linux32_dirent.c was added on branch simonb-timecounters on 2006-04-22 11:38:14 +0000
|
1.1.2.2 |
| 18-Feb-2006 |
yamt | sync with head.
|
1.1.2.1 |
| 09-Feb-2006 |
yamt | file linux32_dirent.c was added on branch yamt-uio_vmspace on 2006-02-18 15:39:02 +0000
|
1.2.28.1 |
| 26-Dec-2007 |
ad | Sync with head.
|
1.2.26.1 |
| 18-Feb-2008 |
mjf | Sync with HEAD.
|
1.2.20.1 |
| 09-Jan-2008 |
matt | sync with HEAD
|
1.2.18.1 |
| 09-Dec-2007 |
jmcneill | Sync with HEAD.
|
1.3.4.1 |
| 02-Jan-2008 |
bouyer | Sync with HEAD
|
1.5.16.2 |
| 13-Dec-2008 |
haad | Update haad-dm branch to haad-dm-base2.
|
1.5.16.1 |
| 19-Oct-2008 |
haad | Sync with HEAD.
|
1.5.12.3 |
| 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
1.5.12.2 |
| 14-May-2008 |
wrstuden | Per discussion with ad, remove most of the #include <sys/sa.h> lines as they were including sa.h just for the type(s) needed for syscallargs.h.
Instead, create a new file, sys/satypes.h, which contains just the types needed for syscallargs.h. Yes, there's only one now, but that may change and it's probably more likely to change if it'd be difficult to handle. :-)
Per discussion with matt at n dot o, add an include of satypes.h to sigtypes.h. Upcall handlers are kinda signal handlers, and signalling is the header file that's already included for syscallargs.h that closest matches SA.
This shaves about 3000 lines off of the diff of the branch relative to the base. That also represents about 18% of the total before this checkin.
I think this reduction is very good thing.
|
1.5.12.1 |
| 10-May-2008 |
wrstuden | Initial checkin of re-adding SA. Everything except kern_sa.c compiles in GENERIC for i386. This is still a work-in-progress, but this checkin covers most of the mechanical work (changing signalling to be able to accomidate SA's process-wide signalling and re-adding includes of sys/sa.h and savar.h). Subsequent changes will be much more interesting.
Also, kern_sa.c has received partial cleanup. There's still more to do, though.
|
1.5.10.5 |
| 09-Oct-2010 |
yamt | sync with head
|
1.5.10.4 |
| 11-Aug-2010 |
yamt | sync with head.
|
1.5.10.3 |
| 11-Mar-2010 |
yamt | sync with head
|
1.5.10.2 |
| 19-Aug-2009 |
yamt | sync with head.
|
1.5.10.1 |
| 04-May-2009 |
yamt | sync with head.
|
1.5.6.2 |
| 17-Jan-2009 |
mjf | Sync with HEAD.
|
1.5.6.1 |
| 28-Sep-2008 |
mjf | Sync with HEAD.
|
1.6.8.1 |
| 21-Apr-2010 |
matt | sync to netbsd-5
|
1.6.4.1 |
| 17-Mar-2010 |
snj | Pull up following revision(s) (requested by he in ticket #1323): sys/compat/common/vfs_syscalls_30.c: revision 1.31 sys/compat/ibcs2/ibcs2_misc.c: revision 1.110 sys/compat/irix/irix_dirent.c: revision 1.24 sys/compat/linux/common/linux_file64.c: revision 1.50 sys/compat/linux/common/linux_misc.c: revision 1.214 sys/compat/linux32/common/linux32_dirent.c: revision 1.10 sys/compat/sunos/sunos_misc.c: revision 1.166 sys/compat/sunos32/sunos32_misc.c: revision 1.69 sys/compat/svr4/svr4_misc.c: revision 1.149 sys/compat/svr4_32/svr4_32_misc.c: revision 1.68 When implementing "read directory", when there are too many empty entries in a row, and we need to try to read the next block, and have passed a non-NULL cookie pointer to VOP_READDIR, ensure that we free the cookie buffer before re-doing VOP_READDIR, so that we don't leak memory. This fix is similar to nfs_serv.c revisions 1.115 + 1.124. This should fix the long-standing problem observed by e.g. using Linux- emulated programs to take backup of servers, which is one of the problems which were reported in PR#42661. Thanks to pooka@ for the hints for traversing the VOP* layer.
|
1.6.2.1 |
| 19-Jan-2009 |
skrll | Sync with HEAD.
|
1.8.2.1 |
| 23-Jul-2009 |
jym | Sync with HEAD.
|
1.9.2.3 |
| 22-Oct-2010 |
uebayasi | Sync with HEAD (-D20101022).
|
1.9.2.2 |
| 17-Aug-2010 |
uebayasi | Sync with HEAD.
|
1.9.2.1 |
| 30-Apr-2010 |
uebayasi | Sync with HEAD.
|
1.10.2.2 |
| 05-Mar-2011 |
rmind | sync with head
|
1.10.2.1 |
| 03-Jul-2010 |
rmind | sync with head
|
1.13.38.2 |
| 21-Jan-2020 |
martin | Pull up the following, requested by christos in ticket #1720:
sys/compat/common/kern_sig_43.c 1.36 sys/compat/linux/arch/amd64/linux_machdep.c 1.59 sys/compat/linux/common/linux_fcntl.h 1.18 sys/compat/linux/common/linux_file64.c 1.62 sys/compat/linux/common/linux_ipc.c 1.57 sys/compat/linux/common/linux_misc.c 1.243 sys/compat/linux/common/linux_signal.c 1.81 sys/compat/linux/common/linux_socket.c 1.149 (patch) sys/compat/linux/common/linux_socket.h 1.24 sys/compat/linux/common/linux_statfs.h 1.7 sys/compat/linux/common/linux_termios.c 1.38 sys/compat/linux/common/linux_termios.h 1.22 sys/compat/linux32/common/linux32_dirent.c 1.20 sys/compat/linux32/common/linux32_ioctl.c 1.14 sys/compat/linux32/common/linux32_misc.c 1.27 sys/compat/linux32/common/linux32_signal.c 1.20 sys/compat/linux32/common/linux32_sysinfo.c 1.8 sys/compat/linux32/common/linux32_termios.c 1.15 sys/compat/linux32/common/linux32_utsname.c 1.10 sys/compat/netbsd32/netbsd32_compat_20.c 1.39 sys/compat/netbsd32/netbsd32_compat_43.c 1.59 sys/compat/netbsd32/netbsd32_compat_50.c 1.44 sys/compat/ossaudio/ossaudio.c 1.75 sys/kern/sysv_shm.c 1.138 sys/miscfs/procfs/procfs_linux.c 1.75 (patch) sys/sys/shm.h 1.54 (patch)
Fix various info leaks, out of bound access, usage of uninitialized values and direct access to userland variables from kernel space and memory leaks in system calls implemented for the compatibility subsystems.
|
1.13.38.1 |
| 12-Aug-2017 |
snj | Pull up following revision(s) (requested by mrg in ticket #1479): sys/compat/common/vfs_syscalls_12.c: revision 1.34 sys/rump/kern/lib/libsys_sunos/rump_sunos_compat.c: revision 1.2 sys/compat/svr4_32/svr4_32_misc.c: revision 1.78 sys/compat/sunos32/sunos32_misc.c: revision 1.78 sys/compat/linux/common/linux_misc.c: revision 1.239 sys/compat/osf1/osf1_file.c: revision 1.44 sys/compat/common/vfs_syscalls_43.c: revision 1.60 sys/compat/svr4/svr4_misc.c: revision 1.158 sys/compat/ibcs2/ibcs2_misc.c: revision 1.114 sys/compat/linux/common/linux_file64.c: revision 1.59 sys/compat/linux32/common/linux32_dirent.c: revision 1.18 sys/compat/sunos/sunos_misc.c: revision 1.171 Fail, don't panic, on bad dirents from file system. Controllable via puffs from userland. From Ilja Van Sprundel.
|
1.13.34.1 |
| 20-Mar-2017 |
pgoyette | Sync with HEAD
|
1.13.32.1 |
| 12-Aug-2017 |
snj | Pull up following revision(s) (requested by mrg in ticket #1479): sys/compat/common/vfs_syscalls_12.c: revision 1.34 sys/rump/kern/lib/libsys_sunos/rump_sunos_compat.c: revision 1.2 sys/compat/svr4_32/svr4_32_misc.c: revision 1.78 sys/compat/sunos32/sunos32_misc.c: revision 1.78 sys/compat/linux/common/linux_misc.c: revision 1.239 sys/compat/osf1/osf1_file.c: revision 1.44 sys/compat/common/vfs_syscalls_43.c: revision 1.60 sys/compat/svr4/svr4_misc.c: revision 1.158 sys/compat/ibcs2/ibcs2_misc.c: revision 1.114 sys/compat/linux/common/linux_file64.c: revision 1.59 sys/compat/linux32/common/linux32_dirent.c: revision 1.18 sys/compat/sunos/sunos_misc.c: revision 1.171 Fail, don't panic, on bad dirents from file system. Controllable via puffs from userland. From Ilja Van Sprundel.
|
1.13.30.2 |
| 28-Aug-2017 |
skrll | Sync with HEAD
|
1.13.30.1 |
| 05-Feb-2017 |
skrll | Sync with HEAD
|
1.13.28.2 |
| 21-Jan-2020 |
martin | Pull up the following, requested by christos in ticket #1720:
sys/compat/common/kern_sig_43.c 1.36 sys/compat/linux/arch/amd64/linux_machdep.c 1.59 sys/compat/linux/common/linux_fcntl.h 1.18 sys/compat/linux/common/linux_file64.c 1.62 sys/compat/linux/common/linux_ipc.c 1.57 sys/compat/linux/common/linux_misc.c 1.243 sys/compat/linux/common/linux_signal.c 1.81 sys/compat/linux/common/linux_socket.c 1.149 (patch) sys/compat/linux/common/linux_socket.h 1.24 sys/compat/linux/common/linux_statfs.h 1.7 sys/compat/linux/common/linux_termios.c 1.38 sys/compat/linux/common/linux_termios.h 1.22 sys/compat/linux32/common/linux32_dirent.c 1.20 sys/compat/linux32/common/linux32_ioctl.c 1.14 sys/compat/linux32/common/linux32_misc.c 1.27 sys/compat/linux32/common/linux32_signal.c 1.20 sys/compat/linux32/common/linux32_sysinfo.c 1.8 sys/compat/linux32/common/linux32_termios.c 1.15 sys/compat/linux32/common/linux32_utsname.c 1.10 sys/compat/netbsd32/netbsd32_compat_20.c 1.39 sys/compat/netbsd32/netbsd32_compat_43.c 1.59 sys/compat/netbsd32/netbsd32_compat_50.c 1.44 sys/compat/ossaudio/ossaudio.c 1.75 sys/kern/sysv_shm.c 1.138 sys/miscfs/procfs/procfs_linux.c 1.75 (patch) sys/sys/shm.h 1.54 (patch)
Fix various info leaks, out of bound access, usage of uninitialized values and direct access to userland variables from kernel space and memory leaks in system calls implemented for the compatibility subsystems.
|
1.13.28.1 |
| 12-Aug-2017 |
snj | Pull up following revision(s) (requested by mrg in ticket #1479): sys/compat/common/vfs_syscalls_12.c: revision 1.34 sys/rump/kern/lib/libsys_sunos/rump_sunos_compat.c: revision 1.2 sys/compat/svr4_32/svr4_32_misc.c: revision 1.78 sys/compat/sunos32/sunos32_misc.c: revision 1.78 sys/compat/linux/common/linux_misc.c: revision 1.239 sys/compat/osf1/osf1_file.c: revision 1.44 sys/compat/common/vfs_syscalls_43.c: revision 1.60 sys/compat/svr4/svr4_misc.c: revision 1.158 sys/compat/ibcs2/ibcs2_misc.c: revision 1.114 sys/compat/linux/common/linux_file64.c: revision 1.59 sys/compat/linux32/common/linux32_dirent.c: revision 1.18 sys/compat/sunos/sunos_misc.c: revision 1.171 Fail, don't panic, on bad dirents from file system. Controllable via puffs from userland. From Ilja Van Sprundel.
|
1.13.22.1 |
| 19-Aug-2017 |
snj | Pull up following revision(s) (requested by mrg in ticket #1483): sys/compat/common/vfs_syscalls_12.c: revision 1.34 sys/compat/svr4_32/svr4_32_misc.c: revision 1.78 sys/compat/sunos32/sunos32_misc.c: revision 1.78 sys/compat/linux/common/linux_misc.c: revision 1.239 sys/compat/osf1/osf1_file.c: revision 1.44 sys/compat/common/vfs_syscalls_43.c: revision 1.60 sys/compat/svr4/svr4_misc.c: revision 1.158 sys/compat/ibcs2/ibcs2_misc.c: revision 1.114 sys/compat/linux/common/linux_file64.c: revision 1.59 sys/compat/linux32/common/linux32_dirent.c: revision 1.18 sys/compat/sunos/sunos_misc.c: revision 1.171 Fail, don't panic, on bad dirents from file system. Controllable via puffs from userland. From Ilja Van Sprundel.
|
1.13.14.1 |
| 19-Aug-2017 |
snj | Pull up following revision(s) (requested by mrg in ticket #1483): sys/compat/common/vfs_syscalls_12.c: revision 1.34 sys/compat/svr4_32/svr4_32_misc.c: revision 1.78 sys/compat/sunos32/sunos32_misc.c: revision 1.78 sys/compat/linux/common/linux_misc.c: revision 1.239 sys/compat/osf1/osf1_file.c: revision 1.44 sys/compat/common/vfs_syscalls_43.c: revision 1.60 sys/compat/svr4/svr4_misc.c: revision 1.158 sys/compat/ibcs2/ibcs2_misc.c: revision 1.114 sys/compat/linux/common/linux_file64.c: revision 1.59 sys/compat/linux32/common/linux32_dirent.c: revision 1.18 sys/compat/sunos/sunos_misc.c: revision 1.171 Fail, don't panic, on bad dirents from file system. Controllable via puffs from userland. From Ilja Van Sprundel.
|
1.13.12.1 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.13.8.1 |
| 19-Aug-2017 |
snj | Pull up following revision(s) (requested by mrg in ticket #1483): sys/compat/common/vfs_syscalls_12.c: revision 1.34 sys/compat/svr4_32/svr4_32_misc.c: revision 1.78 sys/compat/sunos32/sunos32_misc.c: revision 1.78 sys/compat/linux/common/linux_misc.c: revision 1.239 sys/compat/osf1/osf1_file.c: revision 1.44 sys/compat/common/vfs_syscalls_43.c: revision 1.60 sys/compat/svr4/svr4_misc.c: revision 1.158 sys/compat/ibcs2/ibcs2_misc.c: revision 1.114 sys/compat/linux/common/linux_file64.c: revision 1.59 sys/compat/linux32/common/linux32_dirent.c: revision 1.18 sys/compat/sunos/sunos_misc.c: revision 1.171 Fail, don't panic, on bad dirents from file system. Controllable via puffs from userland. From Ilja Van Sprundel.
|
1.14.2.1 |
| 21-Apr-2017 |
bouyer | Sync with HEAD
|
1.17.6.2 |
| 21-Jan-2020 |
martin | Pull up the following, requested by christos in ticket #1487:
sys/compat/common/kern_sig_43.c 1.36 sys/compat/linux/arch/amd64/linux_machdep.c 1.59 sys/compat/linux/common/linux_fcntl.h 1.18 sys/compat/linux/common/linux_file64.c 1.62 sys/compat/linux/common/linux_ipc.c 1.57 sys/compat/linux/common/linux_misc.c 1.243 sys/compat/linux/common/linux_signal.c 1.81 sys/compat/linux/common/linux_socket.c 1.149 sys/compat/linux/common/linux_socket.h 1.24 sys/compat/linux/common/linux_statfs.h 1.7 sys/compat/linux/common/linux_termios.c 1.38 sys/compat/linux/common/linux_termios.h 1.22 sys/compat/linux32/common/linux32_dirent.c 1.20 sys/compat/linux32/common/linux32_ioctl.c 1.14 sys/compat/linux32/common/linux32_misc.c 1.27 sys/compat/linux32/common/linux32_signal.c 1.20 sys/compat/linux32/common/linux32_sysinfo.c 1.8 sys/compat/linux32/common/linux32_termios.c 1.15 sys/compat/linux32/common/linux32_utsname.c 1.10 sys/compat/netbsd32/netbsd32_compat_20.c 1.39 sys/compat/netbsd32/netbsd32_compat_43.c 1.59 sys/compat/netbsd32/netbsd32_compat_50.c 1.44 sys/compat/ossaudio/ossaudio.c 1.75 sys/kern/sysv_shm.c 1.138 sys/miscfs/procfs/procfs_linux.c 1.75 (patch) sys/sys/shm.h 1.54
Fix various info leaks, out of bound access, usage of uninitialized values and direct access to userland variables from kernel space and memory leaks in system calls implemented for the compatibility subsystems.
|
1.17.6.1 |
| 09-Aug-2017 |
snj | Pull up following revision(s) (requested by spz in ticket #193): sys/compat/common/vfs_syscalls_12.c: revision 1.34 sys/rump/kern/lib/libsys_sunos/rump_sunos_compat.c: revision 1.2 sys/compat/svr4_32/svr4_32_misc.c: revision 1.78 sys/compat/sunos32/sunos32_misc.c: revision 1.78 sys/compat/linux/common/linux_misc.c: revision 1.239 sys/compat/osf1/osf1_file.c: revision 1.44 sys/compat/common/vfs_syscalls_43.c: revision 1.60 sys/compat/svr4/svr4_misc.c: revision 1.158 sys/compat/ibcs2/ibcs2_misc.c: revision 1.114 sys/compat/linux/common/linux_file64.c: revision 1.59 sys/compat/linux32/common/linux32_dirent.c: revision 1.18 sys/compat/sunos/sunos_misc.c: revision 1.171 Fail, don't panic, on bad dirents from file system. Controllable via puffs from userland. From Ilja Van Sprundel.
|
1.18.4.2 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|
1.18.4.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.18.2.1 |
| 06-Sep-2018 |
pgoyette | Sync with HEAD
Resolve a couple of conflicts (result of the uimin/uimax changes)
|
1.19.4.1 |
| 13-Sep-2019 |
martin | Pull up following revision(s) (requested by maxv in ticket #194):
sys/compat/linux/common/linux_socket.c: revision 1.146 sys/compat/linux/common/linux_socket.c: revision 1.147 sys/compat/linux/common/linux_socket.c: revision 1.148 sys/compat/linux/common/linux_socket.c: revision 1.149 sys/compat/linux/arch/amd64/linux_machdep.c: revision 1.59 sys/compat/linux32/common/linux32_sysinfo.c: revision 1.8 sys/kern/sysv_shm.c: revision 1.138 sys/compat/linux/common/linux_file64.c: revision 1.61 sys/compat/linux/common/linux_file64.c: revision 1.62 sys/compat/netbsd32/netbsd32_compat_43.c: revision 1.58 sys/compat/linux32/common/linux32_dirent.c: revision 1.20 sys/compat/linux32/common/linux32_utsname.c: revision 1.10 sys/compat/linux/common/linux_termios.h: revision 1.22 sys/compat/linux32/common/linux32_termios.c: revision 1.15 sys/compat/linux32/common/linux32_misc.c: revision 1.27 sys/compat/linux32/common/linux32_ioctl.c: revision 1.14 sys/compat/linux/common/linux_statfs.h: revision 1.7 sys/compat/linux/common/linux_ipc.c: revision 1.57 sys/compat/linux/common/linux_fcntl.h: revision 1.18 sys/compat/linux/common/linux_socket.h: revision 1.24 sys/sys/shm.h: revision 1.54 sys/compat/ossaudio/ossaudio.c: revision 1.75 sys/compat/linux32/common/linux32_signal.c: revision 1.20 sys/miscfs/procfs/procfs_linux.c: revision 1.75 sys/compat/linux/common/linux_signal.c: revision 1.81 sys/compat/linux/common/linux_termios.c: revision 1.38 sys/compat/linux/common/linux_misc.c: revision 1.241 sys/compat/linux/common/linux_misc.c: revision 1.242 sys/compat/linux/common/linux_misc.c: revision 1.243 sys/compat/linux/common/linux_misc.c: revision 1.244
Fix info leaks.
Fix stupid bugs in linux_sys_shmctl(): the index could be out of bound (page fault) and there was no proper locking. Maybe we should just remove LINUX_SHM_STAT, like compat_linux32.
Remove printf.
When dealing with an unknown value, set -1, to prevent (harmless) uninitialized accesses later.
Add a default case, don't call sys_ioctl() with an uninitialized 'com' argument.
Fix error handling, returns an errno, not -1.
Put the printf under DEBUG_LINUX.
Hum, don't forget the 'pid' argument, otherwise we're not gonna go very far.
Don't read data from userland directly. This simply does not work on any recent x86 CPU (thanks to SMAP) and all architectures that forbid direct access to userland from the kernel. But I guess no one noticed because no one ever uses compat_linux, right?
Hum, don't pass an mbuf to realloc(). Inspired from copyin32_msg_control().
Fix memory leak.
I don't see the point in having this useless printf, but add a '\n' to it, so that it at least displays useless stuff correctly.
Hum, remove incorrect assignment. Userland could have passed a smaller namelen, and the uninitialized bytes from sb_data were being used later in the network stack.
|