Home | History | Annotate | Download | only in amd64
History log of /src/sys/arch/amd64/amd64/linux32_syscall.c
RevisionDateAuthorComments
 1.33  05-Oct-2023  ad Arrange to update cached LWP credentials in userret() rather than during
syscall/trap entry, eliminating a test+branch on every syscall/trap.

This wasn't possible in the 3.99.x timeframe when l->l_cred came about
because there wasn't a reliable/timely way to force an ONPROC LWP running on
a remote CPU into the kernel (which is just about the only new thing in
this scheme).
 1.32  07-Mar-2015  christos add dtrace hooks
 1.31  25-Nov-2014  christos branches: 1.31.2;
CID 981752: printf format
 1.30  20-Dec-2010  matt branches: 1.30.18;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.29  21-Nov-2009  rmind branches: 1.29.4;
Use lwp_getpcb() on x86 MD code, clean from struct user usage.
 1.28  14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.27  21-Oct-2008  ad branches: 1.27.2; 1.27.8;
Provide a small inline wrapper for sysent::sy_call() and use it to store
the active syscall description in struct lwp. To be used at some future
point to prevent unloading of modules that provide syscalls, while the
syscalls are in use.
 1.26  21-Oct-2008  ad Undo revivesa damage to userret().
 1.25  15-Oct-2008  wrstuden Merge wrstuden-revivesa into HEAD.
 1.24  24-Apr-2008  ad branches: 1.24.2; 1.24.4; 1.24.8;
- Retire SYCALL_MPSAFE. With the exceptions of darwin and irix emulations,
all system calls are now MPSAFE.
- Remove unneeded acquire/release of kernel_lock.
 1.23  11-Mar-2008  ad branches: 1.23.2;
Make context switch + syscall counters optionally per-CPU and accumulate
in schedclock() at "about 16 hz".
 1.22  06-Mar-2008  njoly Do not use SYS_NSYSENT but the corresponding emulation definitions
instead {LINUX,LINUX32}_SYS_NSYSENT.

While here, cleanup some includes.
 1.21  24-Feb-2008  dsl Set p->p_trace_enabled in fork and whenever the controlling falgs change
instead of doing it in syscall_intern().
Note that syscall_intern() must still be called when the flags change
since many ports use a different copy of the syscall entry code when
tracing is enabled.
 1.20  06-Feb-2008  dsl branches: 1.20.2; 1.20.6;
Remove the 'args' parameter to 'trace_exit()' it is no longer used.
Instead of passing the (un)real system call code and syscall table pointer,
just pass the number of arguments - which is what ktrace really wants.
Ride forthcoming 4.99.53
 1.19  05-Jan-2008  dsl Don't pass 'curlwp' into trace_enter() and trace_exit().
 1.18  31-Dec-2007  ad Remove systrace. Ok core@.
 1.17  03-Nov-2007  dsl branches: 1.17.2; 1.17.8;
Linux doesn't have a SYS_syscall system call (it is all done in libc), and
definitely doesn't have SYS___syscall.
Kill all the code - now matching i386/i386/linux_syscall.c
There is also no point using a switch statement (and it's unpredictable
jump indirect) to save a few memory copies.
 1.16  03-Nov-2007  dsl Merge linux_syscall_fancy and linux_syscall_plain.
 1.15  17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.14  15-Aug-2007  ad branches: 1.14.2; 1.14.6;
Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.
 1.13  26-Apr-2007  njoly branches: 1.13.2; 1.13.6; 1.13.10;
Save the translated error value from Native to Linux, used by tracing
functions.

Reviewed by manu.
 1.12  22-Mar-2007  njoly s/linux/linux32/ in warning messages.
 1.11  05-Mar-2007  christos branches: 1.11.2; 1.11.4; 1.11.6;
more caddr_t lossage.
 1.10  04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.9  17-Feb-2007  pavel Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.
 1.8  09-Feb-2007  ad branches: 1.8.2;
Merge newlock2 to head.
 1.7  24-Sep-2006  elad PR/34594: KIYOHARA Takashi: ifdefed by KTRACE or SYSTRACE in
linux32_syscall.c

Applied patch, thanks for the report!
 1.6  19-Jul-2006  ad branches: 1.6.4; 1.6.6; 1.6.8;
- Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.
 1.5  07-Mar-2006  thorpej branches: 1.5.2; 1.5.6; 1.5.12;
Syscall debug tracing is handled by trace_enter() / trace_exit(). Change
trace_is_enabled() to return TRUE if SYSCALL_DEBUG is defined, and g/c
all of the SYSCALL_DEBUG handling from individual system call dispatch
routines.
 1.4  07-Mar-2006  thorpej Clean up fallout proc_is_traced_p() change:
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
about KTRACE and SYSTRACE, but do no more.
 1.3  05-Mar-2006  christos Add a proc_is_traced_p() macro and use it, instead of copying the same code
in many places. Idea from thorpej.
 1.2  05-Mar-2006  christos branches: 1.2.2;
implement PT_SYSCALL
 1.1  09-Feb-2006  manu branches: 1.1.2;
Add initial (but unfinished) COMPAT_LINUX32 for amd64. This is good enough so
that the i386 license manager part of amd64 version of Fluent works.

