Skip site navigation (1)Skip section navigation (2)

CVS log for src/sys/compat/freebsd32/syscalls.master

[BACK] Up to [FreeBSD] / src / sys / compat / freebsd32

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.145: download - view: text, markup, annotated - select for diffs
Mon Nov 21 01:26:10 2011 UTC (2 months, 2 weeks ago) by lstewart
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +5 -3 lines
SVN rev 227776 on 2011-11-21 01:26:10Z by lstewart

- Add the ffclock_getcounter(), ffclock_getestimate() and ffclock_setestimate()
  system calls to provide feed-forward clock management capabilities to
  userspace processes. ffclock_getcounter() returns the current value of the
  kernel's feed-forward clock counter. ffclock_getestimate() returns the current
  feed-forward clock parameter estimates and ffclock_setestimate() updates the
  feed-forward clock parameter estimates.

- Document the syscalls in the ffclock.2 man page.

- Regenerate the script-derived syscall related files.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Submitted by:	Julien Ridoux (jridoux at unimelb edu au)

Revision 1.144: download - view: text, markup, annotated - select for diffs
Sat Nov 19 06:35:15 2011 UTC (2 months, 3 weeks ago) by ed
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +3 -3 lines
SVN rev 227691 on 2011-11-19 06:35:15Z by ed

Improve *access*() parameter name consistency.

The current code mixes the use of `flags' and `mode'. This is a bit
confusing, since the faccessat() function as a `flag' parameter to store
the AT_ flag.

Make this less confusing by using the same name as used in the POSIX
specification -- `amode'.

