Commit Graph

286 Commits

Author SHA1 Message Date
pgoyette
a60b99094c * Split sys/kern/sys_process.c into three parts:
1 - ptrace(2) syscall for native emulation
        2 - common ptrace(2) syscall code (shared with compat_netbsd32)
        3 - support routines that are shared with PROCFS and/or KTRACE

* Add module glue for #1 and #2.  Both modules will be built-in to the
  kernel if "options PTRACE" is included in the config file (this is
  the default, defined in sys/conf/std).

* Mark the ptrace(2) syscall as modular in syscalls.master (generated
  files will be committed shortly).

* Conditionalize all remaining portions of PTRACE code on a new kernel
  option PTRACE_HOOKS.

XXX Instead of PROCFS depending on 'options PTRACE', we should probably
    just add a procfs attribute to the sys/kern/sys_process.c file's
    entry in files.kern, and add PROCFS to the "#if defineds" for
    process_domem().  It's really confusing to have two different ways
    of requiring this file.
2016-11-02 00:11:59 +00:00
christos
7cf7644fc7 GSoC 2016 Charles Cui: Implement thread priority protection based on work
by Andy Doran. Also document the get/set pshared thread calls as not
implemented, and add a skeleton implementation that is disabled.
XXX: document _sched_protect(2).
2016-07-03 14:24:58 +00:00
christos
8114776c49 Add clock_getcpuclockid2(2) as well as CLOCK_{PROCESS,THREAD}_CPUTIME_ID. 2016-04-23 23:08:26 +00:00
christos
f988eca316 include <sys/idtype.h> 2016-04-03 01:00:26 +00:00
christos
55b98faaa8 add wait6 2016-04-02 21:01:32 +00:00
pgoyette
65fae32d98 Merge the compat_sysv module into the sysv_ipc module - it should
never have been a separate module in the first place (my bad).

Adjust dependencies as appropriate.
2015-12-03 02:51:00 +00:00
pgoyette
b15990a499 Correctly mark syscalls 301, 302, 303 so that they will autoload the
compat_sysv module if not already built-in.
2015-10-10 03:27:30 +00:00
christos
3415810083 PR/50295: clock_nanotime() should not set errno, but return the error. 2015-10-02 19:47:08 +00:00
pooka
3de8e14458 +RUMP to __posix_{,f,l}chown. at least python wants them. 2015-06-18 15:16:12 +00:00
pgoyette
855a17b428 Update syscalls to point to the new module. (Regen of dependant
files to follow.)
2015-05-13 02:10:46 +00:00
pgoyette
ff00f0b594 Split the SYSV* compat code out into a separate compat_sysv module.
For monolithic kernels, both modules will be compiled as "built-ins",
while modular environments will be able to load the SYSVSEM, SYSVSHM,
and SYSVMSG code independant from the rest of compat.

This is a necessary precursor step to making the "STD" SYSV* code
into a separate module.

Tested in both monolithic and modular environments with no errors
seen.
2015-05-10 07:41:15 +00:00
pgoyette
6d24076578 Remove extraneous word 'compat' on header line 2015-05-09 06:04:13 +00:00
pgoyette
98e18f463f Teach makesyscalls.sh how to auto-generate the list of syscalls that
can be resolved by module auto-load.

Update syscalls.master to identify the specific module that contains
the auto-loadable code for each syscall.
2015-05-09 05:51:26 +00:00
justin
52d695cba4 Add __posix_rename as a rump syscall 2015-04-08 13:24:25 +00:00
christos
5a70401cf6 PR/49684: Pierre Pronchery: readlinkat(2) return type is wrong. 2015-02-22 00:50:30 +00:00
martin
06ea2d9d35 Mark posix_fallocate as NOERR 2015-02-10 15:07:39 +00:00
dholland
738b7a54cf Add fdiscard and posix_fallocate syscalls. 2014-07-25 08:25:47 +00:00
joerg
ec22bfc3c9 Avoid using C++ keywords as argument name. 2014-06-12 21:41:33 +00:00
pooka
9f45fed20c rump kernel wrappers for aio syscalls 2014-04-09 23:55:37 +00:00
pooka
527bb3b75d Add rump kernel syscall wrapper flag for a bunch of time-related
syscalls (nanosleep, clock_gettime, etc.).  These are mostly intended
for situations where a rump kernel runs on an OS-less host.
2014-03-14 00:52:08 +00:00
pooka
e69be3f980 create rump kernel wrapper for utrace() too 2013-12-11 09:40:56 +00:00
pooka
c21ebec4d0 Create rump kernel wrappers for {f,}ktrace 2013-12-09 17:13:17 +00:00
njoly
349036b521 Change mknodat(2) device argument type from uint32_t to dev_t.
Adds needed extra PAD argument for 64bit alignment, and libc wrapper.
2013-10-17 18:01:11 +00:00
pooka
7efe29ddc3 There is absolutely no way that fexecve() could even theoretically work
in a rump kernel, so don't create a wrapper for that.

