summaryrefslogtreecommitdiff
path: root/sys/compat/sunos32
AgeCommit message (Collapse)Author
2023-06-20compat_sunos32: Memset zero before copyout.riastradh
Unclear if this can leak anything but let's be on the safe side. XXX pullup-8 XXX pullup-9 XXX pullup-10
2021-09-07sys/compat: Memset zero before copyout.riastradh
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.
2020-06-24remove special handling for symbolic links for COMPAT_43 lstat, it'sjdolecek
not necessary; this removes the only places in kernel which did namei LOOKUP with LOCKPARENT fixes diagnostic KASSERT() in namei() code Reported-by: syzbot+628382ecf1438e53d08d@syzkaller.appspotmail.com
2019-12-12Rather than keeping a separate mutex, condvar, and pserialize for eachpgoyette
module hook, we can share a common set of synchronization structures. This cuts the amount of cacheline_aligned data for these structures by 50%. Note that we still have a per-hook localcount, since we need to count individual references. As discussed with riastradh@ Welcome to 9.99.22 !
2019-10-26use strlcpy() for the uts conversion, makes the code simpler and more readable.christos
2019-09-23make this compile againchristos
2019-09-17Add a boolean argument to indicate if we have a path/true (execve) or anchristos
fd/false (fexecve). This is needed to differentiate between them because NULL/-1 can be readily passed from userland.
2019-09-17pass new missing fd argument to execve1().mrg
fixes sparc64 build.
2019-04-23 KNF. No functional change.msaitoh
2019-03-01Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as brieflypgoyette
discussed on irc. NFCI intended. Ride the earlier kernel bump - it;s getting crowded.
2019-02-05The sunos and sunos32 modules require compat_09, not compat (thepgoyette
latter no longer exists). Should fix "missing prerequisite" errors seen during qemu boot of sparc64's MODULAR kernel.
2019-01-27Merge the [pgoyette-compat] branchpgoyette
2018-09-03Rename min/max -> uimin/uimax for better honesty.riastradh
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!)
2018-08-10Regenpgoyette
2018-08-10Allow syscall_establish() to install new syscalls when the existingpgoyette
entry-point is either sys_nomodule or sys_nosys. Update the makesyscalls.sh script to create a const array of bits to allow syscall_disestablish() to properly restore the original entry-point. Update all the initializers of struct emul to initialize the pointer to the bit array struct emul. XXX Regen of all files created by makesyscalls.sh will come soon, XXX followed by a kernel version bump (since struct emul is being XXX modified). This commit should address PR kern/45781 and also removes the need for the work-around for that PR in file sys/arch/usermode/modules/syscallemu/syscallemu.c
2018-05-06Remove an element from struct emul: e_tracesigkamil
e_tracesig used to be implemented for Darwin compat. Nowadays the Darwin compatiblity layer is gone and there are no other users. This functionality isn't used where it shall be used in the existing codebase. If we want to emulate debugging interfaces in compat layers we would need to implement that from scratch anyway. We would need to be bug compatible with other OSes too. Proposed on tech-kern@. Welcome to NetBSD 8.99.16! Sponsored by <The NetBSD Foundation>
2018-01-09remove struct emul's e_fault.maya
It used to be used by COMPAT_IRIX for the purpose of overriding uvm_fault (only implemented in MIPS), now removed. Ride 8.99.12 version bump.
2018-01-06Revert vadvise(2) removalkamil
This system call was used in legacy Lisp code, that was inherited to modern age and still compiled against supported compat layers (e.g. in clisp, oaklisp, Franz Lisp). It used to instruct the kernel about paging policy (G/C aware, flush etc). Newly compiled code (assuming that it will detect vadvise()) will use the libc stub for vadvise(). The headers for this interface are gone. vadvise(2) could be marked as COMPAT_80, but as long as we support ultrix, sunos or aout68k ABI, don't bother with this. Requested by <mrg>
2017-12-19compat/sunos32: Drop SYS_vadvisekamil
The (o)vadvise syscall is dummy since the beginning of NetBSD. Sponsored by <The NetBSD Foundation>
2017-12-19compat/sunos32: Drop SYS_sbrkkamil
sbrk - change data segment size This syscall is dummy since the inception of the project. Sponsored by <The NetBSD Foundation>
2017-12-19compat sunos32: Drop the sstk(2) syscallkamil
sstk(2) has never been implemented by the NetBSD kernel. Sponsored by <The NetBSD Foundation>
2017-07-28Fail, don't panic, on bad dirents from file system.riastradh
Controllable via puffs from userland. From Ilja Van Sprundel.
2017-05-10regenriastradh
2017-01-16regenchristos
2017-01-13regenchristos
2016-02-28Add missing newline character in error messagekhorben
This is related to kern/50469.
2015-12-11PR 50517 bad switchmlelstv
2015-12-08Replace DIOCGPART -> DIOCGPARTINFO which returns the data needed instead ofchristos
pointers.
2015-10-23Change do_sys_mount() so that it only takes as argument the type of themaxv
drive instead of its associated vfsops. Makes it more friendly, and allows compat binaries to autoload VFS modules if needed. sent on tech-kern@, ok christos@
2015-10-18Make sure we have space for the aout header.maxv
2015-09-26rename sun ioctlschristos
2015-09-24regenchristos
2015-03-07regenchristos
2014-11-17Define compat modules (but without dependencies yet).uebayasi
2014-09-05Fix previous. There is no uap.nakayama
2014-09-05Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to getmatt
a correctly typed pointer.
2014-03-07c99 initializers for struct execswchristos
2014-01-14use new bsd.syscall.mkchristos
2013-11-07Regen for dup/dup2/dup3 argument types fix.njoly
2013-11-07Fix dup/dup2/dup3 argument types (u_int -> int).njoly
2013-09-19exec modules need to be of the exec kindchristos
2012-02-19Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!rmind
Approved by core@.
2012-02-12Change old-style function defintions to C89 prototypes.matt
Approved by releng.
2010-11-19Introduce struct pathbuf. This is an abstraction to hold a pathnamedholland
and the metadata required to interpret it. Callers of namei must now create a pathbuf and pass it to NDINIT (instead of a string and a uio_seg), then destroy the pathbuf after the namei session is complete. Update all namei call sites accordingly. Add a pathbuf(9) man page and update namei(9). The pathbuf interface also now appears in a couple of related additional places that were passing string/uio_seg pairs that were later fed into NDINIT. Update other call sites accordingly.
2010-07-07many changes for COMPAT_LINUX:chs
- update the linux syscall table for each platform. - support new-style (NPTL) linux pthreads on all platforms. clone() with CLONE_THREAD uses 1 process with many LWPs instead of separate processes. - move the contents of sys__lwp_setprivate() into a new lwp_setprivate() and use that everywhere. - update linux_release[] and linux32_release[] to "2.6.18". - adjust placement of emul fork/exec/exit hooks as needed and adjust other emul code to match. - convert all struct emul definitions to use named initializers. - change the pid allocator to allow multiple pids to refer to the same proc. - remove a few fields from struct proc that are no longer needed. - disable the non-functional "vdso" code in linux32/amd64, glibc works fine without it. - fix a race in the futex code where we could miss a wakeup after a requeue operation. - redo futex locking to be a little more efficient.
2010-06-24Clean up vnode lock operations pass 2:hannken
VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument. Welcome to 5.99.32. Discussed on tech-kern.
2010-03-03Remove nfssvc non-emulations I missed yesterday.pooka
2010-03-03Add prototype and forward declarations to make the empty nfs stub compile.martin
2010-03-03When implementing "read directory", when there are too many empty entrieshe
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.
2010-03-02regen:pooka
- remove nfssvc / fs_nfs.h / #ifdef NFS - make getfh unconditional