Commit Graph

43 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
knakahara
bb29ae9814 fix interrupt_* stubs. reported by skrll@n.o 2015-08-28 07:18:39 +00:00
pooka
d8e04c9094 to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
knakahara
a604df282c Add kernel code to support intrctl(8). 2015-08-17 06:16:02 +00:00
knakahara
c65d622dea add pci_intr_distribute(9) for x86. 2015-04-27 06:42:52 +00:00
pooka
3d49ec1a72 As long as we're using #ifdef to decide which stubs get generated, might
as well use __strong_alias instead of __weak_alias.  Some toolchains
such as the cygwin pecoff one get weak aliases a bit wrong, so avoiding
unnecessary weak alises helps there.
2013-12-09 18:06:27 +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
dyoung
24aef817b5 Add stub implementations of bus_dma_tag_create()/bus_dma_tag_destroy(). 2011-08-31 20:09:57 +00:00
dyoung
a32744d895 Protect against bugs by using __strict_weak_alias() for
bus_space_is_equal() and bus_space_handle_is_equal().
2011-08-16 23:32:15 +00:00
dyoung
22c58b4530 Add default implementations for new bus_space(9) routines. 2011-07-06 18:24:26 +00:00
alnsn
a739efc5b5 kern/42030 - tracking of file descriptors by ktrace/kdump 2011-06-01 21:24:59 +00:00
dyoung
0840f9ccfc Don't use the C preprocessor to configure USERCONF. Instead, either do
or do not link in subr_userconf.c and x86_userconf.c.

Provide no-op stubs for userconf_bootinfo(), userconf_init(), and
userconf_prompt().

Delete all occurrences of #include "opt_userconf.h" as well as USERCONF
and __HAVE_USERCONF_BOOTINFO #ifdef'age.
2011-05-31 23:28:52 +00:00
joerg
5e6a27ebbb Remove Mach specific trace points. 2011-04-27 00:00:46 +00:00
dyoung
dcda6c56b0 Let the linker instead of the C preprocessor configure the kernel: make
weak aliases device_register(9) and device_register_post_config(9)
for the stub routine voidop().  Get rid of __HAVE_DEVICE_REGISTER and
__HAVE_DEVICE_REGISTER_POST_CONFIG.
2011-01-31 23:07:16 +00:00
simonb
599c2850cf KNF nit. 2010-06-13 13:43:02 +00:00
dyoung
3f82819ca5 Add data types, function prototypes, and stub implementations
for pci_chipset_tag_create() and pci_chipset_tag_destroy().  On
architectures that support it, an MI PCI bus driver can override the
architecture's default pci(9) and pci_intr(9) implementation.

Coming up next: documentation.
After that: x86 implementation.
Last but not least: make cbb(4) use MI PCI overrides.
2010-04-28 20:33:52 +00:00
pooka
da792af712 Add an optional hook for adjusting module string table after load.
Currently to be used for rump "SAOS" namespace trick.
2010-04-26 22:58:53 +00:00
dyoung
ad6e139a80 Add default implementations for bus_space_is_equal(9),
bus_space_tag_create(9), and bus_space_tag_destroy(9).  Use
bus_space_is_equal(9) throughout the kernel to compare
bus_space_tag_t's.  Tested on i386 and on sparc64.
2010-04-19 18:24:26 +00:00
pooka
0d8b367e2d Need a few funny #defines in kern_syscall.c too. 2010-04-14 15:15:37 +00:00
pooka
64d6a27dc2 need opt_modular.h in kern_syscall 2010-04-14 15:12:44 +00:00
pooka
7ea24651a7 Move routines related to syscall establishment from kern_subr.c and
kern_stub.c to kern_syscall.c.
2010-04-14 14:46:59 +00:00
pooka
4a21cd9096 Remove fs_lfs now that the syscall is always defined. 2010-03-03 00:49:39 +00:00
dyoung
e48f8429d1 Add a kernel configuration flag, SPLDEBUG, that activates a per-CPU log
of transitions to IPL_HIGH from lower IPLs.  SPLDEBUG is only available
on i386 and Xen kernels, today.

'options SPLDEBUG' adds instrumentation to spllower() and splraise() as
well as routines to start/stop debugging and to record IPL transitions:
spldebug_start(), spldebug_stop(), spldebug_raise(), spldebug_lower().
2009-11-03 05:23:27 +00:00
elad
2cb56be586 Add a (weak aliased) machdep_init() as a place to do machdep initialization
that can't happen as early as the other init functions as called from
cpu_startup() -- for example, register kauth(9) listeners.

Put unprivileged policy in the x86 code; used by i386, amd64, and xen.
2009-10-06 21:07:05 +00:00
rmind
7512d1e720 Make POSIX message queues a kernel module. 2009-07-19 02:50:44 +00:00
apb
0cc72e51ac Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
2009-02-13 22:41:00 +00:00
christos
87e24cb708 fix lutimes. 2009-01-11 19:40:38 +00:00
christos
461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
ad
5c14324942 port-amd64/39963 modules/compat_netbsd32: missing symbols on amd64 2008-11-20 09:30:32 +00:00
ad
92ce8c6a3d Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
2008-11-19 18:35:57 +00:00
ad
e6a3385171 Make POSIX AIO loadable as a module. 2008-11-14 23:33:45 +00:00
ad
119366618e Atomic insertion/removal of groups of system call vectors at runtime with
a basic facility for rollback.

Proposed on tech-kern@.
2008-11-12 14:29:31 +00:00
wrstuden
e27861f46e Add a weak alias for ktr_saupcall, so things build w/o KTRACE compiled. 2008-10-15 16:03:29 +00:00
wrstuden
fc7511b00e Merge wrstuden-revivesa into HEAD. 2008-10-15 06:51:17 +00:00
ad
ca230e9919 #error if __HAVE_PREEMPTION && !MULTIPROCESSOR. 2008-05-01 00:20:12 +00:00
ad
b96eb5aec9 Make the preemption switch a __HAVE instead of an option. 2008-04-28 21:17:16 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ad
6d70f903e6 Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.
2008-04-24 15:35:27 +00:00
dsl
7e2790cf6f 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.
2007-12-20 23:02:38 +00:00
dsl
31c3c56394 Fix inverted test in ktrpoint(), NAMI traces weren't being generated.
Also inline the 'ktrace_on' part of the test.
2007-08-27 13:33:45 +00:00
ad
63c4506184 Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.
2007-08-15 12:07:23 +00:00
itohy
d2585a8c91 Remove extra space so that symbol renaming works properly. 2007-03-03 10:08:18 +00:00
ad
b6ab00c330 A quick hack to get things building again: put back the SA system calls
with no arguments, and alias them to sys_nosys. To be revisited.
2007-02-10 11:32:21 +00:00