Commit Graph

303 Commits

Author SHA1 Message Date
kamil 2f1d1558aa Remove an element from struct emul: e_tracesig
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-05-06 13:40:50 +00:00
kamil d20c39ee39 Remove the rnewprocp argument from fork1(9)
It's now unused and it can cause use-after-free scenarios as noted by
<Mateusz Guzik>.

Reference: http://mail-index.netbsd.org/tech-kern/2017/09/08/msg022267.html

Sponsored by <The NetBSD Foundation>
2018-04-16 14:51:59 +00:00
maya 45b55008a4 remove struct emul's e_fault.
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-09 20:55:42 +00:00
kamil f98f70a745 Revert vadvise(2) removal
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>
2018-01-06 16:41:23 +00:00
kamil 124aa7a756 compat/freebsd: Drop SYS_vadvise
The (o)vadvise syscall is dummy since the beginning of NetBSD.

Sponsored by <The NetBSD Foundation>
2017-12-19 19:18:18 +00:00
kamil c252b01325 compat/freebsd: Drop SYS_sbrk
sbrk - change data segment size

This syscall is dummy since the inception of the project.

Sponsored by <The NetBSD Foundation>
2017-12-19 18:15:08 +00:00
kamil 82bc226748 compat freebsd: Drop the sstk(2) syscall
sstk(2) has never been implemented by the NetBSD kernel.

Sponsored by <The NetBSD Foundation>
2017-12-19 08:27:05 +00:00
maxv 7ad103f49c Remove the second argument from USERMODE and KERNELMODE, it is unused
now that we don't have vm86 anymore.
2017-09-17 09:41:35 +00:00
maxv 7a3268ffdb Remove vm86. Simplifies a number of critical places.
Pass 2.
2017-08-12 07:07:53 +00:00
maxv 0f16c35db3 Move freebsd_machdep.h into sys/compat/freebsd, and don't install it. Now,
the compat_freebsd files are all contained in sys/compat/freebsd.
2017-08-08 08:04:05 +00:00
maxv 74ea430004 Move arch/i386/i386/freebsd_* into compat/freebsd/. COMPAT_FREEBSD is
i386-specific.
2017-08-01 14:43:54 +00:00
maxv 02de58a76a Remove exec_aout support in compat_freebsd. The only reason we still have
compat_freebsd is because of tw_cli, and it is an elf32 binary (could test,
manuel sent it to me).
2017-07-29 10:39:48 +00:00
riastradh 9c32900485 regen 2017-05-10 06:19:47 +00:00
christos 410aba1317 regen 2017-01-16 17:43:04 +00:00
christos d8dfcd6c2a regen 2017-01-13 06:18:31 +00:00
maxv ea498aca7e Change do_sys_mount() so that it only takes as argument the type of the
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-23 19:40:10 +00:00
christos 6d8b5c3e29 Regen 2015-09-24 14:40:09 +00:00
dholland 1fbab01a93 More on PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers (I think) all the MI headers outside of external/ (and dist/).
2015-09-06 06:00:59 +00:00
christos d1ef60ebe3 regen 2015-03-07 16:38:49 +00:00
dholland 1b225aadc1 typo in comment 2015-02-14 07:37:19 +00:00
uebayasi 25e1f6dab9 Define compat modules (but without dependencies yet). 2014-11-17 01:01:57 +00:00
maxv be2f51b7f2 Do not uselessly include <sys/malloc.h>. 2014-11-09 18:23:28 +00:00
snj f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
maxv d1a6ffae94 I'm not sure reading from an unsanitized userland pointer is a good idea.
Some users might be tempted to give 0x01, in which case the kernel will
crash.
2014-10-10 16:29:56 +00:00
maxv 2ccd0cb073 Empy comment 2014-06-28 11:06:31 +00:00
maxv a125a5eac2 Remove unused headers. 2014-06-24 12:17:40 +00:00
maxv b042e45033 Remove dead code. The kernel already checks for PT_INTERP sections, and puts
their content into "itp". There's no need for re-reading the whole binary and
trying to find this section again. Just use "itp".

DEBUG_FREEBSD_ELF is now unused, so remove its references in amd64/conf/ALL
and i386/conf/ALL.
2014-06-24 11:59:10 +00:00
christos 91d0cc5d6b simplify and clarify 2014-06-22 22:19:28 +00:00
christos a15da4b281 Avoid NULL dereference and fix sched param conversion (at least make it
do something). Pointed out by Maxime Villard
2014-06-21 23:12:10 +00:00
christos e8fac1316b fix typos 2014-03-07 02:02:16 +00:00
christos 54b7adb159 c99 initializers for struct execsw 2014-03-07 01:33:43 +00:00
pooka 4f6fb3bf35 Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.
2014-02-25 18:30:08 +00:00
dsl 5d0abe175a No longer used. 2014-01-19 13:36:40 +00:00
dsl 06a21d98cb Rip out the code that might once have supported the freebsd ptrace
system calls.
Removes some very dodgy conversions of FP register layouts.
Most of it has been disabled since 2007 when I removed the stackgap.
2014-01-19 13:35:58 +00:00
christos 3b438d6a5c use new bsd.syscall.mk 2014-01-14 18:51:24 +00:00
njoly c0dc7e32cd Regen for dup/dup2/dup3 argument types fix. 2013-11-07 19:39:57 +00:00
njoly dffea6ad6b Fix dup/dup2/dup3 argument types (u_int -> int). 2013-11-07 19:37:18 +00:00
christos 721e82b55a exec modules need to be of the exec kind 2013-09-19 18:50:35 +00:00
joerg 99c3eea80c P1003_1B_SEMAPHORE is no longer optional. 2012-03-10 21:51:48 +00:00
rmind ad12c77015 Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
2012-02-19 21:05:51 +00:00
bouyer 063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
chs 33fa5ccbbf many changes for COMPAT_LINUX:
- 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-07-07 01:30:32 +00:00
pooka e4fb143734 regen:
- remove nfssvc / fs_nfs.h / #ifdef NFS
- make getfh unconditional
2010-03-02 21:14:43 +00:00
pooka c20692bba4 Kill fs_nfs.h and #ifdef NFS by making getfh() support unconditional
and nfssvc unsupport unconditional.  nfs server was just a fancy
NOP anyway for all except Ultrix.  I know I'm boring but I couldn't
imagine why someone would want to run an Ultrix nfs server (and I
also doubt that it would work anymore with all the changes to fs
exporting etc).
2010-03-02 21:07:21 +00:00
pooka cfd5efb415 regen for conditional lfs syscall removal 2010-03-02 16:09:10 +00:00
pooka a47bbe896e Remove lfs syscall support from compat. I can't really imagine
anyone wanting to run lfs megamaid as a e.g. FreeBSD binary.
Besides, the real action has been in fcntl() for >5 years now.
The only place where the compat syscalls might have made the tiniest
bit of sense was netbsd32, but they were unimplemented there.
2010-03-02 16:00:03 +00:00
matt 15aa4c53c9 Regen (new makesyscalls.sh) 2009-12-14 00:53:32 +00:00
matt 6a9e4e8eeb Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds).  Should result in no code differences.
2009-12-10 14:13:48 +00:00
rmind eaddd78061 Use lwp_getpcb() in compat code, clean from struct user. 2009-11-23 00:46:06 +00:00
martin b507c43e16 Add missing include <sys/exec_aout.h> 2009-08-16 15:41:51 +00:00