History log of /freebsd-10.3-release/sys/kern/init_sysent.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 296373 04-Mar-2016 marius

- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1
builds.
- Update newvers.sh to reflect RC1.
- Update __FreeBSD_version to reflect 10.3.
- Update default pkg(8) configuration to use the quarterly branch.

Approved by: re (implicit)

# 293475 09-Jan-2016 dchagin

Regen for r293474.


# 283960 03-Jun-2015 emaste

MFC r259438 by pjd: Fix syscalls that can be loaded as kernel modules

They were not given the flag allowing to call them from capability
mode sandbox.

And regenerate init_sysent.c

Sponsored by: The FreeBSD Foundation


# 283943 03-Jun-2015 emaste

MFC r261220 by csjp: Allow sigwait(2) in capabilities mode.

It's common for multi-threaded processes to create a thread for
the purpose of synchronously processing signals. Allow such processes to
utilize a capabilities sandbox.


# 283942 03-Jun-2015 emaste

MFC r259436,259437 by pjd: Allow for pselect(2) in capability mode.


# 283941 03-Jun-2015 emaste

Regen for r283940.


# 276956 11-Jan-2015 dchagin

Regen for r276955 (__getcwd path bug).


# 275987 21-Dec-2014 dchagin

Regen for r275986 (ppoll).


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 255709 19-Sep-2013 jhb

Regen.

Approved by: re (delphij)


# 255492 12-Sep-2013 jhb

Regen.

Approved by: re (kib)


# 255220 05-Sep-2013 pjd

Regenerate after r255219.

Sponsored by: The FreeBSD Foundation


# 251527 08-Jun-2013 glebius

aio_mlock() added:
- Regen for r251526.
- Bump __FreeBSD_version.


# 250854 21-May-2013 kib

Regenerate.


# 250160 01-May-2013 jilles

Regenerate files for pipe2().


# 250155 01-May-2013 jilles

Regenerate files for accept4().


# 248996 02-Apr-2013 mdf

Regen.

MFC after: 1 week


# 248600 21-Mar-2013 pjd

Regenerate after r248599.

Sponsored by: The FreeBSD Foundation


# 247668 02-Mar-2013 pjd

Regen after r247667.


# 247604 02-Mar-2013 pjd

Regen after r247602.


# 243611 27-Nov-2012 pjd

Regenerate after r243610.


# 242959 13-Nov-2012 kib

Regen


# 239349 17-Aug-2012 davidxu

regen.


# 239347 17-Aug-2012 davidxu

Implement syscall clock_getcpuclockid2, so we can get a clock id
for process, thread or others we want to support.
Use the syscall to implement POSIX API clock_getcpuclock and
pthread_getcpuclockid.

PR: 168417


# 236363 31-May-2012 pjd

Regenerate after r236361.

MFC after: 3 days


# 236027 25-May-2012 ed

Regenerate system call tables.


# 227776 21-Nov-2011 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)


# 227692 19-Nov-2011 ed

Regenerate system call tables.


# 227071 04-Nov-2011 jhb

Regen.


# 225618 16-Sep-2011 kmacy

Auto-generated code from sys_ prefixing makesyscalls.sh change

Approved by: re(bz)


# 224988 18-Aug-2011 jonathan

Auto-generated system call code based on r224987.

Approved by: re (implicit)


# 224815 13-Aug-2011 rwatson

Regenerate system call files following r224812 changes to capabilities.conf.
A no-op for non-Capsicum kernels; for Capsicum kernels, completes the
enabling of fooat(2) system calls using capabilities. With this change,
and subject to bug fixes, Capsicum capability support is now complete for
9.0.

Approved by: re (kib)
Submitted by: jonathan
Sponsored by: Google Inc


# 224067 15-Jul-2011 jonathan

Auto-generated system call code with cap_new(), cap_getrights().

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


# 220792 18-Apr-2011 mdf

Regen.


# 220164 30-Mar-2011 trasz

Regenerate.


# 219305 05-Mar-2011 trasz

Regenerate.


# 219132 01-Mar-2011 rwatson

Regenerate system call files following addition of cap_enter(2),
cap_getmode(2), and capabilities.conf.

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


# 211999 30-Aug-2010 kib

Regen


# 209581 28-Jun-2010 kib

Regenerate


# 198510 27-Oct-2009 kib

Regenerate


# 197637 30-Sep-2009 rwatson

Regenerate system call files following r197636.


# 195459 08-Jul-2009 trasz

Regenerate after lpathconf(2) addition.

Approved by: re (kib)


# 194919 24-Jun-2009 jhb

Regen.


# 194647 22-Jun-2009 jhb

Regen.


# 194392 17-Jun-2009 jhb

Regen.


# 194263 15-Jun-2009 jhb

Regen.


# 193235 01-Jun-2009 rwatson

Regenerate generated syscall files following changes to struct sysent in
r193234.


# 191675 29-Apr-2009 jamie

Regen for new jail system calls in r191673.

Approved by: bz (mentor)


# 184790 09-Nov-2008 ed

Regenerate system call tables for r184789.


# 184589 03-Nov-2008 dfr

Regen.


# 183362 25-Sep-2008 jhb

Regen.


# 182124 24-Aug-2008 rwatson

Regenerate following r182123.


# 181906 20-Aug-2008 ed

Update system call tables.

The previous commit also included changes to all the system call lists,
but it is a tradition to update these lists in a second commit, so rerun
make sysent to update the $FreeBSD$ tags inside these files to refer to
the latest version of syscalls.master.

Requested by: rwatson


# 181905 20-Aug-2008 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


# 178888 09-May-2008 julian

Add code to allow the system to handle multiple routing tables.
This particular implementation is designed to be fully backwards compatible
and to be MFC-able to 7.x (and 6.x)

Currently the only protocol that can make use of the multiple tables is IPv4
Similar functionality exists in OpenBSD and Linux.

From my notes:

-----

One thing where FreeBSD has been falling behind, and which by chance I
have some time to work on is "policy based routing", which allows
different
packet streams to be routed by more than just the destination address.

Constraints:
------------

I want to make some form of this available in the 6.x tree
(and by extension 7.x) , but FreeBSD in general needs it so I might as
well do it in -current and back port the portions I need.

One of the ways that this can be done is to have the ability to
instantiate multiple kernel routing tables (which I will now
refer to as "Forwarding Information Bases" or "FIBs" for political
correctness reasons). Which FIB a particular packet uses to make
the next hop decision can be decided by a number of mechanisms.
The policies these mechanisms implement are the "Policies" referred
to in "Policy based routing".

One of the constraints I have if I try to back port this work to
6.x is that it must be implemented as a EXTENSION to the existing
ABIs in 6.x so that third party applications do not need to be
recompiled in timespan of the branch.

