summaryrefslogtreecommitdiff
path: root/sys/compat/sunos
AgeCommit message (Collapse)Author
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-11Regen after -r1.82 of compat_sunos syscalls.master last September.dholland
(Apparently forgotten.) "Treat valsize as unsigned"
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-10-04replace memcpy() with src bounds overflow with single char write.mrg
2019-09-23make this compile again.christos
2019-09-23Treat valsize as unsignedchristos
2019-09-23Add missing breakchristos
2019-07-03Stack buffers mustn't escape their scope. PR 54326 from David Bindermandholland
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-12compat_sunos depends upon compat_09. fixes:mrg
[ 1.8785495] WARNING: module error: built-in module compat_sunos can't find builtin dependency `compat_09' [ 1.8785495] WARNING: module error: built-in module compat_sunos prerequisite compat_09 failed, error 2
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-12-19Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,maxv
but also as discussed several times in the past.
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/sunos: Drop SYS_vadvisekamil
The (o)vadvise syscall is dummy since the beginning of NetBSD. Sponsored by <The NetBSD Foundation>
2017-12-19compat/sunos: 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 sunos: 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-10-08Uninitialized var, found by mootja; not tested, but obvious enoughmaxv
2015-12-12Redo previous. zero check before modulo.nakayama
2015-12-11d_secpercyl is gone and we use the value from disklabel anyway.mlelstv
2015-12-11PR 50518 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-09-06More on PR 41200: headers that declare ioctls should include sys/ioccom.h.dholland
This covers (I think) all the MI headers outside of external/ (and dist/).
2015-03-07regenchristos
2015-03-07fix typochristos
2014-11-17Define compat modules (but without dependencies yet).uebayasi
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@.
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.