Commit Graph

124 Commits

Author SHA1 Message Date
ad
1912643ff9 Tweak the March 14th change to make page waits interlocked by pg->interlock.
Remove unneeded changes and only deal with the PQ_WANTED flag, to exclude
possible bugs.
2020-03-17 18:31:38 +00:00
ad
37049e7a04 Catch up with reality. 2020-03-14 20:25:46 +00:00
christos
0dc8cda9a3 Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
2020-03-01 18:08:12 +00:00
ad
d2a0ebb67a UVM locking changes, proposed on tech-kern:
- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart.  v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap.  Others to follow later.
2020-02-23 15:46:38 +00:00
ad
2ddceed1d9 Hopefully fix some problems seen with MP support on non-x86, in particular
where curcpu() is defined as curlwp->l_cpu:

- mi_switch(): undo the ~2007ish optimisation to unlock curlwp before
  calling cpu_switchto().  It's not safe to let other actors mess with the
  LWP (in particular l->l_cpu) while it's still context switching.  This
  removes l->l_ctxswtch.

- Move the LP_RUNNING flag into l->l_flag and rename to LW_RUNNING since
  it's now covered by the LWP's lock.

- Ditch lwp_exit_switchaway() and just call mi_switch() instead.  Everything
  is in cache anyway so it wasn't buying much by trying to avoid saving old
  state.  This means cpu_switchto() will never be called with prevlwp ==
  NULL.

- Remove some KERNEL_LOCK handling which hasn't been needed for years.
2020-01-08 17:38:41 +00:00
kamil
d383d9b590 Avoid symbol clashes in test/rump/modautoload/t_modautoload with sanitizers
Set SANITIZER_RENAME_SYMBOL.t_modautoload to:

 * sysctlbyname
 * sysctlgetmibinfo
2019-08-17 04:04:28 +00:00
martin
653f037ebe PR misc/54382: whenever open(2) is called with O_CREAT, make sure to
pass an open mode argument.
2019-07-16 17:29:17 +00:00
kre
9c62ddd5c1 Deal with fallout from the addition of
KERN_PROC_CWD in sysctl(3)
That is kern.proc.$$.KERN_PROC_CWD (I think - not that it matters here)

The effect is that -lrump now requires -lrumpvfs

This set of changes fixes (I believe) regular dynamic builds,
more might be required for static builds (will be verified soon).
2019-06-01 06:59:17 +00:00
bad
48e354a3ed Get rid of all the -lrumpdev and -lrumpvfs that are no longer needed
after moving rump's mainbus from rumpdev to rumpkern.

Produces the same atf-run results as before.
2019-05-13 17:55:07 +00:00
thorpej
9e7dc06b6e Fix a silly bug the "cancel thrash" test: the exit condition for the
job was never set, and so if the job actually got started before the
cancellation request came in, it would never finish and the cancellation
request would just hang forever.

Should address a spurious automated test failure reported by kre@.
2019-01-04 05:35:24 +00:00
thorpej
032c1d01a1 Add a test case that exercises repeated sceduling and cancelling of a job,
with periodic dropping of the interlock.
2018-12-28 19:54:36 +00:00
thorpej
fd47102229 - De-opaque'ify struct threadpool_job.
- De-_t'ify all of the structure types.

No functional chage, no ABI change (verified with old rump unit test
before and after new librump.so).

Per Taylor's request.
2018-12-26 18:54:19 +00:00
thorpej
87d5cea604 Add -lrump after -lkernspace, because kernspace.a references symbols
from librump and hooray for static linking semantics.

Fixes sun2 build issue reported by kre@.

(XXX WTF did this only start failing after the addition of t_threadpool?)
2018-12-26 14:27:23 +00:00
thorpej
41d71c6b2c Include some non-critical-but-still-for-correctness lines of code
in the cancellation unit test.  (I could have sworn I actually typed
these lines, no really...)
2018-12-25 21:26:31 +00:00
thorpej
77118773d1 Add rump-based test cases for threadpool(9). 2018-12-24 21:42:05 +00:00
ozaki-r
bd91015475 Fix build 2017-12-28 07:46:34 +00:00
ozaki-r
61673e6ea4 Add a test case for workqueue_wait 2017-12-28 07:10:25 +00:00
ozaki-r
bfde781fbe Functionalize some routines to add new tests easily (NFC) 2017-12-28 07:09:31 +00:00
ozaki-r
bf33e35aca Fix a race condition on taking the mutex
The workqueue worker can take the mutex before the tester tries to take it after
calling workqueue_enqueue. If it happens, the worker calls cv_broadcast before
the tester calls cv_timedwait and the tester will wait until the cv timed out

Take the mutex before calling workqueue_enqueue so that the tester surely calls
cv_timedwait before the worker calls cv_broadcast.

