Commit Graph

56 Commits

Author SHA1 Message Date
imp
e5eb131f8b Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999 and email from Peter Wemm.

Approved by: core, peter
2004-04-05 23:55:14 +00:00
peter
fc71e58360 Catch up with some proc/procsig locking improvements that were made to the
i386 version and were not merged over.
2004-02-21 23:34:42 +00:00
davidxu
62545ad42b Make sigaltstack as per-threaded, because per-process sigaltstack state
is useless for threaded programs, multiple threads can not share same
stack.
The alternative signal stack is private for thread, no lock is needed,
the orignal P_ALTSTACK is now moved into td_pflags and renamed to
TDP_ALTSTACK.
For single thread or Linux clone() based threaded program, there is no
semantic changed, because those programs only have one kernel thread
in every process.

Reviewed by: deischen, dfr
2004-01-03 02:02:26 +00:00
peter
5b55822dd4 Catch up with the procsig locking changes elsewhere. We were doing
things like copyin/out with psp->ps_mtx held.  That was not good.

Approved by:  re (scottl)
2003-12-03 07:00:30 +00:00
peter
4100d71132 Initial landing of SMP support for FreeBSD/amd64.
- This is heavily derived from John Baldwin's apic/pci cleanup on i386.
- I have completely rewritten or drastically cleaned up some other parts.
  (in particular, bootstrap)
- This is still a WIP.  It seems that there are some highly bogus bioses
  on nVidia nForce3-150 boards.  I can't stress how broken these boards
  are.  I have a workaround in mind, but right now the Asus SK8N is broken.
  The Gigabyte K8NPro (nVidia based) is also mind-numbingly hosed.
- Most of my testing has been with SCHED_ULE.  SCHED_4BSD works.
- the apic and acpi components are 'standard'.
- If you have an nVidia nForce3-150 board, you are stuck with 'device
  atpic' in addition, because they somehow managed to forget to connect the
  8254 timer to the apic, even though its in the same silicon!  ARGH!
  This directly violates the ACPI spec.
2003-11-17 08:58:16 +00:00
peter
02ce70bc82 Stop pretending to support kernel profiling. The FAKE_MCOUNT() etc
calls are just gradually getting more and more stale.  At this point it
would be better to start from scratch once prof_machdep.c is adapted.
2003-11-13 02:38:33 +00:00
peter
3667f881b1 Move a MD 32 bit binary support routine into the MD areas. exec_setregs
is highly MD in an emulation environment since it operates on the host
environment.  Although the setregs functions are really for exec support
rather than signals, they deal with the same sorts of context and include
files.  So I put it there rather than create yet another file.
2003-11-08 07:43:44 +00:00
peter
cea0e74e37 The great s/npx/fpu/gi 2003-11-08 03:33:38 +00:00
peter
59e5f21ece MFi386 by jhb: use symbolic constants for the IDT entries. 2003-09-22 22:09:02 +00:00
peter
b3efb3df49 Switch to using the emulator in the common compat area.
Still work-in-progress.
2003-08-23 00:04:53 +00:00
peter
bf7cb2572e Initial sweep at dividing up the generic 32bit-on-64bit kernel support
from the ia32 specific stuff.  Some of this still needs to move to the MI
freebsd32 area, and some needs to move to the MD area.  This is still
work-in-progress.
2003-08-22 23:19:02 +00:00
peter
a44d8a57ee Regen 2003-08-21 03:48:50 +00:00
peter
e4c773c594 This is too funny for words. Swap syscalls 416 and 417 around. It works
better that way when sigaction() and sigreturn() do the right thing.
2003-08-21 03:48:05 +00:00
obrien
f1c0a310a6 Use __FBSDID().
Brought to you by:	a boring talk at Ottawa Linux Symposium
2003-07-25 21:19:19 +00:00
peter
8bafa367cf Regenerate. 2003-05-31 06:51:04 +00:00
peter
118cbe74a9 Make this compile with WITNESS enabled. It wants the syscall names. 2003-05-31 06:49:53 +00:00
peter
27f5f95395 Deal with the user VM space expanding. 32 bit applications do not like
having their stack at the 512GB mark.  Give 4GB of user VM space for 32
bit apps.  Note that this is significantly more than on i386 which gives
only about 2.9GB of user VM to a process (1GB for kernel, plus page
table pages which eat user VM space).

Approved by: re (blanket)
2003-05-23 05:07:33 +00:00
peter
21d50477ab Collect the nastiness for preserving the kernel MSR_GSBASE around the
load_gs() calls into a single place that is less likely to go wrong.

Eliminate the per-process context switching of MSR_GSBASE, because it
should be constant for a single cpu.  Instead, save/restore it during
the loading of the new %gs selector for the new process.