While I'm here, add SysV IPC to COMPAT_LINUX/amd64
 1.1.2.2  18-Feb-2006  yamt sync with head.
 1.1.2.1  09-Feb-2006  yamt file linux32_syscall.c was added on branch yamt-uio_vmspace on 2006-02-18 15:38:30 +0000
 1.2.2.3  11-Aug-2006  yamt sync with head
 1.2.2.2  13-Mar-2006  yamt sync with head.
 1.2.2.1  05-Mar-2006  yamt file linux32_syscall.c was added on branch yamt-pdpolicy on 2006-03-13 09:06:51 +0000
 1.5.12.10  17-Mar-2008  yamt sync with head.
 1.5.12.9  27-Feb-2008  yamt sync with head.
 1.5.12.8  11-Feb-2008  yamt sync with head.
 1.5.12.7  21-Jan-2008  yamt sync with head
 1.5.12.6  15-Nov-2007  yamt sync with head.
 1.5.12.5  03-Sep-2007  yamt sync with head.
 1.5.12.4  26-Feb-2007  yamt sync with head.
 1.5.12.3  30-Dec-2006  yamt sync with head.
 1.5.12.2  21-Jun-2006  yamt sync with head.
 1.5.12.1  07-Mar-2006  yamt file linux32_syscall.c was added on branch yamt-lazymbuf on 2006-06-21 14:48:18 +0000
 1.5.6.2  22-Apr-2006  simonb Sync with head.
 1.5.6.1  07-Mar-2006  simonb file linux32_syscall.c was added on branch simonb-timecounters on 2006-04-22 11:37:11 +0000
 1.5.2.2  07-Mar-2006  thorpej Syscall debug tracing is handled by trace_enter() / trace_exit(). Change
trace_is_enabled() to return TRUE if SYSCALL_DEBUG is defined, and g/c
all of the SYSCALL_DEBUG handling from individual system call dispatch
routines.
 1.5.2.1  07-Mar-2006  thorpej file linux32_syscall.c was added on branch elad-kernelauth on 2006-03-07 07:21:51 +0000
 1.6.8.1  22-Oct-2006  yamt sync with head
 1.6.6.2  09-Sep-2006  rpaulo sync with head
 1.6.6.1  19-Jul-2006  rpaulo file linux32_syscall.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:37:05 +0000
 1.6.4.4  30-Jan-2007  ad Remove support for SA. Ok core@.
 1.6.4.3  11-Jan-2007  ad Checkpoint work in progress.
 1.6.4.2  18-Nov-2006  ad Sync with head.
 1.6.4.1  17-Nov-2006  ad Checkpoint work in progress.
 1.8.2.4  07-May-2007  yamt sync with head.
 1.8.2.3  24-Mar-2007  yamt sync with head.
 1.8.2.2  12-Mar-2007  rmind Sync with HEAD.
 1.8.2.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.11.6.1  29-Mar-2007  reinoud Pullup to -current
 1.11.4.1  11-Jul-2007  mjf Sync with head.
 1.11.2.4  03-Dec-2007  ad Sync with HEAD.
 1.11.2.3  20-Aug-2007  ad Sync with HEAD.
 1.11.2.2  27-May-2007  ad Sync with head.
 1.11.2.1  10-Apr-2007  ad Sync with head.
 1.13.10.2  04-Nov-2007  jmcneill Sync with HEAD.
 1.13.10.1  16-Aug-2007  jmcneill Sync with HEAD.
 1.13.6.1  03-Sep-2007  skrll Sync with HEAD.
 1.13.2.1  03-Oct-2007  garbled Sync with HEAD
 1.14.6.1  13-Nov-2007  bouyer Sync with HEAD
 1.14.2.3  23-Mar-2008  matt sync with HEAD
 1.14.2.2  09-Jan-2008  matt sync with HEAD
 1.14.2.1  06-Nov-2007  matt sync with HEAD
 1.17.8.2  08-Jan-2008  bouyer Sync with HEAD
 1.17.8.1  02-Jan-2008  bouyer Sync with HEAD
 1.17.2.1  18-Feb-2008  mjf Sync with HEAD.
 1.20.6.3  17-Jan-2009  mjf Sync with HEAD.
 1.20.6.2  02-Jun-2008  mjf Sync with HEAD.
 1.20.6.1  03-Apr-2008  mjf Sync with HEAD.
 1.20.2.1  24-Mar-2008  keiichi sync with head.
 1.23.2.1  18-May-2008  yamt sync with head.
 1.24.8.2  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.24.8.1  19-Oct-2008  haad Sync with HEAD.
 1.24.4.3  15-Oct-2008  wrstuden Remove some now-unneeded includes. Matches previous changes to i386 code.
 1.24.4.2  23-May-2008  wrstuden Re-add userret hook. Add a new define, SA_NO_USERRET, which
indicates that upcall support should NOT be included. Add this
for all non-netbsd emulations. They will never be SA apps, so
let's make the invarient pretty blatant.

NetBSD code should include both sys/sa.h and sys/savar.h.
 1.24.4.1  10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.24.2.2  11-Mar-2010  yamt sync with head
 1.24.2.1  04-May-2009  yamt sync with head.
 1.27.8.4  10-Jan-2011  jym Sync with HEAD
 1.27.8.3  24-Oct-2010  jym Sync with HEAD
 1.27.8.2  01-Nov-2009  jym Sync with HEAD.
 1.27.8.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.27.2.1  28-Apr-2009  skrll Sync with HEAD.
 1.29.4.1  05-Mar-2011  rmind sync with head
 1.30.18.1  03-Dec-2017  jdolecek update from HEAD
 1.31.2.1  06-Apr-2015  skrll Sync with HEAD

RSS XML Feed