The fix stabilizes the test, t_workqueue/workqueue1.
2017-12-28 04:38:02 +00:00
ozaki-r
1315c7eeb1 Tweak use of cv_timedwait
- Handle its return value
- Specify more appropriate time-out periods (2 ticks is too short)
2017-12-28 04:36:15 +00:00
maya
da0ec449a1 Add declaration. build fix
sorry, I forgot to commit this file.
2017-09-29 13:19:57 +00:00
maya
aef814ffa9 Add simple test for workqueue(9) 2017-09-29 12:42:36 +00:00
maya
d9fb11d888 Run both tests (rather than rumptest_threadjoin twice) 2017-09-29 10:22:36 +00:00
pgoyette
45d3394e0e Fix detection of expected results. The rump kernel code apparently
includes source-code line numbers in the messages, so rather than
hard-coding them in the test, just use a reg-ex to match the text.

Fixes PR bin/52207
2017-05-03 12:09:41 +00:00
christos
c54cb81102 Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
2017-01-13 21:30:39 +00:00
christos
25f1087ae3 more tests needing <sys/stat.h> 2017-01-10 22:36:29 +00:00
christos
b3566b595a Disable aslr too since we are playing address space range tricks. 2016-10-14 16:02:35 +00:00
ozaki-r
cdc78b3fe9 Fill old_len which is required by sysctlbyname 2016-09-14 03:19:11 +00:00
christos
7366e78839 need bsd.init.mk 2016-09-10 11:04:24 +00:00
christos
b8c6512fdd don't disable PIE 2016-08-27 14:23:54 +00:00
christos
2cf6e96d2a needs mprotect disable since it loads kernel code and relocates it. 2016-08-27 14:21:07 +00:00
christos
b4ed6943ac add missing library dependencies. 2016-08-20 17:06:18 +00:00
kre
5bee7fb413 + -lrumpdev 2016-08-10 23:49:03 +00:00
kre
674d7cd1f8 + -lrumpdev 2016-08-10 23:47:14 +00:00
pooka
11f923c4b5 include <stdbool.h> for bool 2016-01-25 12:21:42 +00:00
pooka
d35b86acad Don't include <rump/rumpvnode_if.h> from rump.h. It's not needed
unless you're doing something special, but requires register_t.
Adjust the few places which actually need rumpvnode_if.h.
2016-01-25 11:45:57 +00:00
christos
ffeb8dbf4e Define _KERNTYPES for things that need it. 2016-01-23 21:22:45 +00:00
christos
abcb9cb972 bridge with the higher Makefile.inc 2016-01-23 18:54:15 +00:00
pgoyette
7e70dfdc14 Remove a left-over debugging variable. Fix the build. 2015-12-27 08:21:44 +00:00
pgoyette
738ca054ba When MODULAR kernels grew a MODULAR_DEFAULT_AUTOLOAD option, (in rev 1.98
of src/sys/kern/kern_module.c), the default was "off" for all kernels
including rump kernels.  While many (most?) kernel config files were
updated to include the new option, rump kernels weren't so lucky.  Thus,
rump kernels still had autoload disabled.

This commit uses rump_sysctl to change the module_autoload_on value to
true (ie, enabled) before trying to test if autoloading actually works.

For now, I am _not_ changing the default for all rump kernels.  I'll
leave that for another day, after all appropriate discussion has occurred.
2015-12-27 06:36:36 +00:00
pooka
fff8d9a1f5 call previous with the correct args too 2015-01-21 15:19:01 +00:00
pooka
d08959252d check that setuid() works for procs with >1 lwp 2015-01-21 15:00:50 +00:00
pooka
0397f3a735 Move sysproxy support into a separate component, rumpkern_sysproxy,
instead of it being always provided by the rump kernel base.  This
move accomplishes two things:

1) it is no longer necessary to provide sysproxy hypercall stubs for
   platforms which do not want to use sysproxy
2) it is easier to reason about the security aspects, since configurations
   not linking the sysproxy component simply do not support remote
   system calls

discussed on rumpkernel-users
2015-01-07 22:24:03 +00:00
gson
56e22ea3cf On systems that have only 32M of memory, the stress_short and
stress_long tests thrash a lot, and the stress_long test sometimes
times out, so skip them if we don't have at least 64M.
2014-08-30 12:14:17 +00:00
he
f693807fd8 Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser.  Fixes build for sun2.
2014-06-10 04:28:39 +00:00
christos
639c8a82b3 CID 978337: Fix resource leak 2014-05-12 15:33:12 +00:00
dholland
c93eb026cf remove sys/simplelock.h (straggler) 2014-03-21 22:18:57 +00:00
pooka
495782ee0e Move the "is arch capable of loading native kernel modules into
rump kernel" clauses from bsd.own.mk to Makefile.rump.  Also,
add a rump_nativeabi_p() call to determine if rump kernel is
compiled with native ABI support.
2014-03-10 22:38:53 +00:00
hannken
97834f7ba0 Change vnode operation lookup to return the resulting vnode *vpp unlocked.
Change cache_lookup() to return an unlocked vnode.

Discussed on tech-kern@

Welcome to 6.99.31
2014-02-07 15:29:20 +00:00
pooka
8b99c7c824 Use 8 TCP/IP stacks instead of 16. That still gives us plenty crossping
testing for 1/4th of the cost.
2013-09-09 19:27:49 +00:00