Approved by:	re (amd64/* blanket)
2003-05-15 00:23:40 +00:00
peter
5279cecff7 Regen
Approved by: re (amd64 blanket)
2003-05-14 04:11:25 +00:00
peter
a24b12e341 Add BASIC i386 binary support for the amd64 kernel. This is largely
stolen from the ia64/ia32 code (indeed there was a repocopy), but I've
redone the MD parts and added and fixed a few essential syscalls.  It
is sufficient to run i386 binaries like /bin/ls, /usr/bin/id (dynamic)
and p4.  The ia64 code has not implemented signal delivery, so I had
to do that.

Before you say it, yes, this does need to go in a common place.  But
we're in a freeze at the moment and I didn't want to risk breaking ia64.
I will sort this out after the freeze so that the common code is in a
common place.

On the AMD64 side, this required adding segment selector context switch
support and some other support infrastructure.  The %fs/%gs etc code
is hairy because loading %gs will clobber the kernel's current MSR_GSBASE
setting.  The segment selectors are not used by the kernel, so they're only
changed at context switch time or when changing modes.  This still needs
to be optimized.

Approved by:	re (amd64/* blanket)
2003-05-14 04:10:49 +00:00
jhb
21de071f52 Regen. 2003-04-25 15:59:44 +00:00
jhb
e493fd3faa Oops, the thr_* and jail_attach() syscall entries should be NOPROTO rather
than STD.
2003-04-25 15:59:18 +00:00
jhb
c30db0c24f Regen. 2003-04-24 20:50:57 +00:00
jhb
91308d46a4 Fix the thr_create() entry by adding a trailing \. Also, sync up the
MP safe flag for thr_* with the main table.
2003-04-24 20:49:46 +00:00
jhb
f3d7052aea - Replace inline implementations of sigprocmask() with calls to
kern_sigprocmask() in the various binary compatibility emulators.
- Replace calls to sigsuspend(), sigaltstack(), sigaction(), and
  sigprocmask() that used the stackgap with calls to the corresponding
  kern_sig*() functions instead without using the stackgap.
2003-04-22 18:23:49 +00:00
mike
ee5efe23ec o In struct prison, add an allprison linked list of prisons (protected
by allprison_mtx), a unique prison/jail identifier field, two path
  fields (pr_path for reporting and pr_root vnode instance) to store
  the chroot() point of each jail.
o Add jail_attach(2) to allow a process to bind to an existing jail.
o Add change_root() to perform the chroot operation on a specified
  vnode.
o Generalize change_dir() to accept a vnode, and move namei() calls
  to callers of change_dir().
o Add a new sysctl (security.jail.list) which is a group of
  struct xprison instances that represent a snapshot of active jails.

Reviewed by:	rwatson, tjr
2003-04-09 02:55:18 +00:00
jeff
c44b6b488c - Add thr and umtx system calls. 2003-04-01 01:15:56 +00:00
jeff
3e36051ca6 - Add a placeholder for sigwait 2003-03-31 23:36:40 +00:00
imp
1493fd6e76 Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
phk
674c779422 Remove #include <sys/dkstat.h> 2003-02-16 14:13:23 +00:00
alfred
8f5153c3ea Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
rwatson
549d7a30bb Synchronize to kern/syscalls.master:1.139.
Obtained from:	TrustedBSD Project
2002-12-29 20:33:26 +00:00
marcel
99fa0f4690 Regen: swapoff 2002-12-16 00:49:36 +00:00
marcel
5b53437fe5 Change swapoff from MNOPROTO to UNIMPL. The former doesn't work. 2002-12-16 00:48:52 +00:00
dillon
c2d085eb9b This is David Schultz's swapoff code which I am finally able to commit.
This should be considered highly experimental for the moment.

Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
MFC after:	3 weeks
2002-12-15 19:17:57 +00:00
alfred
5da2d203a3 SCARGS removal take II. 2002-12-14 01:56:26 +00:00
alfred
2b58666422 Backout removal SCARGS, the code freeze is only "selectively" over. 2002-12-13 22:41:47 +00:00
alfred
420936257d Remove SCARGS.
Reviewed by: md5
2002-12-13 22:27:25 +00:00
deischen
4f7bdf3039 Regenerate after adding syscalls. 2002-11-16 23:48:14 +00:00
deischen
b1fce77dca Add *context() syscalls to ia64 32-bit compatability table as requested
in kern/syscalls.master.
2002-11-16 15:15:17 +00:00
rwatson
fbe22812bb Sync to src/sys/kern/syscalls.master 2002-11-02 23:55:30 +00:00
peter
05f1bfdb78 Stake a claim on 418 (__xstat), 419 (__xfstat), 420 (__xlstat) 2002-10-19 22:25:31 +00:00
peter
6248774bd5 Grab 416/417 real estate before I get burned while testing again.
This is for the not-quite-ready signal/fpu abi stuff.  It may not see
the light of day, but I'm certainly not going to be able to validate it
when getting shot in the foot due to syscall number conflicts.
2002-10-19 22:09:23 +00:00
rwatson
5b129e0b70 Add a placeholder for the execve_mac() system call, similar to SELinux's
execve_secure() system call, which permits a process to pass in a label
for a label change during exec.  This permits SELinux to change the
label for the resulting exec without a race following a manual label
change on the process.  Because this interface uses our general purpose
MAC label abstraction, we call it execve_mac(), and wrap our port of
SELinux's execve_secure() around it with appropriate sid mappings.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-19 21:06:57 +00:00
peter
9f5b203208 re-regen. Sigh. 2002-10-09 22:40:41 +00:00
peter
6b1d01a081 Sigh. Fix fat-fingering of diff. I knew this was going to happen. 2002-10-09 22:40:02 +00:00
peter
8c99eb2ac9 regenerate. sendfile stuff and other recently picked up stubs. 2002-10-09 22:28:48 +00:00
peter
af345acdc2 Try and deal with the #ifdef COMPAT_FREEBSD4 sendfile stuff. This would
have been a lot easier if do_sendfile() was usable externally.
2002-10-09 22:27:24 +00:00
peter
031d86f5f7 Try and patch up some tab-to-space spammage. 2002-10-09 22:14:35 +00:00
peter
df54027323 Add placeholder stubs for nsendfile, mac_syscall, ksem_close, ksem_post,
ksem_wait, ksem_trywait, ksem_init, ksem_open, ksem_unlink, ksem_getvalue,
ksem_destroy, __mac_get_pid, __mac_get_link, __mac_set_link,
extattr_set_link, extattr_get_link, extattr_delete_link.
2002-10-09 22:10:23 +00:00