This first version will not have some of the bells and whistles that
will come with later versions. It will, for example, be limited to 16
tables in the first commit.
Implementation method, Compatible version. (part 1)
-------------------------------
For this reason I have implemented a "sufficient subset" of a
multiple routing table solution in Perforce, and back-ported it
to 6.x. (also in Perforce though not always caught up with what I
have done in -current/P4). The subset allows a number of FIBs
to be defined at compile time (8 is sufficient for my purposes in 6.x)
and implements the changes needed to allow IPV4 to use them. I have not
done the changes for ipv6 simply because I do not need it, and I do not
have enough knowledge of ipv6 (e.g. neighbor discovery) needed to do it.

Other protocol families are left untouched and should there be
users with proprietary protocol families, they should continue to work
and be oblivious to the existence of the extra FIBs.

To understand how this is done, one must know that the current FIB
code starts everything off with a single dimensional array of
pointers to FIB head structures (One per protocol family), each of
which in turn points to the trie of routes available to that family.

The basic change in the ABI compatible version of the change is to
extent that array to be a 2 dimensional array, so that
instead of protocol family X looking at rt_tables[X] for the
table it needs, it looks at rt_tables[Y][X] when for all
protocol families except ipv4 Y is always 0.
Code that is unaware of the change always just sees the first row
of the table, which of course looks just like the one dimensional
array that existed before.

The entry points rtrequest(), rtalloc(), rtalloc1(), rtalloc_ign()
are all maintained, but refer only to the first row of the array,
so that existing callers in proprietary protocols can continue to
do the "right thing".
Some new entry points are added, for the exclusive use of ipv4 code
called in_rtrequest(), in_rtalloc(), in_rtalloc1() and in_rtalloc_ign(),
which have an extra argument which refers the code to the correct row.

In addition, there are some new entry points (currently called
rtalloc_fib() and friends) that check the Address family being
looked up and call either rtalloc() (and friends) if the protocol
is not IPv4 forcing the action to row 0 or to the appropriate row
if it IS IPv4 (and that info is available). These are for calling
from code that is not specific to any particular protocol. The way
these are implemented would change in the non ABI preserving code
to be added later.

One feature of the first version of the code is that for ipv4,
the interface routes show up automatically on all the FIBs, so
that no matter what FIB you select you always have the basic
direct attached hosts available to you. (rtinit() does this
automatically).

You CAN delete an interface route from one FIB should you want
to but by default it's there. ARP information is also available
in each FIB. It's assumed that the same machine would have the
same MAC address, regardless of which FIB you are using to get
to it.

This brings us as to how the correct FIB is selected for an outgoing
IPV4 packet.

Firstly, all packets have a FIB associated with them. if nothing
has been done to change it, it will be FIB 0. The FIB is changed
in the following ways.

Packets fall into one of a number of classes.

1/ locally generated packets, coming from a socket/PCB.
Such packets select a FIB from a number associated with the
socket/PCB. This in turn is inherited from the process,
but can be changed by a socket option. The process in turn
inherits it on fork. I have written a utility call setfib
that acts a bit like nice..

setfib -3 ping target.example.com # will use fib 3 for ping.

It is an obvious extension to make it a property of a jail
but I have not done so. It can be achieved by combining the setfib and
jail commands.

2/ packets received on an interface for forwarding.
By default these packets would use table 0,
(or possibly a number settable in a sysctl(not yet)).
but prior to routing the firewall can inspect them (see below).
(possibly in the future you may be able to associate a FIB
with packets received on an interface.. An ifconfig arg, but not yet.)

3/ packets inspected by a packet classifier, which can arbitrarily
associate a fib with it on a packet by packet basis.
A fib assigned to a packet by a packet classifier
(such as ipfw) would over-ride a fib associated by
a more default source. (such as cases 1 or 2).

4/ a tcp listen socket associated with a fib will generate
accept sockets that are associated with that same fib.

5/ Packets generated in response to some other packet (e.g. reset
or icmp packets). These should use the FIB associated with the
packet being reponded to.

6/ Packets generated during encapsulation.
gif, tun and other tunnel interfaces will encapsulate using the FIB
that was in effect withthe proces that set up the tunnel.
thus setfib 1 ifconfig gif0 [tunnel instructions]
will set the fib for the tunnel to use to be fib 1.

Routing messages would be associated with their
process, and thus select one FIB or another.
messages from the kernel would be associated with the fib they
refer to and would only be received by a routing socket associated
with that fib. (not yet implemented)

In addition Netstat has been edited to be able to cope with the
fact that the array is now 2 dimensional. (It looks in system
memory using libkvm (!)). Old versions of netstat see only the first FIB.

In addition two sysctls are added to give:
a) the number of FIBs compiled in (active)
b) the default FIB of the calling process.

Early testing experience:
-------------------------

