#
4e7ce818 |
| 19-Jan-2021 |
simonb <simonb@NetBSD.org> |
KNF consistency: No parentheses are needed around the return value.
|
#
5b069175 |
| 31-Jan-2020 |
maxv <maxv@NetBSD.org> |
Fix copyout overflows in fhstat, found by the LGTM bot. Not a big problem since this syscall is privileged.
|
#
02443708 |
| 17-Jan-2020 |
ad <ad@NetBSD.org> |
VFS_VGET(), VFS_ROOT(), VFS_FHTOVP(): give them a "int lktype" argument, to allow us to get shared locks (or no lock) on the returned vnode. Matches FreeBSD.
|
#
cc17ee2e |
| 27-Jan-2019 |
pgoyette <pgoyette@NetBSD.org> |
Merge the [pgoyette-compat] branch
|
#
a8a5c538 |
| 03-Sep-2018 |
riastradh <riastradh@NetBSD.org> |
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 n
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!)
show more ...
|
#
33eaa8ef |
| 05-Dec-2014 |
maxv <maxv@NetBSD.org> |
User-triggerable kmem_alloc(0).
Ok martin@ christos@
User
|
#
d00df284 |
| 23-Apr-2010 |
rmind <rmind@NetBSD.org> |
Replace M_IOV and some malloc(9)s with kmem(9), and while there: - Fix invalid free (M_TEMP vs M_IOV) in do_sys_recvmsg(), spotted by jakllsch@. Also, same fix in osf1_sys_sendmsg_xopen(). - Fix at
Replace M_IOV and some malloc(9)s with kmem(9), and while there: - Fix invalid free (M_TEMP vs M_IOV) in do_sys_recvmsg(), spotted by jakllsch@. Also, same fix in osf1_sys_sendmsg_xopen(). - Fix attempt to free non-allocated memory in error path in netbsd32___getfh30(). - Plug a memory leak in compat_43_netbsd32_orecvmsg().
show more ...
|
#
3e5b27ff |
| 26-Jan-2009 |
njoly <njoly@NetBSD.org> |
Make all fstat(2) compat syscalls consistently use do_sys_fstat(), instead of fd_getfile()/fd_putfile() dance.
ok by christos.
|
#
461a86f9 |
| 11-Jan-2009 |
christos <christos@NetBSD.org> |
merge christos-time_t
|
#
92ce8c6a |
| 19-Nov-2008 |
ad <ad@NetBSD.org> |
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
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
show more ...
|
#
a00bd89d |
| 24-Jun-2008 |
ad <ad@NetBSD.org> |
Replace references to getsock/getvnode.
|
#
c2b95373 |
| 29-May-2008 |
mrg <mrg@NetBSD.org> |
remove clause #3 from my license where there are no other copyright holders involved.
|
#
a9ca7a37 |
| 21-Mar-2008 |
ad <ad@NetBSD.org> |
Catch up with descriptor handling changes. See kern_descrip.c revision 1.173 for details.
|
#
7e2790cf |
| 20-Dec-2007 |
dsl <dsl@NetBSD.org> |
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
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.
show more ...
|
#
28bae79b |
| 08-Dec-2007 |
dsl <dsl@NetBSD.org> |
ANSIfy most of the function definitions in sys/compat (but not ndis). All by the magic of sed ...
|
#
0df00dcf |
| 30-Apr-2007 |
dsl <dsl@NetBSD.org> |
Split the statvfs functions so that the 'work' is done to a kernel buffer which can either be copied directly to userspace, or converted then copied. Saves replicating a lot of code in the compat fun
Split the statvfs functions so that the 'work' is done to a kernel buffer which can either be copied directly to userspace, or converted then copied. Saves replicating a lot of code in the compat functions (esp. for getvfsstat) at a cast of an extra function call in the non-emulated case - which is unlikely to be measurable given the other costs of the actions involved (even on vax). Remove dofhstat() and dofhstatvfs() (and the last caller). Remove some redundant stackgap_init() calls.
show more ...
|
#
b8fbaf8c |
| 22-Apr-2007 |
dsl <dsl@NetBSD.org> |
Change the way that emulations locate files within the emulation root to avoid having to allocate space in the 'stackgap' - which is very LWP unfriendly. The additional code for non-emulation nam
Change the way that emulations locate files within the emulation root to avoid having to allocate space in the 'stackgap' - which is very LWP unfriendly. The additional code for non-emulation namei() is trivial, the reduction for the emulations is massive. The vnode for a processes emulation root is saved in the cwdi structure during process exec. If the emulation root the TRYEMULROOT flag are set, namei() will do an initial search for absolute pathnames in the emulation root, if that fails it will retry from the normal root. ".." at the emulation root will always go to the real root, even in the middle of paths and when expanding symlinks. Absolute symlinks found using absolute paths in the emulation root will be relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links inside the emulation root don't need changing). If the root of the emulation would be returned (for an emulation lookup), then the real root is returned instead (matching the behaviour of emul_lookup, but being a cheap comparison here) so that programs that scan "../.." looking for the root dircetory don't loop forever. The target for symbolic links is no longer mangled (it used to get the CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended). CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding TRYEMULROOT to the flags to NDINIT(). A lot of the emulation system call stubs could now be deleted.
show more ...
|
#
d364d308 |
| 18-Mar-2007 |
dsl <dsl@NetBSD.org> |
Change all the NETBSD32PTR64(SCARG(uap, xxx))) to SCARG_P32(uap, xxx).
|
#
893faeae |
| 10-Mar-2007 |
dsl <dsl@NetBSD.org> |
Update all the compat stuff to not use the 'stackgap' for processing sys_stat() and friends, instead use do_sys_stat() and do_sys_fstat() that write the answer into a kernel buffer (on stack) that ca
Update all the compat stuff to not use the 'stackgap' for processing sys_stat() and friends, instead use do_sys_stat() and do_sys_fstat() that write the answer into a kernel buffer (on stack) that can be converted to the correct form and written the userspace. I've test compiled a few kernels, and tested i386 netbsd1.6 ls. Given I think I've fixed some bugs, it might be 50-50 with new ones.
show more ...
|
#
53524e44 |
| 04-Mar-2007 |
christos <christos@NetBSD.org> |
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
|
#
b07ec3fc |
| 09-Feb-2007 |
ad <ad@NetBSD.org> |
Merge newlock2 to head.
|
#
68f43d80 |
| 14-Nov-2006 |
elad <elad@NetBSD.org> |
Clean some KAUTH_GENERIC_ISSUSER usage in compat code.
|
#
1277ee63 |
| 09-Nov-2006 |
cube <cube@NetBSD.org> |
- Make better use of COMPAT_XX type in syscalls.master - Remove useless (thanks to COMPAT_XX behaviour) #ifdefs in syscalls.master - Make netbsd32_compat_43.c compiled per COMPAT_LINUX32 because th
- Make better use of COMPAT_XX type in syscalls.master - Remove useless (thanks to COMPAT_XX behaviour) #ifdefs in syscalls.master - Make netbsd32_compat_43.c compiled per COMPAT_LINUX32 because the latter needs stuff from it.
Fixes Perry's PR#34951.
show more ...
|
#
4977b4bb |
| 04-Aug-2006 |
yamt <yamt@NetBSD.org> |
some filehandle syscall related changes.
- remove the support of variable-sized filehandle from compat version of syscalls. (strictly speaking, it breaks abi. i don't think it's a problem beca
some filehandle syscall related changes.
- remove the support of variable-sized filehandle from compat version of syscalls. (strictly speaking, it breaks abi. i don't think it's a problem because this feature is short-lived and there are no affected in-tree filesystems.) - unify vfs_copyinfh_alloc and vfs_copyinfh_alloc_size. - vfs_copyinfh_alloc_size: check fhsize strictly. - reduce code duplication between compat and current syscalls.
show more ...
|
#
b4cb63a6 |
| 31-Jul-2006 |
martin <martin@NetBSD.org> |
Make filehandles opaque to userland
|