#
eb96f2eb |
| 01-Nov-2021 |
thorpej <thorpej@NetBSD.org> |
Use "stack_t" instead of "struct sigaltstack", as the former is the newer standardized name. NFC.
|
#
d50c96bb |
| 07-Sep-2021 |
riastradh <riastradh@NetBSD.org> |
sys/compat: Memset zero before copyout.
Just in case of uninitialized padding which would lead to kernel stack disclosure. If the compiler can prove the memset redundant then it can optimize it awa
sys/compat: Memset zero before copyout.
Just in case of uninitialized padding which would lead to kernel stack disclosure. If the compiler can prove the memset redundant then it can optimize it away; otherwise better safe than sorry.
show more ...
|
#
4e7ce818 |
| 19-Jan-2021 |
simonb <simonb@NetBSD.org> |
KNF consistency: No parentheses are needed around the return value.
|
#
4b058eb6 |
| 07-Mar-2020 |
pgoyette <pgoyette@NetBSD.org> |
Properly mark netbsd32_compat_43 syscalls that are directly implemented by calling their compat_43 equivalents. With these changes, and with built-in versions of COMPAT_NETBSD32, COMPAT_NOMID, and C
Properly mark netbsd32_compat_43 syscalls that are directly implemented by calling their compat_43 equivalents. With these changes, and with built-in versions of COMPAT_NETBSD32, COMPAT_NOMID, and COMPAT_09, I can now run a netbsd-0.9 statically linked i386 (32-bit) version of /bin/ls on a 9.99.x amd64 host!
Addresses PR kern/55047 but more changes coming to handle non-built-in modules.
XXX pullup-9
show more ...
|
#
24013cff |
| 01-Jan-2020 |
maxv <maxv@NetBSD.org> |
Fix sizeof mismatch in copyin. This leads to a user-triggerable stack overflow. On my test build at least, by luck, the compiler orders the variables in a way that the overflow hits only local struct
Fix sizeof mismatch in copyin. This leads to a user-triggerable stack overflow. On my test build at least, by luck, the compiler orders the variables in a way that the overflow hits only local structures which haven't yet been initialized and used, so the overflow is harmless.
Very easily seeable with kASan - just invoke the syscall from a 32bit binary.
show more ...
|
#
9120752c |
| 23-Aug-2019 |
maxv <maxv@NetBSD.org> |
Fix info leak.
|
#
cc17ee2e |
| 27-Jan-2019 |
pgoyette <pgoyette@NetBSD.org> |
Merge the [pgoyette-compat] branch
|
#
05ad0199 |
| 03-May-2018 |
christos <christos@NetBSD.org> |
Fix COMPAT_NETBSD32 cmsg handling:
1. alignment was wrong for > 1 message 2. macros were doing incorrect pointer comparisons, fortunately ending the iteration early after the fists cmsg instead o
Fix COMPAT_NETBSD32 cmsg handling:
1. alignment was wrong for > 1 message 2. macros were doing incorrect pointer comparisons, fortunately ending the iteration early after the fists cmsg instead of crashing. 3. don't output 32 bit ktrace records for cmsg. 32 bit programs running under emulation on 64 bit systems should produce 64 bit ktrace records so that the native ktrace can handle the records; remove extra arguments that are now not needed (the 32 bit msghdr). 4. output the correct type for cmsg trace records. 5. output all the cmsg records in traces instead of just the first one.
Welcome to 8.99.15 because of the argument removal.
XXX: Really all the code should be changed to use the CMSG_{FIRST,NXT}HDR macros...
show more ...
|
#
cd81eded |
| 16-Mar-2018 |
christos <christos@NetBSD.org> |
PR/53103: Timo Buhrmester: linux emulation of sendto(2) broken
The sockargs refactoring broke it, because sockargs only works with a user address. Added an argument to sockargs to indicate where the
PR/53103: Timo Buhrmester: linux emulation of sendto(2) broken
The sockargs refactoring broke it, because sockargs only works with a user address. Added an argument to sockargs to indicate where the address is coming from. Welcome to 8.99.14.
show more ...
|
#
19422264 |
| 13-Sep-2016 |
martin <martin@NetBSD.org> |
Make the ktrace record written by do_sys_sendmsg/do_sys_recvmsg overridable by the caller. Use this in compat_netbsd32 to log the 32bit version, so the 32bit userland kdump is happy.
|
#
9c5268bc |
| 23-Apr-2010 |
joerg <joerg@NetBSD.org> |
Fix compilation.
|
#
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 ...
|
#
b5ae97a4 |
| 30-Jan-2009 |
njoly <njoly@NetBSD.org> |
Cleanup. Kill a few netbsd32_caddr_t in syscalls argument types.
|
#
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.
|
#
769c7344 |
| 26-Jan-2008 |
dsl <dsl@NetBSD.org> |
Remove some dubious casting of the address of integer variables that can only be 'not invalid' if the sizes match - when it is unnecessary.
|
#
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 ...
|
#
f2af9174 |
| 04-Dec-2007 |
dsl <dsl@NetBSD.org> |
Remove all the __P
|
#
53e0243f |
| 30-Jun-2007 |
dsl <dsl@NetBSD.org> |
Changes to sompat socket function to avoid the dreaded stackgap.
|
#
879c84a7 |
| 16-Jun-2007 |
dsl <dsl@NetBSD.org> |
The code to directly call sigaction1() and sigaltstack1() is much shorter than the mess required to call the compat_43_xxx functions.
|
#
671dc779 |
| 03-Jun-2007 |
dsl <dsl@NetBSD.org> |
sendmsg() shouldn't modify the 'msg' parameter, and recvmsg() doesn't have to modify the 'iov' array - it isn't updated.
|
#
906b9af2 |
| 30-Apr-2007 |
dsl <dsl@NetBSD.org> |
Rework compat stat() and statvfs() code so that it no longer uses the stackgap.
|
#
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).
|