Basically our (IronPort's) appliance does this functionality already
using ipfw fwd but that method has some drawbacks.

For example,
It can't fully simulate a routing table because it can't influence the
socket's choice of local address when a connect() is done.

Testing during the generating of these changes has been
remarkably smooth so far. Multiple tables have co-existed
with no notable side effects, and packets have been routes
accordingly.

ipfw has grown 2 new keywords:

setfib N ip from anay to any
count ip from any to any fib N

In pf there seems to be a requirement to be able to give symbolic names to the
fibs but I do not have that capacity. I am not sure if it is required.

SCTP has interestingly enough built in support for this, called VRFs
in Cisco parlance. it will be interesting to see how that handles it
when it suddenly actually does something.

Where to next:
--------------------

After committing the ABI compatible version and MFCing it, I'd
like to proceed in a forward direction in -current. this will
result in some roto-tilling in the routing code.

Firstly: the current code's idea of having a separate tree per
protocol family, all of the same format, and pointed to by the
1 dimensional array is a bit silly. Especially when one considers that
there is code that makes assumptions about every protocol having the
same internal structures there. Some protocols don't WANT that
sort of structure. (for example the whole idea of a netmask is foreign
to appletalk). This needs to be made opaque to the external code.

My suggested first change is to add routing method pointers to the
'domain' structure, along with information pointing the data.
instead of having an array of pointers to uniform structures,
there would be an array pointing to the 'domain' structures
for each protocol address domain (protocol family),
and the methods this reached would be called. The methods would have
an argument that gives FIB number, but the protocol would be free
to ignore it.

When the ABI can be changed it raises the possibilty of the
addition of a fib entry into the "struct route". Currently,
the structure contains the sockaddr of the desination, and the resulting
fib entry. To make this work fully, one could add a fib number
so that given an address and a fib, one can find the third element, the
fib entry.

Interaction with the ARP layer/ LL layer would need to be
revisited as well. Qing Li has been working on this already.

This work was sponsored by Ironport Systems/Cisco

Reviewed by: several including rwatson, bz and mlair (parts each)
Obtained from: Ironport systems/Cisco


# 177790 31-Mar-2008 kib

Regen


# 177634 26-Mar-2008 dfr

Regen.


# 177598 25-Mar-2008 ru

Regen after changing prototypes of cpuset_{get,set}affinity().


# 177091 12-Mar-2008 jeff

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.


# 176731 02-Mar-2008 jeff

- Regen for cpuset

Sponsored by: Nokia


# 176216 12-Feb-2008 ru

Regenerate for readlink(2).


# 175518 20-Jan-2008 rwatson

Regenerate.


# 175165 08-Jan-2008 jhb

Regen for shm_open(2) and shm_unlink(2).


# 171861 16-Aug-2007 davidxu

Regenerate.

Approved by: re(kensmith)


# 171210 04-Jul-2007 peter

Regenerate after mmap/lseek/etc syscall changes.

Approved by: re (kensmith)


# 163956 03-Nov-2006 rrs

This commits the remake in kern/ make sysent to get
the correct syscalls.master's $FreeBSD$ tag record and
a make sysent in sys/compat/freebsd32. Thanks Ruslan
for pointing out the steps I missed :-0
Approved by: gnn


# 163953 03-Nov-2006 rrs

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


# 163451 17-Oct-2006 davidxu

Regenerate.


# 162993 03-Oct-2006 rwatson

Regenerate.


# 162498 21-Sep-2006 davidxu

Regenerate.


# 162374 17-Sep-2006 rwatson

Regenerate.


# 161953 03-Sep-2006 rwatson

Regenerate for updated audit event identifiers.


# 161950 03-Sep-2006 rwatson

Regenerate.


# 161679 28-Aug-2006 davidxu

Regenerate.


# 161330 15-Aug-2006 jhb

Regen to propogate <prefix>_AUE_<mumble> changes as well as the earlier
systrace changes.


# 160944 03-Aug-2006 jb

Regen.

Note the addition of the extra file now generated.


# 160799 28-Jul-2006 jhb

Regen for MPSAFE flag removal.


# 160320 13-Jul-2006 davidxu

regenerate.


# 160277 11-Jul-2006 jhb

Regen.


# 160117 05-Jul-2006 wsalamon

Regen the system calls files, picking up the extended attr events, and some
mount-related changes done previously.

Approved by: rwatson (mentor)


# 157039 23-Mar-2006 davidxu

Regenerate.


# 156138 01-Mar-2006 davidxu

Regenerate.


# 155378 06-Feb-2006 rwatson

Regenerate.


# 155328 05-Feb-2006 davidxu

Regenerate.


# 155250 03-Feb-2006 rwatson

Regenerate.


# 155200 02-Feb-2006 rwatson

Regenerate.


# 154670 22-Jan-2006 davidxu

Regen.


# 153681 23-Dec-2005 phk

Regenerate sysent with new abort2 system call.

Implement abort2(const char *reason, int narg, void **args);

Submitted by: "Wojciech A. Koszek" <dunstan@freebsd.czest.pl>


# 152846 27-Nov-2005 davidxu

Regen.


# 152826 26-Nov-2005 davidxu

Regen.


# 151868 30-Oct-2005 davidxu

Regen.


# 151577 23-Oct-2005 davidxu

Regen for POSIX timer syscalls.


# 151317 14-Oct-2005 davidxu

Regen for sigqueue syscall.


# 151316 14-Oct-2005 davidxu

1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, most
changes in MD code are trivial, before this change, trapsignal and
sendsig use discrete parameters, now they uses member fields of
ksiginfo_t structure. For sendsig, this change allows us to pass
POSIX realtime signal value to user code.

2. Remove cpu_thread_siginfo, it is no longer needed because we now always
generate ksiginfo_t data and feed it to libpthread.

3. Add p_sigqueue to proc structure to hold shared signals which were
blocked by all threads in the proc.

4. Add td_sigqueue to thread structure to hold all signals delivered to
thread.

5. i386 and amd64 now return POSIX standard si_code, other arches will
be fixed.

6. In this sigqueue implementation, pending signal set is kept as before,
an extra siginfo list holds additional siginfo_t data for signals.
kernel code uses psignal() still behavior as before, it won't be failed
even under memory pressure, only exception is when deleting a signal,
we should call sigqueue_delete to remove signal from sigqueue but
not SIGDELSET. Current there is no kernel code will deliver a signal
with additional data, so kernel should be as stable as before,
a ksiginfo can carry more information, for example, allow signal to
be delivered but throw away siginfo data if memory is not enough.
SIGKILL and SIGSTOP have fast path in sigqueue_add, because they can
not be caught or masked.
The sigqueue() syscall allows user code to queue a signal to target
process, if resource is unavailable, EAGAIN will be returned as
specification said.
Just before thread exits, signal queue memory will be freed by
sigqueue_flush.
Current, all signals are allowed to be queued, not only realtime signals.

Earlier patch reviewed by: jhb, deischen
Tested on: i386, amd64


# 150620 27-Sep-2005 csjp

Update the "created from" section to reflect the most recent version of
syscalls.master

Requested by: jhb


# 150531 24-Sep-2005 csjp

Implement new world order in VFS locking for extended attributes. This will
remove the unconditional acquisition of Giant for extended attribute related
operations. If the file system is set as being MP safe and debug.mpsafevfs is
1, do not pickup Giant.

Mark the following system calls as being MP safe so we no longer pickup Giant
in the system call handler:

o extattrctl
o extattr_set_file
o extattr_get_file
o extattr_delete_file
o extattr_set_fd
o extattr_get_fd
o extattr_delete_fd
o extattr_set_link
o extattr_get_link
o extattr_delete_link
o extattr_list_file
o extattr_list_link
o extattr_list_fd

-Pass MPSAFE flags to namei(9) lookup and introduce vfslocked variable which
will keep track of any Giant acquisitions.
-Wrap any fd operations which manipulate vnodes in VFS_{UN}LOCK_GIANT
-Drop VFS_ASSERT_GIANT into function which operate on vnodes to ensure that
we are sufficiently protected.

I've tested these changes with various TrustedBSD MAC policies which use
extended attribute a lot on SMP and UP systems (thanks to Scott Long for
making some SMP hardware available to me for testing).

Discussed with: jeff
Requested by: jhb, rwatson


# 147832 08-Jul-2005 jhb

Regen.

Approved by: re (scottl)


# 147814 07-Jul-2005 jhb

Regenerate.

Approved by: re (scottl)


# 146807 30-May-2005 rwatson

Rebuild generated system call definition files following the addition of
the audit event field to the syscalls.master file format.

Submitted by: wsalamon
Obtained from: TrustedBSD Project


# 146724 28-May-2005 rwatson

Regenerate from syscalls.master.


# 146720 28-May-2005 rwatson

Regenerate for updated syscalls.master.


# 146717 28-May-2005 rwatson

Regenerate from syscalls.master.


# 146714 28-May-2005 rwatson

Regenerate from updated syscalls.master.


# 146712 28-May-2005 rwatson

Regenerate system call tables from syscalls.master.


# 145435 23-Apr-2005 davidxu

Regen.


# 142933 01-Mar-2005 ps

regen


# 140841 26-Jan-2005 jeff

- Regen


# 140725 24-Jan-2005 jeff

- Regen for recent vfs syscall changes.

Sponsored By: Isilon Systems, Inc.


# 139599 03-Jan-2005 marcel

Regen.


# 139292 25-Dec-2004 davidxu

Make _umtx_op() as more general interface, the final parameter needn't be
timespec pointer, every parameter will be interpreted by its opcode.


# 139013 18-Dec-2004 davidxu

1. make umtx sharable between processes, the way is two or more processes
call mmap() to create a shared space, and then initialize umtx on it,
after that, each thread in different processes can use the umtx same
as threads in same process.
2. introduce a new syscall _umtx_op to support timed lock and condition
variable semantics. also, orignal umtx_lock and umtx_unlock inline
functions now are reimplemented by using _umtx_op, the _umtx_op can
use arbitrary id not just a thread id.


# 138089 25-Nov-2004 phk

Regen.


# 137875 18-Nov-2004 marks

Rebuild from syscalls.master:1.179

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


# 136831 23-Oct-2004 rwatson

Rebuild from syscalls.master:1.178.


# 136207 07-Oct-2004 davidxu

Regen to unbreak world.

Pointy hat to: mtm


# 132117 13-Jul-2004 phk

Give kldunload a -f(orce) argument.

Add a MOD_QUIESCE event for modules. This should return error (EBUSY)
of the module is in use.

MOD_UNLOAD should now only fail if it is impossible (as opposed to
inconvenient) to unload the module. Valid reasons are memory references
into the module which cannot be tracked down and eliminated.

When kldunloading, we abandon if MOD_UNLOAD fails, and if -force is
not given, MOD_QUIESCE failing will also prevent the unload.

For backwards compatibility, we treat EOPNOTSUPP from MOD_QUIESCE as
success.

Document that modules should return EOPNOTSUPP for unknown events.


# 131430 02-Jul-2004 marcel

Regen.


# 130908 22-Jun-2004 rwatson

Regenerate after updating syscalls.master.


# 130905 22-Jun-2004 rwatson

Rebuild following marking link() as MPSAFE.


# 127891 05-Apr-2004 dfr

Regen.


# 127484 27-Mar-2004 mtm

Regen for libthr thread synchronization syscalls.


# 127062 16-Mar-2004 dwmalone

Nudge Giant as far as I can into kern_open(). Mark open() as MPSAFE.
Use kern_open() to implement creat() rather than taking the long route
through open(). Mark creat as MPSAFE.

While I'm at it, mark nosys() (syscall 0) as MPSAFE, for all the
difference it will make.


# 127035 15-Mar-2004 jhb

Regen for ptrace being safe again.


# 126933 13-Mar-2004 peter

Regen for mpsafe kse_create()


# 125369 03-Feb-2004 deischen

Regen after adding ksem_timedwait().


# 123751 23-Dec-2003 peter

Regen - this should be essentially a NOP, except for rcsid changes.


# 123413 10-Dec-2003 peter

Regen


# 123253 07-Dec-2003 marcel

Regen due to kse_switchin(2).


# 122636 14-Nov-2003 jeff

- regen.


# 122540 12-Nov-2003 mckusick

Update the five files derived from /sys/kern/syscalls.master
after the additions made for the new statfs structure (version
1.157). These must be updated in a separate checkin after
syscalls.master has been checked in so that they reflect its
new CVS identity. As these are purely derived files, it is not
clear to me why they are under CVS at all. I presume that it has
something to do with having `make world' operate properly.


# 122245 07-Nov-2003 jhb

Regen.


# 121298 21-Oct-2003 scottl

Don peril-sensitive sunglasses and mark pipe(2) as MPSAFE. I've beaten up
on it for the last 15 hours with no signs of problems. It gives a small
(1%) gain on buildworld since pipe_read/pipe_write are already free of Giant.


# 121284 20-Oct-2003 dwmalone

Mark dup as MPSAFE. Giant was pushed into dup ages ago, but it looks
like it was missed in syscalls.master.

Spotted by: alc


# 119827 07-Sep-2003 alc

msync(2) should be declared MP-safe.


# 117704 17-Jul-2003 davidxu

o Refine kse_thr_interrupt to allow it to handle different commands.
o Remove TDF_NOSIGPOST.
o Add a member td_waitset to proc structure, it will be used for sigwait.

Tested by: deischen


# 115800 04-Jun-2003 rwatson

Regen from syscalls.master:1.149, addition of extended attribute
list system calls for fd, file, link.


# 113276 09-Apr-2003 mike

Regen.


# 112913 01-Apr-2003 jeff

- Regen.


# 112909 01-Apr-2003 jeff

- Regen for umtx.


# 112902 01-Apr-2003 jeff

- Regen for thr related system calls.


# 112895 31-Mar-2003 jeff

- Regen for the sig*wait* system calls.


# 111169 20-Feb-2003 davidxu

Add a timeout parameter to kse_release.


# 108919 08-Jan-2003 davidxu

Some KSE syscalls are MPSAFE.


# 108406 29-Dec-2002 rwatson

Regen from syscalls.master:1.139


# 107914 15-Dec-2002 dillon

Regenerate system calls (swapoff added)


# 106978 16-Nov-2002 deischen

Regenerate after adding system calls.


# 106467 05-Nov-2002 rwatson

Regen.


# 106363 02-Nov-2002 rwatson

Regen from yesterday's system call placeholder rename.


# 105950 25-Oct-2002 peter

Split 4.x and 5.x signal handling so that we can keep 4.x signal
handling clean and functional as 5.x evolves. This allows some of the
nasty bandaids in the 5.x codepaths to be unwound.

Encapsulate 4.x signal handling under COMPAT_FREEBSD4 (there is an
anti-foot-shooting measure in place, 5.x folks need this for a while) and
finish encapsulating the older stuff under COMPAT_43. Since the ancient
stuff is required on alpha (longjmp(3) passes a 'struct osigcontext *'
to the current sigreturn(2), instead of the 'ucontext_t *' that sigreturn
is supposed to take), add a compile time check to prevent foot shooting
there too. Add uniform COMPAT_43 stubs for ia64/sparc64/powerpc.

Tested on: i386, alpha, ia64. Compiled on sparc64 (a few days ago).
Approved by: re


# 105692 22-Oct-2002 rwatson

Regen.


# 105478 19-Oct-2002 rwatson

Regen from addition of execve_mac placeholder.


# 104748 10-Oct-2002 rwatson

Regen from syntax fix to syscalls.master.

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:


# 104731 09-Oct-2002 rwatson

Regen.


# 104379 02-Oct-2002 archie

Let kse_wakeup() take a KSE mailbox pointer argument.

Reviewed by: julian


# 104263 01-Oct-2002 rwatson

Regen.


# 103972 25-Sep-2002 archie

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


# 103575 19-Sep-2002 alfred

Regen for added syscalls.


# 102133 19-Aug-2002 rwatson

Regen.


# 101426 06-Aug-2002 rwatson

Regen.


# 100999 31-Jul-2002 rwatson

Regen.


# 100956 30-Jul-2002 rwatson

Regen.


# 100897 30-Jul-2002 rwatson

Rebuild of files generated from syscalls.master.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs


# 99856 12-Jul-2002 alfred

regen for freebsd4_sendfile(2) compat.


# 99072 29-Jun-2002 julian

Part 1 of KSE-III

The ability to schedule multiple threads per process
(one one cpu) by making ALL system calls optionally asynchronous.
to come: ia64 and power-pc patches, patches for gdb, test program (in tools)

Reviewed by: Almost everyone who counts
(at various times, peter, jhb, matt, alfred, mini, bernd,
and a cast of thousands)

NOTE: this is still Beta code, and contains lots of debugging stuff.
expect slight instability in signals..


# 98198 13-Jun-2002 rwatson

Regen.


# 97372 28-May-2002 marcel

Add uuidgen(2) and uuidgen(1).

The uuidgen command, by means of the uuidgen syscall, generates one
or more Universally Unique Identifiers compatible with OSF/DCE 1.1
version 1 UUIDs.

From the Perforce logs (change 11995):

Round of cleanups:
o Give uuidgen() the correct prototype in syscalls.master
o Define struct uuid according to DCE 1.1 in sys/uuid.h
o Use struct uuid instead of uuid_t. The latter is defined
in sys/uuid.h but should not be used in kernel land.
o Add snprintf_uuid(), printf_uuid() and sbuf_printf_uuid()
to kern_uuid.c for use in the kernel (currently geom_gpt.c).
o Rename the non-standard struct uuid in kern/kern_uuid.c
to struct uuid_private and give it a slightly better definition
for better byte-order handling. See below.
o In sys/gpt.h, fix the broken uuid definitions to match the now
compliant struct uuid definition. See below.
o In usr.bin/uuidgen/uuidgen.c catch up with struct uuid change.

A note about byte-order:
The standard failed to provide a non-conflicting and
unambiguous definition for the binary representation. My initial
implementation always wrote the timestamp as a 64-bit little-endian
(2s-complement) integral. The clock sequence was always written
as a 16-bit big-endian (2s-complement) integral. After a good
nights sleep and couple of Pan Galactic Gargle Blasters (not
necessarily in that order :-) I reread the spec and came to the
conclusion that the time fields are always written in the native
by order, provided the the low, mid and hi chopping still occurs.
The spec mentions that you "might need to swap bytes if you talk
to a machine that has a different byte-order". The clock sequence
is always written in big-endian order (as is the IEEE 802 address)
because its division is resulting in bytes, making the ordering
unambiguous.


# 96084 05-May-2002 mux

Add the lchflags(2) syscall.

Reviewed by: rwatson


# 94936 17-Apr-2002 mux

Rework the kernel environment subsystem. We now convert the static
environment needed at boot time to a dynamic subsystem when VM is
up. The dynamic kernel environment is protected by an sx lock.

This adds some new functions to manipulate the kernel environment :
freeenv(), setenv(), unsetenv() and testenv(). freeenv() has to be
called after every getenv() when you have finished using the string.
testenv() only tests if an environment variable is present, and
doesn't require a freeenv() call. setenv() and unsetenv() are self
explanatory.

The kenv(2) syscall exports these new functionalities to userland,
mainly for kenv(1).

Reviewed by: peter


# 94641 14-Apr-2002 alc

Regen


# 94447 11-Apr-2002 alc

Regen


# 91694 05-Mar-2002 rwatson

Part II: update various mechanically generated files to allow for new
system call number allocations.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs


# 90889 19-Feb-2002 julian

Add stub syscalls and definitions for KSE calls.
"Book'em Danno"


# 90778 17-Feb-2002 deischen

Regenerate these files after change to syscalls.master.


# 90449 10-Feb-2002 rwatson

Part II: Update system calls for extended attributes. Rebuild of
generated files.


# 90074 01-Feb-2002 bde

Regenerate to make osigreturn standard.


# 89978 30-Jan-2002 bde

Regenerate _after_ the commit to syscalls.master.


# 88633 29-Dec-2001 alfred

Make AIO a loadable module.

Remove the explicit call to aio_proc_rundown() from exit1(), instead AIO
will use at_exit(9).

Add functions at_exec(9), rm_at_exec(9) which function nearly the
same as at_exec(9) and rm_at_exec(9), these functions are called
on behalf of modules at the time of execve(2) after the image
activator has run.

Use a modified version of tegge's suggestion via at_exec(9) to close
an exploitable race in AIO.

Fix SYSCALL_MODULE_HELPER such that it's archetecuterally neutral,
the problem was that one had to pass it a paramater indicating the
number of arguments which were actually the number of "int". Fix
it by using an inline version of the AS macro against the syscall
arguments. (AS should be available globally but we'll get to that
later.)

Add a primative system for dynamically adding kqueue ops, it's really
not as sophisticated as it should be, but I'll discuss with jlemon when
he's around.


# 85891 02-Nov-2001 phk

Add nmount() stub function and regenerate the syscall-glue which should
not need to check in generated files.


# 84884 13-Oct-2001 rwatson

o Update init_sysent.c and friends for allocation of afs_syscall.


# 84879 13-Oct-2001 phk

Regenerate syscall stuff.

Remove syscall-hide.h


# 83796 21-Sep-2001 rwatson

o Part two of eaccess(2) commit, rebuilt system call code.

Obtained from: TrustedBSD Project


# 83652 18-Sep-2001 peter

Regenerate


# 82754 01-Sep-2001 dillon

Regenerate syscalls


# 82712 01-Sep-2001 dillon

regenerate syscalls


# 82610 31-Aug-2001 dillon

Giant pushdown syscalls in kern/uipc_syscalls.c. Affected calls:

recvmsg(), sendmsg(), recvfrom(), accept(), getpeername(), getsockname(),
socket(), connect(), accept(), send(), recv(), bind(), setsockopt(), listen(),
sendto(), shutdown(), socketpair(), sendfile()


# 82607 31-Aug-2001 dillon

Giant Pushdown: sysv shm, sem, and msg calls.


# 82150 22-Aug-2001 tmm

Regenerate from syscalls.master using the new makesyscalls.sh revision.


# 76829 19-May-2001 alfred

Regen syscalls that were made mpsafe via vm_mtx

obreak, getpagesize, sbrk, sstk, mmap, ovadvise, munmap, mprotect,
madvise, mincore, mmap, mlock, munlock, minherit, msync, mlockall,
munlockall


# 76473 11-May-2001 tegge

Regenerate.


# 75427 11-Apr-2001 rwatson

o Regenerated following introduction of __setugid() system call for
"options REGRESSION".

Obtained from: TrustedBSD Project


# 75039 31-Mar-2001 rwatson

o Part two of introduction of extattr_{delete,get,set}_fd() system calls,
regenerate necessary automatically-generated code.

Obtained from: TrustedBSD Project


# 74438 19-Mar-2001 rwatson

o Rename "namespace" argument to "attrnamespace" as namespace is a C++
reserved word. Part 2 of syscalls.master commit to catch rebuilt
files.

Submitted by: jkh
Obtained from: TrustedBSD Project


# 74281 15-Mar-2001 peter

Regenerate after rwatson's commit to syscalls.master (rev 1.85)


# 69514 02-Dec-2000 jake

Regen.


# 69449 01-Dec-2000 alfred

sysvipc loadable.

new syscall entry lkmressys - "reserved loadable syscall"

Make syscall_register allow overwriting of such entries (lkmressys).


# 65152 28-Aug-2000 marcel

Regen: fix prototypes for {o|}{g|s}etrlimit.


# 64002 29-Jul-2000 peter

Regen. (Fix SYS_exit)


# 63987 29-Jul-2000 peter

Regenerate with makesyscalls.sh


# 63083 13-Jul-2000 rwatson

o Commit two of two, introducing __cap_{get,set}_{fd,file} syscalls to
modify capability sets on files.

Obtained from: TrustedBSD Project


# 61719 15-Jun-2000 rwatson

Second of two commits adding capability manipulation syscalls for
processes.

Obtained from: TrustedBSD Project


# 60290 09-May-2000 bde

Regenerated (fixed the calculation of sy_nargs in sysent tables).


# 60248 09-May-2000 bde

Regenerated (fixed the type of mmap()'s padding arg).


# 59829 01-May-2000 peter

Regenerate (removed semconfig)


# 59288 16-Apr-2000 jlemon

Introduce kqueue() and kevent(), a kernel event notification facility.


# 58964 03-Apr-2000 alfred

regenerate with MPSAFE from syscalls.master


# 58941 02-Apr-2000 dillon

Make the sigprocmask() and geteuid() system calls MP SAFE. Expand
commentary for copyin/copyout to indicate that they are MP SAFE as
well.

Reviewed by: msmith


# 58717 28-Mar-2000 dillon

Commit major SMP cleanups and move the BGL (big giant lock) in the
syscall path inward. A system call may select whether it needs the MP
lock or not (the default being that it does need it).

A great deal of conditional SMP code for various deadended experiments
has been removed. 'cil' and 'cml' have been removed entirely, and the
locking around the cpl has been removed. The conditional
separately-locked fast-interrupt code has been removed, meaning that
interrupts must hold the CPL now (but they pretty much had to anyway).
Another reason for doing this is that the original separate-lock for
interrupts just doesn't apply to the interrupt thread mechanism being
contemplated.

Modifications to the cpl may now ONLY occur while holding the MP
lock. For example, if an otherwise MP safe syscall needs to mess with
the cpl, it must hold the MP lock for the duration and must (as usual)
save/restore the cpl in a nested fashion.

This is precursor work for the real meat coming later: avoiding having
to hold the MP lock for common syscalls and I/O's and interrupt threads.
It is expected that the spl mechanisms and new interrupt threading
mechanisms will be able to run in tandem, allowing a slow piecemeal
transition to occur.

This patch should result in a moderate performance improvement due to
the considerable amount of code that has been removed from the critical
path, especially the simplification of the spl*() calls. The real
performance gains will come later.

Approved by: jkh
Reviewed by: current, bde (exception.s)
Some work taken from: luoqi's patch


# 56271 19-Jan-2000 rwatson

Fix bde'isms in acl/extattr syscall interface, renaming syscalls to
prettier (?) names, adding some const's around here, et al.

Commit 2 out of 3.

Reviewed by: bde


# 56115 16-Jan-2000 peter

Implement setres[ug]id() and getres[ug]id(). This has been sitting in
my tree for ages (~2 years) waiting for an excuse to commit it. Now Linux
has implemented it and it seems that Staroffice (when using the
linux_base6.1 port's libc) calls this in the linux emulator and dies in
setup. The Linux emulator can call these now.


# 55943 14-Jan-2000 jasone

Add aio_waitcomplete(). Make aio work correctly for socket descriptors.
Make gratuitous style(9) fixes (me, not the submitter) to make the aio
code more readable.

PR: kern/12053
Submitted by: Chris Sedore <cmsedore@maxwell.syr.edu>


# 54971 21-Dec-1999 alfred

regenerate after making getfh a standard syscall.


# 54803 19-Dec-1999 rwatson

Second pass commit to introduce new ACL and Extended Attribute system
calls, vnops, vfsops, both in /kern, and to individual file systems that
require a vfsop_ array entry.

Reviewed by: eivind


# 53385 18-Nov-1999 brian

Cop on a bit and regenerate things correctly.

Pointed out by: bde


# 52150 12-Oct-1999 marcel

Now that userland, including modules don't use the osig* syscalls
and the kernel itself doesn't use any SYS_osig* constants, change
the syscalls to be of type COMPAT.


# 51791 29-Sep-1999 marcel

sigset_t change (part 2 of 5)
-----------------------------

The core of the signalling code has been rewritten to operate
on the new sigset_t. No methodological changes have been made.
Most references to a sigset_t object are through macros (see
signalvar.h) to create a level of abstraction and to provide
a basis for further improvements.

The NSIG constant has not been changed to reflect the maximum
number of signals possible. The reason is that it breaks
programs (especially shells) which assume that all signals
have a non-null name in sys_signame. See src/bin/sh/trap.c
for an example. Instead _SIG_MAXSIG has been introduced to
hold the maximum signal possible with the new sigset_t.

struct sigprop has been moved from signalvar.h to kern_sig.c
because a) it is only used there, and b) access must be done
though function sigprop(). The latter because the table doesn't
holds properties for all signals, but only for the first NSIG
signals.

signal.h has been reorganized to make reading easier and to
add the new and/or modified structures. The "old" structures
are moved to signalvar.h to prevent namespace polution.

Especially the coda filesystem suffers from the change, because
it contained lines like (p->p_sigmask == SIGIO), which is easy
to do for integral types, but not for compound types.

NOTE: kdump (and port linux_kdump) must be recompiled.

Thanks to Garrett Wollman and Daniel Eischen for pressing the
importance of changing sigreturn as well.


# 51141 11-Sep-1999 alfred

regenerate to include proper "gererated from" taglines.


# 51138 11-Sep-1999 alfred

Seperate the export check in VFS_FHTOVP, exports are now checked via
VFS_CHECKEXP.

Add fh(open|stat|stafs) syscalls to allow userland to query filesystems
based on (network) filehandle.

Obtained from: NetBSD


# 50482 28-Aug-1999 peter

Regen after Id->FreeBSD


# 49429 05-Aug-1999 jkh

Re-commit these files after updating syscalls.master (in the proper order
this time).

Pointed out by: bde


# 49420 04-Aug-1999 jkh

Reserve a syscall for the arla folks. I'm assuming that since syscalls.c
and init_sysent.c are checked into CVS, I should also commit the regenerated
copies even though they're built by syscalls.master. Correct? Bruce? :)


# 47104 13-May-1999 bde

Regenerated.


# 46155 28-Apr-1999 phk

This Implements the mumbled about "Jail" feature.

This is a seriously beefed up chroot kind of thing. The process
is jailed along the same lines as a chroot does it, but with
additional tough restrictions imposed on what the superuser can do.

For all I know, it is safe to hand over the root bit inside a
prison to the customer living in that prison, this is what
it was developed for in fact: "real virtual servers".

Each prison has an ip number associated with it, which all IP
communications will be coerced to use and each prison has its own
hostname.

Needless to say, you need more RAM this way, but the advantage is
that each customer can run their own particular version of apache
and not stomp on the toes of their neighbors.

It generally does what one would expect, but setting up a jail
still takes a little knowledge.

A few notes:

I have no scripts for setting up a jail, don't ask me for them.

The IP number should be an alias on one of the interfaces.

mount a /proc in each jail, it will make ps more useable.

/proc/<pid>/status tells the hostname of the prison for
jailed processes.

Quotas are only sensible if you have a mountpoint per prison.

There are no privisions for stopping resource-hogging.

Some "#ifdef INET" and similar may be missing (send patches!)

If somebody wants to take it from here and develop it into
more of a "virtual machine" they should be most welcome!

Tools, comments, patches & documentation most welcome.

Have fun...

Sponsored by: http://www.rndassociates.com/
Run for almost a year by: http://www.servetheweb.com/


# 45312 04-Apr-1999 dt

Regenerate (padding for pread and pwrite).


# 45065 27-Mar-1999 alc

Added pread and pwrite. These functions are defined by the X/Open
Threads Extension. (Note: We use the same syscall numbers as NetBSD.)

Submitted by: John Plevyak <jplevyak@inktomi.com>


# 41089 11-Nov-1998 peter

regenerate (+kldsym)


# 40931 05-Nov-1998 dg

Implemented zero-copy TCP/IP extensions via sendfile(2) - send a
file to a stream socket. sendfile(2) is similar to implementations in
HP-UX, Linux, and other systems, but the API is more extensive and
addresses many of the complaints that the Apache Group and others have
had with those other implementations. Thanks to Marc Slemko of the
Apache Group for helping me work out the best API for this.
Anyway, this has the "net" result of speeding up sends of files over
TCP/IP sockets by about 10X (that is to say, uses 1/10th of the CPU
cycles) when compared to a traditional read/write loop.


# 38516 24-Aug-1998 dfr

Regnerate.


# 36771 08-Jun-1998 bde

Updated generated files.


# 36034 14-May-1998 peter

regen after signanosleep nuke


# 35938 11-May-1998 dyson

Fix the futimes/undelete/utrace conflict with other BSD's. Note that
the only common usage of utrace (the possible problem with this
commit) is with malloc, so this should be a real problem. Add
the various NetBSD syscalls that allow full emulation of their
development environment.


# 34925 28-Mar-1998 dufault

Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B and
_KPOSIX_PRIORITY_SCHEDULING options to work. Changes:

Change all "posix4" to "p1003_1b". Misnamed files are left
as "posix4" until I'm told if I can simply delete them and add
new ones;

Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux;

Add man pages for _POSIX_PRIORITY_SCHEDULING system calls;

Add options to LINT;

Minor fixes to P1003_1B code during testing.


# 33041 03-Feb-1998 bde

Updated generated files.


# 32889 30-Jan-1998 phk

Retire LFS.

If you want to play with it, you can find the final version of the
code in the repository the tag LFS_RETIREMENT.

If somebody makes LFS work again, adding it back is certainly
desireable, but as it is now nobody seems to care much about it,
and it has suffered considerable bitrot since its somewhat haphazard
integration.

R.I.P


# 31787 16-Dec-1997 eivind

Regenerate after changing makesyscalls.sh.


# 31778 16-Dec-1997 eivind

Make COMPAT_43 and COMPAT_SUNOS new-style options.


# 30741 26-Oct-1997 phk

Remade syscalls.master derived files.


# 29439 15-Sep-1997 peter

Regenerate _after_ the commit to syscalls.master


# 29391 14-Sep-1997 phk

Add a __getcwd() syscall. This is intentionally undocumented, but all
it does is to try to figure the pwd out from the vfs namecache, and
return a reversed string to it. libc:getcwd() is responsible for
flipping it back.


# 29349 14-Sep-1997 peter

Regenerate (added poll etc)


# 28400 19-Aug-1997 peter

Regenerate


# 27068 29-Jun-1997 bde

Updated generated files (makesyscalls.sh changed). Only sysproto.h
really changed.


# 26671 16-Jun-1997 dyson

Modifications to existing files to support the initial AIO/LIO and
kernel based threading support.


# 26334 01-Jun-1997 peter

Regenerate


# 25582 08-May-1997 peter

regenerate


# 25537 07-May-1997 dfr

This is the kernel linker. To use it, you will first need to apply
the patches in freefall:/home/dfr/ld.diffs to your ld sources and set
BINFORMAT to aoutkld when linking the kernel.

Library changes and userland utilities will appear in a later commit.


# 24452 31-Mar-1997 peter

Regenerate (added issetugid)


# 24440 31-Mar-1997 peter

Regenerate


# 22983 22-Feb-1997 peter

Regenerate to include correct Id string


# 22521 10-Feb-1997 dyson

This is the kernel Lite/2 commit. There are some requisite userland
changes, so don't expect to be able to run the kernel as-is (very well)
without the appropriate Lite/2 userland changes.

The system boots and can mount UFS filesystems.

Untested: ext2fs, msdosfs, NFS
Known problems: Incorrect Berkeley ID strings in some files.
Mount_std mounts will not work until the getfsent
library routine is changed.

Reviewed by: various people
Submitted by: Jeffery Hsu <hsu@freebsd.org>


# 21777 16-Jan-1997 bde

Updated generated files.


# 18398 19-Sep-1996 phk

Add the utrace(caddr_t addr,size_t len) syscall, that will store the
data pointed at in a ktrace file, if this process is being ktrace'ed.
I'm using this to profile malloc usage.
The advantage is that there is no context around this call, ie, no
open file or socket, so it will work in any process, and you can
decide if you want it to collect data or not.


# 17703 20-Aug-1996 smpatel

Reran makesyscalls.sh after changing select()'s first argument to 'int'.


# 14331 02-Mar-1996 peter

Mega-commit for Linux emulator update.. This has been stress tested under
netscape-2.0 for Linux running all the Java stuff. The scrollbars are now
working, at least on my machine. (whew! :-)

I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.

The main changes:

COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself. The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code. All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first. Like IBCS2, you can statically compile it in with "options LINUX".

A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality(). The Linux-ELF libraries want
to use some of these.

linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.

Quite a few bugs removed, including incorrect arguments being used in
syscalls.. eg: mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.

The build for the code has changed. i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.

Supporting changes elsewhere in the kernel:

The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS). This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.

The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only. This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.

makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code. It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)

At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area. This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.


# 14324 02-Mar-1996 peter

reran makesyscalls.sh after "int len" -> "size_t len" changes.


# 14220 23-Feb-1996 peter

Run makesyscalls to regen the tables.


# 13523 20-Jan-1996 bde

Removed stale #includes of "opt_sysvipc.h".


# 13416 13-Jan-1996 phk

Add an option NFS_NOSERVER which saves 100K in the install kernel (or
any other kernel that uses it). Use with option NFS.


# 13332 08-Jan-1996 peter

(gulp!) reran makesyscalls..

sysv_ipc.c: add stub functions that either simply return (for the hooks
in kern_fork/kern_exit) or log() a messgae and call enosys() (for the
syscalls). sysv_ipc.c will become "standard" in conf/files and has
#ifs for all the permutations.


# 13226 04-Jan-1996 wollman

Convert SYSV IPC to new-style options. (I hope I got everything...)
The LKMs will need an extra file, to come later.


# 13203 03-Jan-1996 wollman

Converted two options over to the new scheme: USER_LDT and KTRACE.


# 12865 15-Dec-1995 peter

Regenerated from syscalls.master...


# 12217 12-Nov-1995 bde

Updated machine-generated files.


# 11295 07-Oct-1995 swallace

Remake generated files to reflect makesyscalls.sh changes


# 10907 19-Sep-1995 bde

Update machine-generated files.


# 8019 23-Apr-1995 ache

Make setreuid/setregid active syscalls


# 7359 25-Mar-1995 dg

Added a third "flags" argument to msync() ...as other systems have.


# 7090 16-Mar-1995 bde

Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) and most of the warnings from
`gcc -Wnested-externs'. Fix all the bugs found. There were no serious
ones.


# 6875 04-Mar-1995 dg

Removed obsolete vtrace() remnants.


# 6380 14-Feb-1995 sos

First attempt to run linux binaries. This is only the changes needed to
the generic kernel. The actual emulator is a separate LKM. (not finished
yet, sorry).
Submitted by: sos@freebsd.org & sef@kithrup.com


# 5107 14-Dec-1994 wollman

Actually enable NTP kernel PLL. (Oops!)
Noticed by Pete Carah.


# 4351 10-Nov-1994 ats

pick up the changes from a makesyscall.sh run. The multiple lkmnosys
declarations should now be gone.


# 3478 09-Oct-1994 sos

Added errno conversion table (initialize to zero).


# 3291 02-Oct-1994 dg

"idle priority" support. Based on code from Henrik Vestergaard Draboel,
but substantially rewritten by me.


# 3178 28-Sep-1994 wollman

LKM support is no longer optional.


# 3109 26-Sep-1994 phk

init_sysent.c was missing the final newline.


# 2858 18-Sep-1994 wollman

Redo Kernel NTP PLL support, kernel side.

This code is mostly taken from the 1.1 port (which was in turn taken from
Dave Mills's kern.tar.Z example). A few significant differences:

1) ntp_gettime() is now a MIB variable rather than a system call. A few
fiddles are done in libc to make it behave the same.

2) mono_time does not participate in the PLL adjustments.

