Home | History | Annotate | Download | only in kern
History log of /src/sys/kern/kern_ras.c
RevisionDateAuthorComments
 1.42  08-Aug-2022  riastradh rasctl(2): Avoid arithmetic overflow.

Reported-by: syzbot+40b6085d020ae47a6997@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=8fb9b5dee9b056e4f8ad3b937dc5be1296608c5f
 1.41  03-Aug-2022  riastradh rasctl(2): Avoid overflow in address range arithmetic.

Remove various contortions to suppress warnings. Rely on
-Wno-type-limits instead.

Reported-by: syzbot+8b0f1ced3fce82031535@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=e9055200701cffd653d5b13491d85c34e07f06a3
 1.40  14-Dec-2019  riastradh Remove charade dancing around now-dead RCU patent.
 1.39  06-Oct-2019  uwe xc_barrier - convenience function to xc_broadcast() a nop.

Make the intent more clear and also avoid a bunch of (xcfunc_t)nullop
casts that gcc 8 -Wcast-function-type is not happy about.
 1.38  04-Jul-2016  maxv branches: 1.38.18;
Make the execution flow canonical instead of jumping back and forth, and
complete the userland check.
 1.37  01-Jul-2016  maxv Ensure the restartable atomic sequence is in userland, for real.
 1.36  14-Sep-2013  martin branches: 1.36.6;
Push/Pop pragma magic to avoid gcc warning aber a less-than NULL comparision
 1.35  19-Feb-2012  rmind branches: 1.35.2; 1.35.4;
Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
 1.34  15-Oct-2008  wrstuden branches: 1.34.28; 1.34.32;
Merge wrstuden-revivesa into HEAD.
 1.33  09-Jun-2008  ad branches: 1.33.4;
Fix error in previous.
 1.32  09-Jun-2008  ad ras_purgeall: avoid taking p_auxlock.
 1.31  27-May-2008  ad Use kmem_alloc/free.
 1.30  28-Apr-2008  martin branches: 1.30.2;
Remove clause 3 and 4 from TNF licenses
 1.29  28-Apr-2008  ad Add MI code to support in-kernel preemption. Preemption is deferred by
one of the following:

- Holding kernel_lock (indicating that the code is not MT safe).
- Bracketing critical sections with kpreempt_disable/kpreempt_enable.
- Holding the interrupt priority level above IPL_NONE.

Statistics on kernel preemption are reported via event counters, and
where preemption is deferred for some reason, it's also reported via
lockstat. The LWP priority at which preemption is triggered is tuneable
via sysctl.
 1.28  27-Apr-2008  ad branches: 1.28.2;
- Rename crit_enter/crit_exit to kpreempt_disable/kpreempt_enable.
DragonflyBSD uses the crit names for something quite different.
- Add a kpreempt_disabled function for diagnostic assertions.
- Add inline versions of kpreempt_enable/kpreempt_disable for primitives.
- Make some more changes for preemption safety to the x86 pmap.
 1.27  07-Jan-2008  dsl branches: 1.27.6; 1.27.8;
Actually copy the ras list onto the child process during fork() - hi ad.
Might fix the 'ras' part of kern/37650.
For some reason the itimers aren't inherited either.
 1.26  04-Jan-2008  ad Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.
 1.25  02-Jan-2008  ad Merge vmlocking2 to head.
 1.24  20-Dec-2007  dsl Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
 1.23  26-Oct-2007  ad branches: 1.23.2; 1.23.4; 1.23.8;
ras_sync: deal with spurious wakeup and add comments.
 1.22  24-Oct-2007  ad Fix debug builds.
 1.21  24-Oct-2007  ad Make ras_lookup() lockless.
 1.20  15-Aug-2007  ad branches: 1.20.2; 1.20.6;
Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.
 1.19  13-Mar-2007  thorpej branches: 1.19.6; 1.19.10;
Return EEXIST if attempting to install a RAS that is already installed.
 1.18  12-Mar-2007  ad branches: 1.18.2;
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
 1.17  04-Mar-2007  christos branches: 1.17.2;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.16  09-Feb-2007  ad branches: 1.16.2;
Merge newlock2 to head.
 1.15  01-Nov-2006  yamt remove some __unused from function parameters.
 1.14  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.13  08-Oct-2006  thorpej Add specificdata support to procs and lwps, each providing their own
wrappers around the speicificdata subroutines. Also:
- Call the new lwpinit() function from main() after calling procinit().
- Move some pool initialization out of kern_proc.c and into files that
are directly related to the pools in question (kern_lwp.c and kern_ras.c).
- Convert uipc_sem.c to proc_{get,set}specific(), and eliminate the p_ksems
member from struct proc.
 1.12  25-Nov-2005  hannken branches: 1.12.20; 1.12.22;
Make it compile on archs without __HAVE_RAS.
 1.11  24-Nov-2005  thorpej Make a couple of functions static.
 1.10  26-Feb-2005  perry branches: 1.10.4; 1.10.10;
nuke trailing whitespace
 1.9  01-Apr-2004  yamt branches: 1.9.4; 1.9.6;
ras_fork: don't do PR_WAITOK holding a spinlock.
 1.8  01-Apr-2004  yamt ras_install: don't do pool_get(PR_WAITOK) while we're holding a spinlock.
 1.7  25-Mar-2004  pooka branches: 1.7.2;
Convert pool_get()'s from nowait to waitok. We're allowed to block,
and this is more acceptable since the code assumes success.

gmcgarry ok
 1.6  04-Nov-2003  dsl Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead.