recv/sendmmsg(), however, can, so create wrappers for those.
2013-08-30 10:33:10 +00:00
christos
4cec95f0ea Centralize the computation of struct timespec to the int timo.
Make lwp_park take the regular arguments for specifying what kind
of timeout we supply like clock_nanosleep(), namely clockid_t and flags.
2013-03-29 01:08:17 +00:00
christos
1ec743232e kernel portion of clock_nanosleep() 2012-10-02 01:44:27 +00:00
christos
7bee3146e4 Add {send,recv}mmsg from Linux 2012-06-22 18:26:35 +00:00
christos
fae991ec2f Add a new type of syscall "EXTERN" which is meant for modules that live
outside the tree (in pkgsrc). Use it to define afssys (210) which has
been reserved for years, and make it autoload the "openafs" module.
2012-05-05 19:37:37 +00:00
joerg
3bd1fd2afe Add entry for _ksem_timedwait. 2012-03-08 21:55:45 +00:00
matt
a9cc3edeb9 Use void * instead of sa_upcall_t for sa_register (since sa_upcall_t is
going away).
2012-02-19 17:50:28 +00:00
matt
d1b4215da1 Make SA syscalls as COMPAT_60 2012-02-19 17:22:16 +00:00
rmind
510eed8079 Make SA calls obsolete (use stubs in kern case, as libc needs them for now). 2012-02-19 17:08:02 +00:00
martin
f8c7c04bbe Add a posix_spawn syscall, as discussed on tech-kern.
Based on the summer of code project by Charles Zhang, heavily reworked
later by me - all bugs are likely mine.
Ok: core, releng.
2012-02-11 23:16:15 +00:00
dholland
59b296daa7 Change the syscall API for quotas over to the new non-proplib one.
- struct vfs_quotactl_args -> struct quotactl_args
   - add sys/stdint.h to sys/quotactl.h for clean userland build
   - install sys/quotactl.h in /usr/include
   - update set lists for same
   - add new marshalling code in libquota
   - add new unmarshalling code in vfs_syscalls.c
   - discard proplib interpreter code in vfs_quotactl.c
   - add dispatching code for the 14 quotactl ops in vfs_quotactl.c
   - mark the proplib quotactl syscall obsolete
   - add a new syscall number for the new quotactl syscall
   - change the name of the syscall to __quotactl()
   - remove the decl of the old quotactl from quota/quotaprop.h
   - add a decl of the new quotactl to sys/quotactl.h
   - update the libc build
   - update ktruss
   - remove proplib marshalling code from libquota
   - update copy of syscall table in gdb ppc sources
   - hack rumphijack to accomodate new quotactl name (as I recall,
     pooka wanted such a name change to simplify something, but I
     don't really see what/how)

This change appears to require a kernel version bump for rumpish
reasons.
2012-02-01 05:34:38 +00:00
manu
5b61306f9b Add futimens(2) and part of utimnsat(2) 2011-08-17 07:22:33 +00:00
manu
9db30be448 First stage of support for Extended API set 2. Most of the think is
unimplemented, except enough of linkat(2) to hardlink to a symlink.

Everything new in headers is guarded #ifdef _INCOMPLETE_XOPEN_C063 since
some software (e.g.: xcvs in our own tree) will assume they can use openat(2)
when AT_FDCWD is defined. _INCOMPLETE_XOPEN_C063 will go away once support
will be completed.
2011-08-08 12:08:52 +00:00
drochner
2ac9241da8 make the data arguments of *setxattr(2) const, as in Linux
(is this an official NetBSD API or should it be COMPAT_LINUX only?)
2011-07-18 11:28:24 +00:00
christos
7823fd0964 - syscalls that takes socklen_t arguments should do so.
- add pipe2, dup3, paccept, kqueue1
2011-06-26 17:05:24 +00:00
pooka
41f5ebb8ea actually, revert previous for now. quotactl doesn't play with the
same rules as all the other compat functions.
2011-03-09 22:12:45 +00:00
pooka
bd56cf8b76 mark old quotactl rump too 2011-03-09 21:52:31 +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
pooka
0aac2843ad Add syscall type NOERR which signals that a system call is STD but
does not return an errno the usual way.  The main use case is to
fix the posix_fadvise() rump stub (yes, posix_fadvise is a bit
special... bologna).

The list of NOERR syscalls currently matches the libc NOERR list
(and the libc Makefile can in the future be autogenerated from this
info).

Problem spotted by, *shocker*, the automated test runs, specifically
the posix_fadvise test.
2011-02-21 23:20:19 +00:00
pooka
ca1f523968 somehow i've missed preadv/pwritev from rump-relevant syscalls 2011-02-21 12:49:06 +00:00
christos
cae1901fc3 make syscalls match documentation as far as pid_t goes. 2011-01-31 00:05:29 +00:00
pooka
111bbbce9e Missed pselect50 in previous (file was open in editor ... d0h).
Add mknod50 and fhstat50 too.
2011-01-17 18:24:17 +00:00
pooka
39a698a4f3 Mark a few 5.0 COMPAT syscalls as RUMP now that it's possible 2011-01-17 16:21:40 +00:00
christos
3d70c4b47c implement sigqueueinfo 2011-01-10 04:39:18 +00:00
pooka
0061495240 rump posix_fadvise() 2010-11-11 14:47:41 +00:00
pooka
0d2a7de3b6 getcwd for rump 2010-09-07 17:10:08 +00:00
pooka
a50c905497 rump umask 2010-09-06 20:00:09 +00:00