Revision 1.143: download - view: text, markup, annotated - select for diffs
Fri Nov 4 04:02:50 2011 UTC (3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +4 -1 lines
SVN rev 227070 on 2011-11-04 04:02:50Z by jhb

Add the posix_fadvise(2) system call.  It is somewhat similar to
madvise(2) except that it operates on a file descriptor instead of a
memory region.  It is currently only supported on regular files.

Just as with madvise(2), the advice given to posix_fadvise(2) can be
divided into two types.  The first type provide hints about data access
patterns and are used in the file read and write routines to modify the
I/O flags passed down to VOP_READ() and VOP_WRITE().  These modes are
thus filesystem independent.  Note that to ease implementation (and
since this API is only advisory anyway), only a single non-normal
range is allowed per file descriptor.

The second type of hints are used to hint to the OS that data will or
will not be used.  These hints are implemented via a new VOP_ADVISE().
A default implementation is provided which does nothing for the WILLNEED
request and attempts to move any clean pages to the cache page queue for
the DONTNEED request.  This latter case required two other changes.
First, a new V_CLEANONLY flag was added to vinvalbuf().  This requests
vinvalbuf() to only flush clean buffers for the vnode from the buffer
cache and to not remove any backing pages from the vnode.  This is
used to ensure clean pages are not wired into the buffer cache before
attempting to move them to the cache page queue.  The second change adds
a new vm_object_page_cache() method.  This method is somewhat similar to
vm_object_page_remove() except that instead of freeing each page in the
specified range, it attempts to move clean pages to the cache queue if
possible.

To preserve the ABI of struct file, the f_cdevpriv pointer is now reused
in a union to point to the currently active advice region if one is
present for regular files.

Reviewed by:	jilles, kib, arch@
Approved by:	re (kib)
MFC after:	1 month

Revision 1.142: download - view: text, markup, annotated - select for diffs
Fri Oct 14 11:46:46 2011 UTC (3 months, 3 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +2 -2 lines
SVN rev 226364 on 2011-10-14 11:46:46Z by jhb

Use PAIR32TO64() for the offset and length parameters to
freebsd32_posix_fallocate() to properly handle big-endian platforms.

Reviewed by:	mdf
MFC after:	1 week

Revision 1.141: download - view: text, markup, annotated - select for diffs
Thu Oct 13 18:21:11 2011 UTC (3 months, 4 weeks ago) by marcel
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +1 -1 lines
SVN rev 226348 on 2011-10-13 18:21:11Z by marcel

Wrap mprotect(2)

Revision 1.140: download - view: text, markup, annotated - select for diffs
Fri Jul 15 18:26:19 2011 UTC (6 months, 3 weeks ago) by jonathan
Branches: MAIN
CVS tags: RELENG_9_BP, RELENG_9
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +3 -2 lines
SVN rev 224066 on 2011-07-15 18:26:19Z by jonathan

Add cap_new() and cap_getrights() system calls.

Implement two previously-reserved Capsicum system calls:
- cap_new() creates a capability to wrap an existing file descriptor
- cap_getrights() queries the rights mask of a capability.

Approved by: mentor (rwatson), re (Capsicum blanket)
Sponsored by: Google Inc

Revision 1.139: download - view: text, markup, annotated - select for diffs
Thu Jun 16 22:05:56 2011 UTC (7 months, 3 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +2 -1 lines
SVN rev 223166 on 2011-06-16 22:05:56Z by kib

Implement compat32 for old lseek, for the a.out binaries on amd64.

Revision 1.138: download - view: text, markup, annotated - select for diffs
Mon Apr 18 16:32:22 2011 UTC (9 months, 3 weeks ago) by mdf
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +4 -0 lines
SVN rev 220791 on 2011-04-18 16:32:22Z by mdf

Add the posix_fallocate(2) syscall.  The default implementation in
vop_stdallocate() is filesystem agnostic and will run as slow as a
read/write loop in userspace; however, it serves to correctly
implement the functionality for filesystems that do not implement a
VOP_ALLOCATE.

Note that __FreeBSD_version was already bumped today to 900036 for any
ports which would like to use this function.

Also reserve space in the syscall table for posix_fadvise(2).

Reviewed by:	-arch (previous version)

Revision 1.137: download - view: text, markup, annotated - select for diffs
Fri Apr 1 11:16:29 2011 UTC (10 months, 1 week ago) by kib
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +12 -6 lines
SVN rev 220238 on 2011-04-01 11:16:29Z by kib

Add support for executing the FreeBSD 1/i386 a.out binaries on amd64.

In particular:
- implement compat shims for old stat(2) variants and ogetdirentries(2);
- implement delivery of signals with ancient stack frame layout and
  corresponding sigreturn(2);
- implement old getpagesize(2);
- provide a user-mode trampoline and LDT call gate for lcall $7,$0;
- port a.out image activator and connect it to the build as a module
  on amd64.

The changes are hidden under COMPAT_43.

MFC after:   1 month

Revision 1.136: download - view: text, markup, annotated - select for diffs
Wed Mar 30 17:48:15 2011 UTC (10 months, 1 week ago) by trasz
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +15 -0 lines
SVN rev 220163 on 2011-03-30 17:48:15Z by trasz

Add rctl.  It's used by racct to take user-configurable actions based
on the set of rules it maintains and the current resource usage.  It also
privides userland API to manage that ruleset.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	kib (earlier version)

Revision 1.135: download - view: text, markup, annotated - select for diffs
Wed Mar 30 14:46:12 2011 UTC (10 months, 1 week ago) by kib
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +2 -2 lines
SVN rev 220158 on 2011-03-30 14:46:12Z by kib

Provide compat32 shims for kldstat(2).

Requested and tested by:	jpaetzel
MFC after:	1 week

Revision 1.134: download - view: text, markup, annotated - select for diffs
Sat Mar 5 12:40:35 2011 UTC (11 months ago) by trasz
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +3 -0 lines
SVN rev 219304 on 2011-03-05 12:40:35Z by trasz

Add two new system calls, setloginclass(2) and getloginclass(2).  This makes
it possible for the kernel to track login class the process is assigned to,
which is required for RCTL.  This change also make setusercontext(3) call
setloginclass(2) and makes it possible to retrieve current login class using
id(1).

Reviewed by:	kib (as part of a larger patch)

Revision 1.133: download - view: text, markup, annotated - select for diffs
Tue Mar 1 13:23:37 2011 UTC (11 months, 1 week ago) by rwatson
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +2 -2 lines
SVN rev 219129 on 2011-03-01 13:23:37Z by rwatson

Add initial support for Capsicum's Capability Mode to the FreeBSD kernel,
compiled conditionally on options CAPABILITIES:

Add a new credential flag, CRED_FLAG_CAPMODE, which indicates that a
subject (typically a process) is in capability mode.

Add two new system calls, cap_enter(2) and cap_getmode(2), which allow
setting and querying (but never clearing) the flag.

Export the capability mode flag via process information sysctls.

Sponsored by:	Google, Inc.
Reviewed by:	anderson
Discussed with:	benl, kris, pjd
Obtained from:	Capsicum Project
MFC after:	3 months

Revision 1.132: download - view: text, markup, annotated - select for diffs
Mon Jun 28 18:06:46 2010 UTC (19 months, 1 week ago) by kib
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +10 -10 lines
SVN rev 209579 on 2010-06-28 18:06:46Z by kib

Count number of threads that enter and leave dynamically registered
syscalls. On the dynamic syscall deregistration, wait until all
threads leave the syscall code. This somewhat increases the safety
of the loadable modules unloading.

Reviewed by:	jhb
Tested by:	pho
MFC after:	1 month

Revision 1.131: download - view: text, markup, annotated - select for diffs
Fri Mar 19 11:10:24 2010 UTC (22 months, 3 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +17 -6 lines
SVN rev 205325 on 2010-03-19 11:10:24Z by kib

Implement compat32 shims for mqueuefs.

Reviewed by:	jhb
MFC after:	2 weeks

Revision 1.130: download - view: text, markup, annotated - select for diffs
Fri Mar 19 11:08:43 2010 UTC (22 months, 3 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +15 -11 lines
SVN rev 205324 on 2010-03-19 11:08:43Z by kib

Implement compat32 shims for ksem syscalls.

Reviewed by:	jhb
MFC after:	2 weeks

Revision 1.129: download - view: text, markup, annotated - select for diffs
Fri Mar 19 11:04:42 2010 UTC (22 months, 3 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +21 -18 lines
SVN rev 205323 on 2010-03-19 11:04:42Z by kib

Move SysV IPC freebsd32 compat shims from freebsd32_misc.c to corresponding
sysv_{msg,sem,shm}.c files.

Mark SysV IPC freebsd32 syscalls as NOSTD and add required
SYSCALL_INIT_HELPER/SYSCALL32_INIT_HELPERs to provide auto
register/unregister on module load.

This makes COMPAT_FREEBSD32 functional with SysV IPC compiled and loaded
as modules.

Reviewed by:	jhb
MFC after:	2 weeks

Revision 1.128: download - view: text, markup, annotated - select for diffs
Thu Mar 11 14:49:06 2010 UTC (23 months ago) by nwhitehorn
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +60 -32 lines
SVN rev 205014 on 2010-03-11 14:49:06Z by nwhitehorn

Provide groundwork for 32-bit binary compatibility on non-x86 platforms,
for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_IA32
option to COMPAT_FREEBSD32, removes some IA32-specific code from MI parts
of the kernel and enhances the freebsd32 compatibility code to support
big-endian platforms.

Reviewed by:	kib, jhb

Revision 1.127: download - view: text, markup, annotated - select for diffs
Mon Feb 8 10:02:01 2010 UTC (2 years ago) by ed
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +1 -2 lines
SVN rev 203660 on 2010-02-08 10:02:01Z by ed

Remove unused LIBCOMPAT keyword from syscalls.master.

Revision 1.126: download - view: text, markup, annotated - select for diffs
Fri Dec 4 21:52:31 2009 UTC (2 years, 2 months ago) by kib
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +8 -4 lines
SVN rev 200111 on 2009-12-04 21:52:31Z by kib

Add several syscall compat32 entries for acl manipulation.
They do not require translation of the arguments.

Tested by:	bsam
MFC after:	1 week

Revision 1.125: download - view: text, markup, annotated - select for diffs
Tue Oct 27 10:55:34 2009 UTC (2 years, 3 months ago) by kib
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +4 -0 lines
SVN rev 198508 on 2009-10-27 10:55:34Z by kib

Current pselect(3) is implemented in usermode and thus vulnerable to
well-known race condition, which elimination was the reason for the
function appearance in first place. If sigmask supplied as argument to
pselect() enables a signal, the signal might be delivered before thread
called select(2), causing lost wakeup. Reimplement pselect() in kernel,
making change of sigmask and sleep atomic.

Since signal shall be delivered to the usermode, but sigmask restored,
set TDP_OLDMASK and save old mask in td_oldsigmask. The TDP_OLDMASK
should be cleared by ast() in case signal was not gelivered during
syscall execution.

Reviewed by:	davidxu
Tested by:	pho
MFC after:	1 month

Revision 1.124: download - view: text, markup, annotated - select for diffs
Wed Sep 30 08:46:01 2009 UTC (2 years, 4 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +8 -0 lines
SVN rev 197636 on 2009-09-30 08:46:01Z by rwatson

Reserve system call numbers for Capsicum security framework capabilities,
capability mode, and process descriptors: cap_new, cap_getrights, cap_enter,
cap_getmode, pdfork, pdkill, pdgetpid, and pdwait.

Obtained from:	TrustedBSD Project
Sponsored by:	Google
MFC after:	3 weeks

Revision 1.123: download - view: text, markup, annotated - select for diffs
Wed Jul 8 16:26:43 2009 UTC (2 years, 7 months ago) by trasz
Branches: MAIN
CVS tags: RELENG_8_BP, RELENG_8
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +1 -1 lines
SVN rev 195468 on 2009-07-08 16:26:43Z by trasz

Fix freebsd32 version of lpathconf(2).

Approved by:	re (kib)

Revision 1.122: download - view: text, markup, annotated - select for diffs
Wed Jul 8 15:23:18 2009 UTC (2 years, 7 months ago) by trasz
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +1 -0 lines
SVN rev 195458 on 2009-07-08 15:23:18Z by trasz

There is an optimization in chmod(1), that makes it not to call chmod(2)
if the new file mode is the same as it was before; however, this
optimization must be disabled for filesystems that support NFSv4 ACLs.
Chmod uses pathconf(2) to determine whether this is the case - however,
pathconf(2) always follows symbolic links, while the 'chmod -h' doesn't.

This change adds lpathconf(3) to make it possible to solve that problem
in a clean way.

Reviewed by:	rwatson (earlier version)
Approved by:	re (kib)

Revision 1.121: download - view: text, markup, annotated - select for diffs
Wed Jun 24 21:10:52 2009 UTC (2 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +11 -5 lines
SVN rev 194910 on 2009-06-24 21:10:52Z by jhb

Change the ABI of some of the structures used by the SYSV IPC API:
- The uid/cuid members of struct ipc_perm are now uid_t instead of unsigned
  short.
- The gid/cgid members of struct ipc_perm are now gid_t instead of unsigned
  short.
- The mode member of struct ipc_perm is now mode_t instead of unsigned short
  (this is merely a style bug).
- The rather dubious padding fields for ABI compat with SV/I386 have been
  removed from struct msqid_ds and struct semid_ds.
- The shm_segsz member of struct shmid_ds is now a size_t instead of an
  int.  This removes the need for the shm_bsegsz member in struct
  shmid_kernel and should allow for complete support of SYSV SHM regions
  >= 2GB.
- The shm_nattch member of struct shmid_ds is now an int instead of a
  short.
- The shm_internal member of struct shmid_ds is now gone.  The internal
  VM object pointer for SHM regions has been moved into struct
  shmid_kernel.
- The existing __semctl(), msgctl(), and shmctl() system call entries are
  now marked COMPAT7 and new versions of those system calls which support
  the new ABI are now present.
- The new system calls are assigned to the FBSD-1.1 version in libc.  The
  FBSD-1.0 symbols in libc now refer to the old COMPAT7 system calls.
- A simplistic framework for tagging system calls with compatibility
  symbol versions has been added to libc.  Version tags are added to
  system calls by adding an appropriate __sym_compat() entry to
  src/lib/libc/incldue/compat.h. [1]

PR:		kern/16195 kern/113218 bin/129855
Reviewed by:	arch@, rwatson
Discussed with:	kan, kib [1]

Revision 1.120: download - view: text, markup, annotated - select for diffs
Wed Jun 24 13:36:37 2009 UTC (2 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +2 -1 lines
SVN rev 194833 on 2009-06-24 13:36:37Z by jhb

Add a new COMPAT7 flag for FreeBSD 7.x compatibility system calls.

Revision 1.119: download - view: text, markup, annotated - select for diffs
Mon Jun 22 20:12:40 2009 UTC (2 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +1 -1 lines
SVN rev 194645 on 2009-06-22 20:12:40Z by jhb

Fix a typo in a comment.

Revision 1.118: download - view: text, markup, annotated - select for diffs
Wed Jun 17 19:50:38 2009 UTC (2 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +7 -4 lines
SVN rev 194390 on 2009-06-17 19:50:38Z by jhb

- Add the ability to mix multiple flags seperated by pipe ('|') characters
  in the type field of system call tables.  Specifically, one can now use
  the 'NO*' types as flags in addition to the 'COMPAT*' types.  For example,
  to tag 'COMPAT*' system calls as living in a KLD via NOSTD.  The COMPAT*
  type is required to be listed first in this case.
- Add new functions 'type()' and 'flag()' to the embedded awk script in
  makesyscalls.sh that return true if a requested flag is found in the
  type field ($3).  The flag() function checks all of the flags in the
  field, but type() only checks the first flag.  type() is meant to be
  used in the top-level "switch" statement and flag() should be used
  otherwise.
- Retire the CPT_NOA type, it is now replaced with "COMPAT|NOARGS" using
  the flags approach.
- Tweak the comment descriptions of COMPAT[46] system calls so that they
  say "freebsd[46] foo" rather than "old foo".
- Document the COMPAT6 type.
- Sync comments in compat32 syscall table with the master table.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Mon Jun 15 20:38:55 2009 UTC (2 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +1 -0 lines
SVN rev 194262 on 2009-06-15 20:38:55Z by jhb

Add a new 'void closefrom(int lowfd)' system call.  When called, it closes
any open file descriptors >= 'lowfd'.  It is largely identical to the same
function on other operating systems such as Solaris, DFly, NetBSD, and
OpenBSD.  One difference from other *BSD is that this closefrom() does not
fail with any errors.  In practice, while the manpages for NetBSD and
OpenBSD claim that they return EINTR, they ignore internal errors from
close() and never return EINTR.  DFly does return EINTR, but for the common
use case (closing fd's prior to execve()), the caller really wants all
fd's closed and returning EINTR just forces callers to call closefrom() in
a loop until it stops failing.

Note that this implementation of closefrom(2) does not make any effort to
resolve userland races with open(2) in other threads.  As such, it is not
multithread safe.

Submitted by:	rwatson (initial version)
Reviewed by:	rwatson
MFC after:	2 weeks

Revision 1.116: download - view: text, markup, annotated - select for diffs
Wed Jun 10 13:48:13 2009 UTC (2 years, 8 months ago) by kib
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +20 -6 lines
SVN rev 193916 on 2009-06-10 13:48:13Z by kib

Add several syscall compat32 entries for extattr manipulation syscalls,
that do not require translation of the arguments.

Requested by:	kientzle
Reviewed by:	jhb (previous wrong version)
MFC after:	1 week

Revision 1.115: download - view: text, markup, annotated - select for diffs
Wed Apr 29 21:14:15 2009 UTC (2 years, 9 months ago) by jamie
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +5 -0 lines
SVN rev 191673 on 2009-04-29 21:14:15Z by jamie

Introduce the extensible jail framework, using the same "name=value"
interface as nmount(2).  Three new system calls are added:
* jail_set, to create jails and change the parameters of existing jails.
  This replaces jail(2).
* jail_get, to read the parameters of existing jails.  This replaces the
  security.jail.list sysctl.
* jail_remove to kill off a jail's processes and remove the jail.
Most jail parameters may now be changed after creation, and jails may be
set to exist without any attached processes.  The current jail(2) system
call still exists, though it is now a stub to jail_set(2).

Approved by:	bz (mentor)

Revision 1.114: download - view: text, markup, annotated - select for diffs
Wed Apr 1 13:11:50 2009 UTC (2 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +1 -1 lines
SVN rev 190621 on 2009-04-01 13:11:50Z by kib

Rename implementation function for freebsd32 sysarch(2) to allow for
the arguments translations. Provide ABI-compatible definition of the
struct i386_ldt_args for freebsd32 compat layer.

In collaboration with:	pho
Reviewed by:	jhb

Revision 1.113: download - view: text, markup, annotated - select for diffs
Wed Dec 10 20:56:19 2008 UTC (3 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +28 -12 lines
SVN rev 185878 on 2008-12-10 20:56:19Z by jhb

- Add 32-bit compat system calls for VFS_AIO.  The system calls live in the
  aio code and are registered via the recently added SYSCALL32_*() helpers.
- Since the aio code likes to invoke fuword and suword a lot down in the
  "bowels" of system calls, add a structure holding a set of operations for
  things like storing errors, copying in the aiocb structure, storing
  status, etc.  The 32-bit system calls use a separate operations vector to
  handle fuword32 vs fuword, etc.  Also, the oldsigevent handling is now
  done by having seperate operation vectors with different aiocb copyin
  routines.
- Split out kern_foo() functions for the various AIO system calls so the
  32-bit front ends can manage things like copying in and converting
  timespec structures, etc.
- For both the native and 32-bit aio_suspend() and lio_listio() calls,
  just use copyin() to read the array of aiocb pointers instead of using
  a for loop that iterated over fuword/fuword32.  The error handling in
  the old case was incomplete (lio_listio() just ignored any aiocb's that
  it got an EFAULT trying to read rather than reporting an error), and
  possibly slower.

MFC after:	1 month

Revision 1.112: download - view: text, markup, annotated - select for diffs
Sat Nov 29 14:32:14 2008 UTC (3 years, 2 months ago) by bz
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +1 -1 lines
SVN rev 185435 on 2008-11-29 14:32:14Z by bz

MFp4:
  Bring in updated jail support from bz_jail branch.

This enhances the current jail implementation to permit multiple
addresses per jail. In addtion to IPv4, IPv6 is supported as well.
Due to updated checks it is even possible to have jails without
an IP address at all, which basically gives one a chroot with
restricted process view, no networking,..

SCTP support was updated and supports IPv6 in jails as well.

Cpuset support permits jails to be bound to specific processor
sets after creation.

Jails can have an unrestricted (no duplicate protection, etc.) name
in addition to the hostname. The jail name cannot be changed from
within a jail and is considered to be used for management purposes
or as audit-token in the future.

DDB 'show jails' command was added to aid debugging.

Proper compat support permits 32bit jail binaries to be used on 64bit
systems to manage jails. Also backward compatibility was preserved where
possible: for jail v1 syscalls, as well as with user space management
utilities.

Both jail as well as prison version were updated for the new features.
A gap was intentionally left as the intermediate versions had been
used by various patches floating around the last years.

Bump __FreeBSD_version for the afore mentioned and in kernel changes.

Special thanks to:
- Pawel Jakub Dawidek (pjd) for his multi-IPv4 patches
  and Olivier Houchard (cognet) for initial single-IPv6 patches.
- Jeff Roberson (jeff) and Randall Stewart (rrs) for their
  help, ideas and review on cpuset and SCTP support.
- Robert Watson (rwatson) for lots and lots of help, discussions,
  suggestions and review of most of the patch at various stages.
- John Baldwin (jhb) for his help.
- Simon L. Nielsen (simon) as early adopter testing changes
  on cluster machines as well as all the testers and people
  who provided feedback the last months on freebsd-jail and
  other channels.
- My employer, CK Software GmbH, for the support so I could work on this.

Reviewed by:	(see above)
MFC after:	3 months (this is just so that I get the mail)
X-MFC Before:   7.2-RELEASE if possible

Revision 1.111: download - view: text, markup, annotated - select for diffs
Sun Nov 9 10:45:13 2008 UTC (3 years, 3 months ago) by ed
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +3 -5 lines
SVN rev 184789 on 2008-11-09 10:45:13Z by ed

Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4.

Looking at our source code history, it seems the uname(),
getdomainname() and setdomainname() system calls got deprecated
somewhere after FreeBSD 1.1, but they have never been phased out
properly. Because we don't have a COMPAT_FREEBSD1, just use
COMPAT_FREEBSD4.

Also fix the Linuxolator to build without the setdomainname() routine by
just making it call userland_sysctl on kern.domainname. Also replace the
setdomainname()'s implementation to use this approach, because we're
duplicating code with sysctl_domainname().

I wasn't able to keep these three routines working in our
COMPAT_FREEBSD32, because that would require yet another keyword for
syscalls.master (COMPAT4+NOPROTO). Because this routine is probably
unused already, this won't be a problem in practice. If it turns out to
be a problem, we'll just restore this functionality.

Reviewed by:	rdivacky, kib

Revision 1.110: download - view: text, markup, annotated - select for diffs
Mon Nov 3 10:38:00 2008 UTC (3 years, 3 months ago) by dfr
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +2 -0 lines
SVN rev 184588 on 2008-11-03 10:38:00Z by dfr

Implement support for RPCSEC_GSS authentication to both the NFS client
and server. This replaces the RPC implementation of the NFS client and
server with the newer RPC implementation originally developed
(actually ported from the userland sunrpc code) to support the NFS
Lock Manager.  I have tested this code extensively and I believe it is
stable and that performance is at least equal to the legacy RPC
implementation.

The NFS code currently contains support for both the new RPC
implementation and the older legacy implementation inherited from the
original NFS codebase. The default is to use the new implementation -
add the NFS_LEGACYRPC option to fall back to the old code. When I
merge this support back to RELENG_7, I will probably change this so
that users have to 'opt in' to get the new code.

To use RPCSEC_GSS on either client or server, you must build a kernel
which includes the KGSSAPI option and the crypto device. On the
userland side, you must build at least a new libc, mountd, mount_nfs
and gssd. You must install new versions of /etc/rc.d/gssd and
/etc/rc.d/nfsd and add 'gssd_enable=YES' to /etc/rc.conf.

As long as gssd is running, you should be able to mount an NFS
filesystem from a server that requires RPCSEC_GSS authentication. The
mount itself can happen without any kerberos credentials but all
access to the filesystem will be denied unless the accessing user has
a valid ticket file in the standard place (/tmp/krb5cc_<uid>). There
is currently no support for situations where the ticket file is in a
different place, such as when the user logged in via SSH and has
delegated credentials from that login. This restriction is also
present in Solaris and Linux. In theory, we could improve this in
future, possibly using Brooks Davis' implementation of variant
symlinks.

Supporting RPCSEC_GSS on a server is nearly as simple. You must create
service creds for the server in the form 'nfs/<fqdn>@<REALM>' and
install them in /etc/krb5.keytab. The standard heimdal utility ktutil
makes this fairly easy. After the service creds have been created, you
can add a '-sec=krb5' option to /etc/exports and restart both mountd
and nfsd.

The only other difference an administrator should notice is that nfsd
doesn't fork to create service threads any more. In normal operation,
there will be two nfsd processes, one in userland waiting for TCP
connections and one in the kernel handling requests. The latter
process will create as many kthreads as required - these should be
visible via 'top -H'. The code has some support for varying the number
of service threads according to load but initially at least, nfsd uses
a fixed number of threads according to the value supplied to its '-n'
option.

Sponsored by:	Isilon Systems
MFC after:	1 month

Revision 1.109: download - view: text, markup, annotated - select for diffs
Wed Oct 22 21:55:48 2008 UTC (3 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +2 -2 lines
SVN rev 184183 on 2008-10-22 21:55:48Z by jhb

Split the copyout of *base at the end of getdirentries() out leaving the
rest in kern_getdirentries().  Use kern_getdirentries() to implement
freebsd32_getdirentries().  This fixes a bug where calls to getdirentries()
in 32-bit binaries would trash the 4 bytes after the 'long base' in
userland.

Submitted by:	ups
MFC after:	1 week

Revision 1.108: download - view: text, markup, annotated - select for diffs
Thu Sep 25 20:07:42 2008 UTC (3 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +12 -12 lines
SVN rev 183361 on 2008-09-25 20:07:42Z by jhb

Tidy up a few things with syscall generation:
- Instead of using a syscall slot (370) just to get a function prototype
  for lkmressys(), add an explicit function prototype to <sys/sysent.h>.
  This also removes unused special case checks for 'lkmressys' from
  makesyscalls.sh.
- Instead of having magic logic in makesyscalls.sh to only generate a
  function prototype the first time 'lkmnosys' is seen, make 'NODEF'
  always not generate a function prototype and include an explicit
  prototype for 'lkmnosys' in <sys/sysent.h>.
- As a result of the fix in (2), update the LKM syscall entries in
  the freebsd32 syscall table to use 'lkmnosys' rather than 'nosys'.
- Use NOPROTO for the __syscall() entry (198) in the native ABI.  This
  avoids the need for magic logic in makesyscalls.h to only generate
  a function prototype the first time 'nosys' is encountered.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Mon Sep 22 16:09:16 2008 UTC (3 years, 4 months ago) by obrien
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +2 -2 lines
SVN rev 183270 on 2008-09-22 16:09:16Z by obrien

Add freebsd32 compat shims for ioctl(2)
MDIOCATTACH, MDIOCDETACH, MDIOCQUERY, and MDIOCLIST requests.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Fri Sep 19 15:17:32 2008 UTC (3 years, 4 months ago) by obrien
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +1 -1 lines
SVN rev 183188 on 2008-09-19 15:17:32Z by obrien

Add freebsd32 compat shim for nmount(2).
(and quiet some compiler warnings for vfs_donmount)

Revision 1.105: download - view: text, markup, annotated - select for diffs
Mon Sep 15 17:37:41 2008 UTC (3 years, 4 months ago) by obrien
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +1 -1 lines
SVN rev 183042 on 2008-09-15 17:37:41Z by obrien

Fix bug in r100384 (rev 1.2) in which the 32-bit swapon(2) was made
"obsolete, not included in system", where as the system call does exist.

Revision 1.104: download - view: text, markup, annotated - select for diffs
Sun Aug 24 21:20:35 2008 UTC (3 years, 5 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +1 -1 lines
SVN rev 182123 on 2008-08-24 21:20:35Z by rwatson

When MPSAFE ttys were merged, a new BSM audit event identifier was
allocated for posix_openpt(2).  Unfortunately, that identifier
conflicts with other events already allocated to other systems in
OpenBSM.  Assign a new globally unique identifier and conform
better to the AUE_ event naming scheme.

This is a stopgap until a new OpenBSM import is done with the
correct identifier, so we'll maintain this as a local diff in svn
until then.

Discussed with:	ed
Obtained from:	TrustedBSD Project

Revision 1.103: download - view: text, markup, annotated - select for diffs
Thu Aug 21 22:57:31 2008 UTC (3 years, 5 months ago) by obrien
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +7 -0 lines
SVN rev 181972 on 2008-08-21 22:57:31Z by obrien

Add comments on NOARGS, NODEF, and NOPROTO.

Revision 1.102: download - view: text, markup, annotated - select for diffs
Wed Aug 20 08:31:58 2008 UTC (3 years, 5 months ago) by ed
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +1 -0 lines
SVN rev 181905 on 2008-08-20 08:31:58Z by ed

Integrate the new MPSAFE TTY layer to the FreeBSD operating system.

The last half year I've been working on a replacement TTY layer for the
FreeBSD kernel. The new TTY layer was designed to improve the following:

- Improved driver model:

  The old TTY layer has a driver model that is not abstract enough to
  make it friendly to use. A good example is the output path, where the
  device drivers directly access the output buffers. This means that an
  in-kernel PPP implementation must always convert network buffers into
  TTY buffers.

  If a PPP implementation would be built on top of the new TTY layer
  (still needs a hooks layer, though), it would allow the PPP
  implementation to directly hand the data to the TTY driver.

- Improved hotplugging:

  With the old TTY layer, it isn't entirely safe to destroy TTY's from
  the system. This implementation has a two-step destructing design,
  where the driver first abandons the TTY. After all threads have left
  the TTY, the TTY layer calls a routine in the driver, which can be
  used to free resources (unit numbers, etc).

  The pts(4) driver also implements this feature, which means
  posix_openpt() will now return PTY's that are created on the fly.

- Improved performance:

  One of the major improvements is the per-TTY mutex, which is expected
  to improve scalability when compared to the old Giant locking.
  Another change is the unbuffered copying to userspace, which is both
  used on TTY device nodes and PTY masters.

Upgrading should be quite straightforward. Unlike previous versions,
existing kernel configuration files do not need to be changed, except
when they reference device drivers that are listed in UPDATING.

Obtained from:		//depot/projects/mpsafetty/...
Approved by:		philip (ex-mentor)
Discussed:		on the lists, at BSDCan, at the DevSummit
Sponsored by:		Snow B.V., the Netherlands
dcons(4) fixed by:	kan

Revision 1.101: download - view: text, markup, annotated - select for diffs
Thu Jul 10 17:45:57 2008 UTC (3 years, 7 months ago) by brooks
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +13 -7 lines
SVN rev 180433 on 2008-07-10 17:45:57Z by brooks

id_t is a 64-bit integer and thus is passed as two arguments like off_t is.
As a result, those arguments must be recombined before calling the real
syscal implementation.  This change fixes 32-bit compatibility for
cpuset_getid(), cpuset_setid(), cpuset_getaffinity(), and
cpuset_setaffinity().

Revision 1.100: download - view: text, markup, annotated - select for diffs
Mon Mar 31 12:08:30 2008 UTC (3 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +30 -0 lines
Add the freebsd32 compatibility shims for the *at() syscalls.

Reviewed by:	rwatson, rdivacky
Tested by:	pho

Revision 1.99: download - view: text, markup, annotated - select for diffs
Wed Mar 26 15:23:07 2008 UTC (3 years, 10 months ago) by dfr
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +2 -1 lines
Add the new kernel-mode NFS Lock Manager. To use it instead of the
user-mode lock manager, build a kernel with the NFSLOCKD option and
add '-k' to 'rpc_lockd_flags' in rc.conf.

Highlights include:

* Thread-safe kernel RPC client - many threads can use the same RPC
  client handle safely with replies being de-multiplexed at the socket
  upcall (typically driven directly by the NIC interrupt) and handed
  off to whichever thread matches the reply. For UDP sockets, many RPC
  clients can share the same socket. This allows the use of a single
  privileged UDP port number to talk to an arbitrary number of remote
  hosts.

* Single-threaded kernel RPC server. Adding support for multi-threaded
  server would be relatively straightforward and would follow
  approximately the Solaris KPI. A single thread should be sufficient
  for the NLM since it should rarely block in normal operation.

* Kernel mode NLM server supporting cancel requests and granted
  callbacks. I've tested the NLM server reasonably extensively - it
  passes both my own tests and the NFS Connectathon locking tests
  running on Solaris, Mac OS X and Ubuntu Linux.

* Userland NLM client supported. While the NLM server doesn't have
  support for the local NFS client's locking needs, it does have to
  field async replies and granted callbacks from remote NLMs that the
  local client has contacted. We relay these replies to the userland
  rpc.lockd over a local domain RPC socket.

* Robust deadlock detection for the local lock manager. In particular
  it will detect deadlocks caused by a lock request that covers more
  than one blocking request. As required by the NLM protocol, all
  deadlock detection happens synchronously - a user is guaranteed that
  if a lock request isn't rejected immediately, the lock will
  eventually be granted. The old system allowed for a 'deferred
  deadlock' condition where a blocked lock request could wake up and
  find that some other deadlock-causing lock owner had beaten them to
  the lock.

* Since both local and remote locks are managed by the same kernel
  locking code, local and remote processes can safely use file locks
  for mutual exclusion. Local processes have no fairness advantage
  compared to remote processes when contending to lock a region that
  has just been unlocked - the local lock manager enforces a strict
  first-come first-served model for both local and remote lockers.

Sponsored by:	Isilon Systems
PR:		95247 107555 115524 116679
MFC after:	2 weeks

Revision 1.98: download - view: text, markup, annotated - select for diffs
Tue Mar 25 19:34:47 2008 UTC (3 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +12 -0 lines
Add entries for the cpuset-related system calls.  The existing system calls
can be used on little endian systems.

Pointy hat to:	jeff

Revision 1.97: download - view: text, markup, annotated - select for diffs
Wed Mar 12 10:11:56 2008 UTC (3 years, 11 months ago) by jeff
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +5 -7 lines
Remove kernel support for M:N threading.

While the KSE project was quite successful in bringing threading to
FreeBSD, the M:N approach taken by the kse library was never developed
to its full potential.  Backwards compatibility will be provided via
libmap.conf for dynamically linked binaries and static binaries will
be broken.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Tue Feb 12 20:09:03 2008 UTC (3 years, 11 months ago) by ru
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +2 -2 lines
Change readlink(2)'s return type and type of the last argument
to match POSIX.

Prodded by:	Alexey Lyashkov

Revision 1.95: download - view: text, markup, annotated - select for diffs
Sun Jan 20 23:43:06 2008 UTC (4 years ago) by rwatson
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +2 -2 lines
Use audit events AUE_SHMOPEN and AUE_SHMUNLINK with new system calls
shm_open() and shm_unlink().  More auditing will need to be done for
these calls to capture arguments properly.

Revision 1.94: download - view: text, markup, annotated - select for diffs
Tue Jan 8 21:58:14 2008 UTC (4 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +3 -0 lines
Add a new file descriptor type for IPC shared memory objects and use it to
implement shm_open(2) and shm_unlink(2) in the kernel:
- Each shared memory file descriptor is associated with a swap-backed vm
  object which provides the backing store.  Each descriptor starts off with
  a size of zero, but the size can be altered via ftruncate(2).  The shared
  memory file descriptors also support fstat(2).  read(2), write(2),
  ioctl(2), select(2), poll(2), and kevent(2) are not supported on shared
  memory file descriptors.
- shm_open(2) and shm_unlink(2) are now implemented as system calls that
  manage shared memory file descriptors.  The virtual namespace that maps
  pathnames to shared memory file descriptors is implemented as a hash
  table where the hash key is generated via the 32-bit Fowler/Noll/Vo hash
  of the pathname.
- As an extension, the constant 'SHM_ANON' may be specified in place of the
  path argument to shm_open(2).  In this case, an unnamed shared memory
  file descriptor will be created similar to the IPC_PRIVATE key for
  shmget(2).  Note that the shared memory object can still be shared among
  processes by sharing the file descriptor via fork(2) or sendmsg(2), but
  it is unnamed.  This effectively serves to implement the getmemfd() idea
  bandied about the lists several times over the years.
- The backing store for shared memory file descriptors are garbage
  collected when they are not referenced by any open file descriptors or
  the shm_open(2) virtual namespace.

Submitted by:	dillon, peter (previous versions)
Submitted by:	rwatson (I based this on his version)
Reviewed by:	alc (suggested converting getmemfd() to shm_open())

Revision 1.93: download - view: text, markup, annotated - select for diffs
Thu Dec 6 23:36:57 2007 UTC (4 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +4 -4 lines
Add freebsd32 compat wrappers for msgctl() and __semctl() using
kern_msgctl() and kern_semctl().

MFC after:	1 week

Revision 1.92: download - view: text, markup, annotated - select for diffs
Thu Dec 6 23:11:27 2007 UTC (4 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +1 -0 lines
Move several data structure definitions out of freebsd32_misc.c and into
freebsd32.h instead.

MFC after:	1 week

Revision 1.91: download - view: text, markup, annotated - select for diffs
Thu Aug 16 05:30:04 2007 UTC (4 years, 5 months ago) by davidxu
Branches: MAIN
CVS tags: RELENG_7_BP, RELENG_7
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +1 -0 lines
Add thr_kill2 compat32 syscall.

Submitted by: Tijl Coosemans tijl at ulyssis dot org
Approved by: re (kensmith)

Revision 1.90: download - view: text, markup, annotated - select for diffs
Wed Jul 4 23:02:40 2007 UTC (4 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +22 -6 lines
Add i386 emulation wrappers for mmap/lseek/etc.  These use COMPAT6, so
you must use the already existing, already in generic, COMPAT_FREEBSD6
kernel option for running old 32 bit binaries.

Approved by:  re (kensmith)

Revision 1.89: download - view: text, markup, annotated - select for diffs
Fri Jun 15 21:54:26 2007 UTC (4 years, 7 months ago) by emaste
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +0 -3 lines
Remove stale 'XXX implement' comments for syscalls which have since been
implemented.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Wed Dec 20 19:36:03 2006 UTC (5 years, 1 month ago) by jkim
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +2 -2 lines
MFP4: (part of) 110058

Fix 32-bit msgsnd(3) and msgrcv(3) emulations for amd64.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Fri Nov 3 21:21:28 2006 UTC (5 years, 3 months ago) by ru
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +6 -6 lines
Fix build breakage introduced in previous commit (redeclatation
of sctp functions).

Revision 1.86: download - view: text, markup, annotated - select for diffs
Fri Nov 3 15:23:12 2006 UTC (5 years, 3 months ago) by rrs
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +10 -0 lines
Ok, here it is, we finally add SCTP to current. Note that this
work is not just mine, but it is also the works of Peter Lei
and Michael Tuexen. They both are my two key other developers
working on the project.. and they need ata-boy's too:
****
peterlei@cisco.com
tuexen@fh-muenster.de
****
I did do a make sysent which updated the
syscall's and sysproto.. I hope that is correct... without
it you don't build since we have new syscalls for SCTP :-0

So go out and look at the NOTES, add
option SCTP (make sure inet and inet6 are present too)
and play with SCTP.

I will see about comitting some test tools I have after I
figure out where I should place them. I also have a
lib (libsctp.a) that adds some of the missing socketapi
functions that I need to put into lib's.. I will talk
to George about this :-)

There may still be some 64 bit issues in here, none of
us have a 64 bit processor to test with yet.. Michael
may have a MAC but thats another beast too..

If you have a mac and want to use SCTP contact Michael
he maintains a web site with a loadable module with
this code :-)

Reviewed by:	gnn
Approved by:	gnn

Revision 1.85: download - view: text, markup, annotated - select for diffs
Tue Oct 24 17:24:11 2006 UTC (5 years, 3 months ago) by sobomax
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +9 -9 lines
Fix kernel breakage introduced in the previous commit (redeclatation
of the audit functions).

Revision 1.84: download - view: text, markup, annotated - select for diffs
Tue Oct 24 13:49:44 2006 UTC (5 years, 3 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +15 -9 lines
Hook up audit functions in the freebsd32 compatibility code.  It is
believed these likely don't require wrappers.

Reported by:	sobomax
MFC after:	3 days

Revision 1.83: download - view: text, markup, annotated - select for diffs
Tue Oct 17 02:28:26 2006 UTC (5 years, 3 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +1 -1 lines
Sync with master.

Revision 1.82: download - view: text, markup, annotated - select for diffs
Fri Oct 6 08:22:08 2006 UTC (5 years, 4 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +2 -2 lines
Implement 32bit umtx_lock and umtx_unlock system calls, these two system
calls are not used by libthr in RELENG_6 and HEAD, it is only used by
the libthr in RELENG-5, the _umtx_op system call can do more incremental
dirty works than these two system calls without having to introduce new
system calls or throw away old system calls when things are going on.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Thu Oct 5 01:56:10 2006 UTC (5 years, 4 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +5 -4 lines
Move some declaration of 32-bit signal structures into file
freebsd32-signal.h, implement sigtimedwait and sigwaitinfo system calls.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Tue Oct 3 20:48:03 2006 UTC (5 years, 4 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +1 -1 lines
Change getpagesize() system call audit event to more clearly indicate
that we don't audit it.

MFC after:	3 days
Obtained from:	TrustedBSD Project

Revision 1.79: download - view: text, markup, annotated - select for diffs
Sat Sep 23 00:27:11 2006 UTC (5 years, 4 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +2 -1 lines
Enable sigwait.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Fri Sep 22 15:04:28 2006 UTC (5 years, 4 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +6 -5 lines
Add compatible code to let 32bit libthr work on 64bit kernel.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Fri Sep 22 00:52:54 2006 UTC (5 years, 4 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +3 -1 lines
Add umtx support for 32bit process on AMD64 machine.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Thu Sep 21 04:49:36 2006 UTC (5 years, 4 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +4 -9 lines
sync with master.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Sun Sep 17 13:28:11 2006 UTC (5 years, 4 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +1 -1 lines
AUE_SIGALTSTACK instead of AUE_SIGPENDING for sigaltstack().

Obtained from:	TrustedBSD Project
MFC after:	3 days

Revision 1.74: download - view: text, markup, annotated - select for diffs
Sat Sep 9 01:22:13 2006 UTC (5 years, 5 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +12 -5 lines
The following functions need not to be reimplemented, reuse 64bit
syscalls instead:
sigqueue, thr_set_name, thr_setscheduler, thr_getscheduler,
thr_setschedparam.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Sun Sep 3 16:17:49 2006 UTC (5 years, 5 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +49 -47 lines
Set freebsd32 system call event identifiers for:

- old truncate, ftruncate
- old getpeername, gethostid, sethostid, getrlimit, setrlimit, killpg.
- old quota, getsockname, getdirentries.
- lgetfh
- old getdomainname, setdomainname
- sysarch, rtprio, __getcwd, jail, sigtimedwait
- extattrctl, extattr_{get,set,delete,list}_{file,fd,link}
- getresgid, getresuid, kqueue, eaccess, nmount, sendfile
- fhstatfs, kldunloadf

Right identifiers for:

- nfssvc

Remove incorrect identifier for:

- __acl_get_file

Compile tested with help of:	sam
Obtained from:	TrustedBSD Project

Revision 1.72: download - view: text, markup, annotated - select for diffs
Sun Sep 3 13:47:24 2006 UTC (5 years, 5 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +1 -1 lines
Use AUE_NTP_ADJTIME instead of AUE_ADJTIME for ntp_adjtime().

Obtained from:	TrustedBSD Project

Revision 1.71: download - view: text, markup, annotated - select for diffs
Wed Aug 16 22:32:50 2006 UTC (5 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +2 -0 lines
Grab two syscall numbers.  One is used to emulate functionality that linux
has in its procfs (do a readlink of /proc/self/fd/<nn> to find the pathname
that corresponds to a given file descriptor).  Valgrind-3.x needs this
functionality.  This is a placeholder only at this time.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Fri Jul 28 19:05:26 2006 UTC (5 years, 6 months ago) by jhb
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +269 -273 lines
Now that all system calls are MPSAFE, retire the SYF_MPSAFE flag used to
mark system calls as being MPSAFE:
- Stop conditionally acquiring Giant around system call invocations.
- Remove all of the 'M' prefixes from the master system call files.
- Remove support for the 'M' prefix from the script that generates the
  syscall-related files from the master system call files.
- Don't explicitly set SYF_MPSAFE when registering nfssvc.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Fri Jul 28 18:55:18 2006 UTC (5 years, 6 months ago) by jhb
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +4 -3 lines
Various fixes to comments in the syscall master files including removing
cruft from the audit import and adding mention of COMPAT4 to freebsd32.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Fri Jul 14 01:57:09 2006 UTC (5 years, 6 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +11 -6 lines
sync with master.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Tue Jun 27 14:46:30 2006 UTC (5 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +3 -3 lines
- Expand the scope of Giant some in mount(2) to protect the vfsp structure
  from going away.  mount(2) is now MPSAFE.
- Expand the scope of Giant some in unmount(2) to protect the mp structure
  (or rather, to handle concurrent unmount races) from going away.
  umount(2) is now MPSAFE, as well as linux_umount() and linux_oldumount().
- nmount(2) and linux_mount() were already MPSAFE.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Mon Jun 26 18:35:57 2006 UTC (5 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +10 -10 lines
- Sync with master: rmdir(), mkdir(), and extattr_*() are all MPSAFE.
- freebsd32_utimes() is MPSAFE.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Thu Mar 30 07:42:32 2006 UTC (5 years, 10 months ago) by ps
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +3 -3 lines
Properly support for FreeBSD 4 32bit System V shared memory.

Submitted by:	peter
Obtained from:	Yahoo!
MFC after:	3 weeks

Revision 1.64: download - view: text, markup, annotated - select for diffs
Tue Feb 28 19:39:17 2006 UTC (5 years, 11 months ago) by ps
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +2 -2 lines
Fix 32bit sendfile by implementing kern_sendfile so that it takes
the header and trailers as iovec arguments instead of copying them
in inside of sendfile.

Reviewed by:	jhb
MFC after:	3 weeks

Revision 1.63: download - view: text, markup, annotated - select for diffs
Sat Feb 4 13:28:55 2006 UTC (6 years ago) by rwatson
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +216 -216 lines
Audit FreeBSD 32-bit system calls on 64-bit FreeBSD systems.

Obtained from:	TrustedBSD Project

Revision 1.62: download - view: text, markup, annotated - select for diffs
Fri Jan 20 16:22:06 2006 UTC (6 years ago) by ambrisko
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +2 -2 lines
Add 32bit version of lutimes so untar doesn't mess up sym-links on amd64.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Fri Dec 23 20:06:14 2005 UTC (6 years, 1 month ago) by ru
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +1 -1 lines
Fix build.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Fri Dec 23 11:56:39 2005 UTC (6 years, 1 month ago) by phk
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +8 -0 lines
Add missing 455-462 syscalls as unimplemented

Revision 1.59: download - view: text, markup, annotated - select for diffs
Fri Dec 23 11:54:11 2005 UTC (6 years, 1 month ago) by phk
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +1 -0 lines
Add abort2() systemcall.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Thu Dec 8 22:14:25 2005 UTC (6 years, 2 months ago) by ambrisko
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +2 -1 lines
Add 32bit version of futimes so untar doesn't result in bad dates
(Jan 1, 1970) when run on amd64.

Reviewed by:	ps

Revision 1.57: download - view: text, markup, annotated - select for diffs
Wed Oct 26 22:19:51 2005 UTC (6 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +10 -13 lines
There is no 'freebsd3_' prefix for COMPAT_43 syscalls.  Those are all
bundled under MCOMPAT and have an 'o' prefix.  Adjust as appropriate.
This re-enables compiling without COMPAT_43 again.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Sun Oct 23 10:43:14 2005 UTC (6 years, 3 months ago) by ps
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +18 -8 lines
Implement for FreeBSD 3 32 binaries:
sigaction, sigprocmask, sigpending, sigvec, sigblock, sigsetmask,
sigsuspend, sigstack

Revision 1.55: download - view: text, markup, annotated - select for diffs
Sat Oct 15 05:57:06 2005 UTC (6 years, 3 months ago) by ps
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +6 -5 lines
Implement the 32bit versions of recvmsg, recvfrom, sendmsg

Partially obtained from:	jhb

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sat Oct 15 02:54:18 2005 UTC (6 years, 3 months ago) by ps
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +6 -6 lines
Implement 32bit wrappers for clock_gettime, clock_settime, and
clock_getres.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sat Oct 15 02:40:10 2005 UTC (6 years, 3 months ago) by ps
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +2 -2 lines
Correct the prototype for freebsd32_nanosleep and use the proper
size when copying struct timespec32 in and out.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Tue Sep 27 18:04:20 2005 UTC (6 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +7 -6 lines
Implement 32 bit getcontext/setcontext/swapcontext on amd64.  I've added
stubs for ia64 to keep it compiling.  These are used by 32 bit apps such
as gdb.

Revision 1.40.2.5: download - view: text, markup, annotated - select for diffs
Thu Jul 14 19:08:22 2005 UTC (6 years, 6 months ago) by jhb
Branches: RELENG_5
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5
Diff to: previous 1.40.2.4: preferred, colored; branchpoint 1.40: preferred, colored; next MAIN 1.41: preferred, colored
Changes since revision 1.40.2.4: +7 -2 lines
MFC: Add the preadv() and pwritev() system calls.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Wed Jul 13 20:32:42 2005 UTC (6 years, 6 months ago) by jhb
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +78 -78 lines
Make a pass through all the compat ABIs sychronizing the MP safe flags
with the master syscall table as well as marking several ABI wrapper
functions safe.

MFC after:	1 week

Revision 1.50: download - view: text, markup, annotated - select for diffs
Thu Jul 7 18:17:55 2005 UTC (6 years, 7 months ago) by jhb
Branches: MAIN
CVS tags: RELENG_6_BP, RELENG_6
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +9 -2 lines
- Add two new system calls: preadv() and pwritev() which are like readv()
  and writev() except that they take an additional offset argument and do
  not change the current file position.  In SAT speak:
  preadv:readv::pread:read and pwritev:writev::pwrite:write.
- Try to reduce code duplication some by merging most of the old
  kern_foov() and dofilefoo() functions into new dofilefoo() functions
  that are called by kern_foov() and kern_pfoov().  The non-v functions
  now all generate a simple uio on the stack from the passed in arguments
  and then call kern_foov().  For example, read() now just builds a uio and
  calls kern_readv() and pwrite() just builds a uio and calls kern_pwritev().

PR:		kern/80362
Submitted by:	Marc Olzheim marcolz at stack dot nl (1)
Approved by:	re (scottl)
MFC after:	1 week

Revision 1.49: download - view: text, markup, annotated - select for diffs
Mon May 30 15:09:17 2005 UTC (6 years, 8 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +640 -534 lines
Introduce a new field in the syscalls.master file format to hold the
audit event identifier associated with each system call, which will
be stored by makesyscalls.sh in the sy_auevent field of struct sysent.
For now, default the audit identifier on all system calls to AUE_NULL,
but in the near future, other BSM event identifiers will be used.  The
mapping of system calls to event identifiers is many:one due to
multiple system calls that map to the same end functionality across
compatibility wrappers, ABI wrappers, etc.

Submitted by:	wsalamon
Obtained from:	TrustedBSD Project

Revision 1.40.2.4: download - view: text, markup, annotated - select for diffs
Thu Apr 21 21:11:24 2005 UTC (6 years, 9 months ago) by ps
Branches: RELENG_5
Diff to: previous 1.40.2.3: preferred, colored; branchpoint 1.40: preferred, colored
Changes since revision 1.40.2.3: +3 -3 lines
MFC:
Use kern_kevent instead of the stackgap for 32bit syscall wrapping
and correct the freebsd32_kevent prototype.

Revision 1.40.2.3: download - view: text, markup, annotated - select for diffs
Tue Mar 1 17:51:25 2005 UTC (6 years, 11 months ago) by ps
Branches: RELENG_5
CVS tags: RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4
Diff to: previous 1.40.2.2: preferred, colored; branchpoint 1.40: preferred, colored
Changes since revision 1.40.2.2: +1 -1 lines
MFC: rev 1.47. Use msync() to implement msync() for freebsd32 emulation.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Tue Mar 1 06:32:53 2005 UTC (6 years, 11 months ago) by ps
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +3 -3 lines
Correct the freebsd32_kevent prototype.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Thu Feb 24 18:24:16 2005 UTC (6 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +1 -1 lines
Use msync() to implement msync() for freebsd32 emulation.  This isn't quite
right for certain MAP_FIXED mappings on ia64 but it will work fine for all
other mappings and works fine on amd64.

Requested by:	ps, Christian Zander
MFC after:	1 week

Revision 1.40.2.2: download - view: text, markup, annotated - select for diffs
Sun Feb 20 14:43:45 2005 UTC (6 years, 11 months ago) by ps
Branches: RELENG_5
Diff to: previous 1.40.2.1: preferred, colored; branchpoint 1.40: preferred, colored
Changes since revision 1.40.2.1: +2 -2 lines
MFC: Add 32bit compat syscall for nanosleep and MFC the 32bit compat
syscall for modstat.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Wed Jan 19 17:53:06 2005 UTC (7 years ago) by ps
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +1 -1 lines
Add a 32bit syscall wrapper for modstat

Obtained from:	Yahoo!

Revision 1.45: download - view: text, markup, annotated - select for diffs
Wed Jan 19 17:44:59 2005 UTC (7 years ago) by ps
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +1 -1 lines
- rename nanosleep1 to kern_nanosleep
- Add a 32bit syscall entry for nanosleep

Reviewed by:	peter
Obtained from:	Yahoo!

Revision 1.44: download - view: text, markup, annotated - select for diffs
Tue Jan 4 18:53:32 2005 UTC (7 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +9 -8 lines
Partial sync up to the master syscalls.master file:
- Mark mount, unmount and nmount MPSAFE.
- Add a stub for _umtx_op().
- Mark open(), link(), unlink(), and freebsd32_sigaction() MPSAFE.

Pointy hats to:	several

Revision 1.43: download - view: text, markup, annotated - select for diffs
Thu Nov 18 23:54:26 2004 UTC (7 years, 2 months ago) by marks
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +1 -1 lines
32-bit FreeBSD ABI compatibility stubs from syscalls.master:1.179

Reviewed by:	imp, phk, njl, peter
Approved by:	njl

Revision 1.42: download - view: text, markup, annotated - select for diffs
Sat Oct 23 20:04:56 2004 UTC (7 years, 3 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +9 -0 lines
32-bit FreeBSD ABI compatibility stubs from syscalls.master:1.178.

Revision 1.40.2.1: download - view: text, markup, annotated - select for diffs
Sat Oct 9 15:12:33 2004 UTC (7 years, 4 months ago) by mtm
Branches: RELENG_5
CVS tags: RELENG_5_3_BP, RELENG_5_3_0_RELEASE, RELENG_5_3
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +1 -1 lines
MFC:

Revision 1.15: download - view: text, markup, annotated - select for diffs
Fri Oct 8 14:48:02 2004 UTC (7 years, 4 months ago) by mtm
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +1 -4 lines
Change swapoff from MNOPROTO to UNIMPL. The former doesn't work.
Remove a reference to a non-existent syscall: _thr_exit(). The
actual name is thr_exit(). How this ever worked is beyond me.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Fri Oct 8 14:48:02 2004 UTC (7 years, 4 months ago) by mtm
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +1 -4 lines
Change swapoff from MNOPROTO to UNIMPL. The former doesn't work.
Remove a reference to a non-existent syscall: _thr_exit(). The
actual name is thr_exit(). How this ever worked is beyond me.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Wed Oct 6 14:20:57 2004 UTC (7 years, 4 months ago) by mtm
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +1 -1 lines
Close a race between a thread exiting and the freeing of it's stack.
After some discussion the best option seems to be to signal the thread's
death from within the kernel. This requires that thr_exit() take an
argument.

Discussed with: davidxu, deischen, marcel
MFC after: 3 days

Revision 1.14: download - view: text, markup, annotated - select for diffs
Wed Oct 6 14:20:57 2004 UTC (7 years, 4 months ago) by mtm
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -3 lines
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
Close a race between a thread exiting and the freeing of it's stack.
After some discussion the best option seems to be to signal the thread's
death from within the kernel. This requires that thr_exit() take an
argument.

Discussed with: davidxu, deischen, marcel
MFC after: 3 days

Revision 1.14: download - view: text, markup, annotated - select for diffs
Wed Oct 6 14:20:57 2004 UTC (7 years, 4 months ago) by mtm
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -3 lines
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
Close a race between a thread exiting and the freeing of it's stack.
After some discussion the best option seems to be to signal the thread's
death from within the kernel. This requires that thr_exit() take an
argument.

Discussed with: davidxu, deischen, marcel
MFC after: 3 days

Revision 1.40: download - view: text, markup, annotated - select for diffs
Wed Jul 14 00:03:30 2004 UTC (7 years, 6 months ago) by peter
Branches: MAIN
CVS tags: RELENG_5_BP
Branch point for: RELENG_5
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +1 -1 lines
Unmapped syscalls should be NOPROTO so that we don't get a duplicate
prototype.  (kldunloadf in this case)

Revision 1.39: download - view: text, markup, annotated - select for diffs
Tue Jul 13 19:35:11 2004 UTC (7 years, 6 months ago) by phk
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +3 -2 lines
Add kldunloadf() system call.  Stay tuned for follwing commit messages.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri Jul 2 00:35:52 2004 UTC (7 years, 7 months ago) by marcel
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +4 -4 lines
Change the thread ID (thr_id_t) used for 1:1 threading from being a
pointer to the corresponding struct thread to the thread ID (lwpid_t)
assigned to that thread. The primary reason for this change is that
libthr now internally uses the same ID as the debugger and the kernel
when referencing to a kernel thread. This allows us to implement the
support for debugging without additional translations and/or mappings.

To preserve the ABI, the 1:1 threading syscalls, including the umtx
locking API have not been changed to work on a lwpid_t. Instead the
1:1 threading syscalls operate on long and the umtx locking API has
not been changed except for the contested bit. Previously this was
the least significant bit. Now it's the most significant bit. Since
the contested bit should not be tested by userland, this change is
not expected to be visible. Just to be sure, UMTX_CONTESTED has been
removed from <sys/umtx.h>.

Reviewed by: mtm@
ABI preservation tested on: i386, ia64

Revision 1.37: download - view: text, markup, annotated - select for diffs
Wed Apr 14 23:17:37 2004 UTC (7 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +13 -10 lines
Catch up to the not-so-recent statfs(2) changes.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat Mar 27 14:30:42 2004 UTC (7 years, 10 months ago) by mtm
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +2 -0 lines
Separate thread synchronization from signals in libthr. Instead
use msleep() and wakeup_one().

Discussed with: jhb, peter, tjr

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sat Feb 21 23:37:33 2004 UTC (7 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +1 -1 lines
Try and make the compat sigreturn prototypes closer to reality.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Tue Feb 3 05:18:48 2004 UTC (8 years ago) by deischen
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +1 -0 lines
Sync with kern/syscalls.master.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Wed Jan 28 23:45:37 2004 UTC (8 years ago) by peter
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -2 lines
Add getitimer swab stub

Revision 1.32: download - view: text, markup, annotated - select for diffs
Tue Dec 23 04:07:22 2003 UTC (8 years, 1 month ago) by peter
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +521 -551 lines
GC unused namespc column.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Tue Dec 23 03:21:06 2003 UTC (8 years, 1 month ago) by peter
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +1 -1 lines
freebsd32_fstat(2) is now MPSAFE

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Dec 23 02:48:11 2003 UTC (8 years, 1 month ago) by peter
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +3 -3 lines
Eliminate stackgap usage for the (woefully incomplete) path translations
since it isn't needed here anymore.
Use standard open(2)/access(2) and chflags(2) syscalls now.

Revision 1.26.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 13 22:18:27 2003 UTC (8 years, 1 month ago) by peter
Branches: RELENG_5_2
CVS tags: RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE
Diff to: previous 1.26: preferred, colored; next MAIN 1.27: preferred, colored
Changes since revision 1.26: +8 -9 lines
MFC: 1.27-1.28: sync up syscalls list

Revision 1.29: download - view: text, markup, annotated - select for diffs
Thu Dec 11 02:36:07 2003 UTC (8 years, 2 months ago) by peter
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +1 -1 lines
Mark freebsd32_gettimeofday() as mpsafe

Revision 1.28: download - view: text, markup, annotated - select for diffs
Wed Dec 10 22:33:27 2003 UTC (8 years, 2 months ago) by peter
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +4 -1 lines
Add missing extattr_list_fd(), extattr_list_file(), extattr_list_link()
and kse_switchin() syscall slots.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Wed Dec 10 22:31:46 2003 UTC (8 years, 2 months ago) by peter
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +4 -8 lines
The osigpending, oaccept, orecvfrom and ogetdirentries entries were
accidently being compiled in as standard.  These are part of the
set of unimplemented COMPAT_43 syscall set.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat Nov 8 07:31:30 2003 UTC (8 years, 3 months ago) by peter
Branches: MAIN
CVS tags: RELENG_5_2_BP
Branch point for: RELENG_5_2
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +12 -1 lines
"implement" vfork().  Add comments next to the other syscalls that need
to be implemented.  This is enough to run i386 /bin/tcsh.  /bin/sh is still
not happy because of some strange job control problem.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Fri Nov 7 20:29:53 2003 UTC (8 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +9 -9 lines
Sync with global syscalls.master by marking ptrace(), dup(), pipe(),
ktrace(), freebsd32_sigaltstack(), sysarch(), issetugid(), utrace(), and
freebsd32_sigaction() as MP safe.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Fri Aug 22 22:51:48 2003 UTC (8 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +60 -48 lines
Begin attempting to consolidate the two different i386 emulations
on ia64 and amd64.  I'm attempting to keep the generic 32bit-on-64bit
binary support seperate from the i386 support and the MD backend support.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu Aug 21 03:48:05 2003 UTC (8 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -2 lines
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.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Wed May 14 04:10:49 2003 UTC (8 years, 9 months ago) by peter
Branches: MAIN
CVS tags: old_RELENG_5_1_BP, old_RELENG_5_1_0_RELEASE, old_RELENG_5_1
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +9 -7 lines
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)

Revision 1.21: download - view: text, markup, annotated - select for diffs
Fri Apr 25 15:59:18 2003 UTC (8 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +7 -7 lines
Oops, the thr_* and jail_attach() syscall entries should be NOPROTO rather
than STD.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu Apr 24 20:49:46 2003 UTC (8 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +4 -4 lines
Fix the thr_create() entry by adding a trailing \.  Also, sync up the
MP safe flag for thr_* with the main table.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Wed Apr 9 02:55:18 2003 UTC (8 years, 10 months ago) by mike
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +1 -0 lines
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

Revision 1.18: download - view: text, markup, annotated - select for diffs
Tue Apr 1 01:15:56 2003 UTC (8 years, 10 months ago) by jeff
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +8 -0 lines
 - Add thr and umtx system calls.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Mon Mar 31 23:36:40 2003 UTC (8 years, 10 months ago) by jeff
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +1 -0 lines
 - Add a placeholder for sigwait

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Dec 29 20:33:26 2002 UTC (9 years, 1 month ago) by rwatson
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +4 -0 lines
Synchronize to kern/syscalls.master:1.139.

Obtained from:	TrustedBSD Project

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Nov 16 15:15:17 2002 UTC (9 years, 2 months ago) by deischen
Branches: MAIN
CVS tags: old_old_RELENG_5_0_BP, old_old_RELENG_5_0_0_RELEASE, old_old_RELENG_5_0
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +3 -0 lines
Add *context() syscalls to ia64 32-bit compatability table as requested
in kern/syscalls.master.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat Nov 2 23:55:30 2002 UTC (9 years, 3 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +1 -1 lines
Sync to src/sys/kern/syscalls.master

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Oct 19 22:25:31 2002 UTC (9 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -0 lines
Stake a claim on 418 (__xstat), 419 (__xfstat), 420 (__xlstat)

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sat Oct 19 22:09:23 2002 UTC (9 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -0 lines
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.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sat Oct 19 21:06:57 2002 UTC (9 years, 3 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +1 -0 lines
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

Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Oct 9 22:40:02 2002 UTC (9 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +1 -1 lines
Sigh. Fix fat-fingering of diff.  I knew this was going to happen.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed Oct 9 22:27:24 2002 UTC (9 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +4 -2 lines
Try and deal with the #ifdef COMPAT_FREEBSD4 sendfile stuff.  This would
have been a lot easier if do_sendfile() was usable externally.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Wed Oct 9 22:14:35 2002 UTC (9 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +19 -19 lines
Try and patch up some tab-to-space spammage.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Wed Oct 9 22:10:23 2002 UTC (9 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +22 -0 lines
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.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Wed Oct 2 16:48:15 2002 UTC (9 years, 4 months ago) by archie
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +1 -1 lines
Let kse_wakeup() take a KSE mailbox pointer argument.

Reviewed by:	julian

Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed Sep 25 18:10:38 2002 UTC (9 years, 4 months ago) by archie
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +4 -4 lines
Make the following name changes to KSE related functions, etc., to better
represent their purpose and minimize namespace conflicts:

	kse_fn_t		-> kse_func_t
	struct thread_mailbox	-> struct kse_thr_mailbox
	thread_interrupt()	-> kse_thr_interrupt()
	kse_yield()		-> kse_release()
	kse_new()		-> kse_create()

Add missing declaration of kse_thr_interrupt() to <sys/kse.h>.
Regenerate the various generated syscall files. Minor style fixes.

Reviewed by:	julian

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sat Jul 20 02:56:10 2002 UTC (9 years, 6 months ago) by peter
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +330 -329 lines
Infrastructure tweaks to allow having both an Elf32 and an Elf64 executable
handler in the kernel at the same time.  Also, allow for the
exec_new_vmspace() code to build a different sized vmspace depending on
the executable environment.  This is a big help for execing i386 binaries
on ia64.   The ELF exec code grows the ability to map partial pages when
there is a page size difference, eg: emulating 4K pages on 8K or 16K
hardware pages.

Flesh out the i386 emulation support for ia64.  At this point, the only
binary that I know of that fails is cvsup, because the cvsup runtime
tries to execute code in pages not marked executable.

Obtained from:  dfr (mostly, many tweaks from me).

Revision 1.1: download - view: text, markup, annotated - select for diffs
Wed Apr 10 19:34:51 2002 UTC (9 years, 10 months ago) by dfr
Branches: MAIN
Initial support for executing IA-32 binaries. This will not compile
without a few patches for the rest of the kernel to allow the image
activator to override exec_copyout_strings and setregs.

None of the syscall argument translation has been done. Possibly, this
translation layer can be shared with any platform that wants to support
running ILP32 binaries on an LP64 host (e.g. sparc32 binaries?)

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options