Remove p_raslock and rename p_lwplock p_lock (one lock is enough).
Simplify window test when adding a ras and correct test on VM_MAXUSER_ADDRESS.
Avoid unpredictable branch in i386 locore.S
(pad fields left in struct proc to avoid kernel bump)
 1.5  28-Jun-2003  simonb branches: 1.5.2;
Declare ras_pool in <sys/ras.h> instead of an extern declaration in
the file where it's needed.
 1.4  18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.3  09-Nov-2002  thorpej Fix signed/unsigned comparison warnings.
 1.2  03-Oct-2002  thorpej Fix debug printf format.
 1.1  28-Aug-2002  gmcgarry branches: 1.1.2; 1.1.4; 1.1.6;
MI kernel support for user-level Restartable Atomic Sequences (RAS).
 1.1.6.6  11-Nov-2002  nathanw Catch up to -current
 1.1.6.5  18-Oct-2002  nathanw Catch up to -current.
 1.1.6.4  17-Sep-2002  nathanw Include SA headers to mollify syscallargs.h
 1.1.6.3  17-Sep-2002  nathanw LWPify.
 1.1.6.2  17-Sep-2002  nathanw Catch up to -current.
 1.1.6.1  28-Aug-2002  nathanw file kern_ras.c was added on branch nathanw_sa on 2002-09-17 21:22:08 +0000
 1.1.4.3  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.4.2  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.4.1  28-Aug-2002  jdolecek file kern_ras.c was added on branch kqueue on 2002-09-06 08:47:54 +0000
 1.1.2.2  29-Aug-2002  gehenna catch up with -current.
 1.1.2.1  28-Aug-2002  gehenna file kern_ras.c was added on branch gehenna-devsw on 2002-08-29 05:23:08 +0000
 1.5.2.5  11-Dec-2005  christos Sync with head.
 1.5.2.4  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.5.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1  03-Aug-2004  skrll Sync with HEAD
 1.7.2.2  01-Apr-2004  tron Pull up revision 1.9 (requested by yamt in ticket #41):
ras_fork: don't do PR_WAITOK holding a spinlock.
 1.7.2.1  01-Apr-2004  tron Pull up revision 1.8 (requested by yamt in ticket #41):
ras_install: don't do pool_get(PR_WAITOK) while we're holding a spinlock.
 1.9.6.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.9.4.1  29-Apr-2005  kent sync with -current
 1.10.10.1  29-Nov-2005  yamt sync with head.
 1.10.4.6  21-Jan-2008  yamt sync with head
 1.10.4.5  27-Oct-2007  yamt sync with head.
 1.10.4.4  03-Sep-2007  yamt sync with head.
 1.10.4.3  26-Feb-2007  yamt sync with head.
 1.10.4.2  30-Dec-2006  yamt sync with head.
 1.10.4.1  21-Jun-2006  yamt sync with head.
 1.12.22.2  10-Dec-2006  yamt sync with head.
 1.12.22.1  22-Oct-2006  yamt sync with head
 1.12.20.4  30-Jan-2007  ad Remove support for SA. Ok core@.
 1.12.20.3  18-Nov-2006  ad Sync with head.
 1.12.20.2  09-Nov-2006  ad Fix locking botches.
 1.12.20.1  20-Oct-2006  ad Protect RAS datastructures with p_rasmutex
 1.16.2.2  24-Mar-2007  yamt sync with head.
 1.16.2.1  12-Mar-2007  rmind Sync with HEAD.
 1.17.2.2  20-Aug-2007  ad Sync with HEAD.
 1.17.2.1  13-Mar-2007  ad Sync with head.
 1.18.2.1  11-Jul-2007  mjf Sync with head.
 1.19.10.2  28-Oct-2007  joerg Sync with HEAD.
 1.19.10.1  16-Aug-2007  jmcneill Sync with HEAD.
 1.19.6.1  03-Sep-2007  skrll Sync with HEAD.
 1.20.6.1  13-Nov-2007  bouyer Sync with HEAD
 1.20.2.2  09-Jan-2008  matt sync with HEAD
 1.20.2.1  06-Nov-2007  matt sync with HEAD
 1.23.8.2  08-Jan-2008  bouyer Sync with HEAD
 1.23.8.1  02-Jan-2008  bouyer Sync with HEAD
 1.23.4.2  26-Dec-2007  ad - Push kernel_lock back into exit, wait and sysctl system calls, mainly
for visibility.
- Serialize calls to brk() from within the same process.
- Mark more syscalls MPSAFE.
 1.23.4.1  26-Dec-2007  ad Sync with head.
 1.23.2.1  18-Feb-2008  mjf Sync with HEAD.
 1.27.8.3  17-Jun-2008  yamt sync with head.
 1.27.8.2  04-Jun-2008  yamt sync with head
 1.27.8.1  18-May-2008  yamt sync with head.
 1.27.6.3  17-Jan-2009  mjf Sync with HEAD.
 1.27.6.2  29-Jun-2008  mjf Sync with HEAD.
 1.27.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.28.2.2  04-May-2009  yamt sync with head.
 1.28.2.1  16-May-2008  yamt sync with head.
 1.30.2.2  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.30.2.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.33.4.1  19-Oct-2008  haad Sync with HEAD.
 1.34.32.1  24-Feb-2012  mrg sync to -current.
 1.34.28.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.34.28.1  17-Apr-2012  yamt sync with head
 1.35.4.1  18-May-2014  rmind sync with head
 1.35.2.2  03-Dec-2017  jdolecek update from HEAD
 1.35.2.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.36.6.1  09-Jul-2016  skrll Sync with HEAD
 1.38.18.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411

RSS XML Feed