3) A new interface has been defined (in <machine/clock.h>) for doing
possibly machine-dependent things around the time of the clock update.
This is used in Pentium kernels to disable interrupts, set `time', and
reset the CPU cycle counter as quickly as possible to avoid jitter in
microtime(). Measurements show an apparent resolution of a bit more than
8.14usec, which is reasonable given system-call overhead.


# 2729 13-Sep-1994 dfr

Added SYSV ipcs.

Obtained from: NetBSD and FreeBSD-1.1.5


# 2696 13-Sep-1994 wollman

Added namespace information for future pollution-control measures.


# 2672 11-Sep-1994 ats

Delete the extra's int nosys(); declarations like the new makesyscall.sh
do it now.


# 2442 01-Sep-1994 dg

Realtime priority scheduling support.

Added "sys/rtprio.h" with the used defines.
Added rtprio(2) - the kernel interface. init_sysent.c,
kern_resource.c
syscalls.master
Added 32 new runqueues (rtqs), with initialization. kern_proc.c
kern_synch.c
Realtime processes do not change nice/priority kern_synch.c
Added a column "rt" to ddb's ps (#ifdef RTPRIO_DEBUG) kern_synch.c
Realtime priorities are enherited through fork(). kern_fork.c
Init (and children) NOT run as realtime process. init_main.c

Submitted by: Henrik Vestergaard Draboel


# 2297 26-Aug-1994 wollman

Added ntp_gettime and ntp_adjtime syscalls, both nosys'ed out until
someone gets to re-integrating the code. ntp_gettime() should be
turned into a sysctl variable and emulated in the library.


# 2293 26-Aug-1994 sos

Oops didn't check that init_sysent.c was generated proberly. Fixed.

Reviewed by:
Submitted by:


# 2257 24-Aug-1994 sos

Changes preparing for iBCS support
Reviewed by:
Submitted by:


# 2124 19-Aug-1994 dg

Terry Lambert's loadable kernel module support w/improvements from the
NetBSD group.


# 1549 25-May-1994 rgrimes

The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.

Reviewed by: Rodney W. Grimes
Submitted by: John Dyson and David Greenman


# 1542 24-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1541,
which included commits to RCS files with non-trunk default branches.


# 1541 24-May-1994 rgrimes

BSD 4.4 Lite Kernel Sources