Home | History | Annotate | Download | only in rumpkern
History log of /src/sys/rump/librump/rumpkern/emul.c
RevisionDateAuthorComments
 1.202  28-Jul-2024  bad initialize {sys,max}_{cb}devsws next to what they refer to

e.g. {sys,max}_cdevsws next to the definition of cdevsw.
 1.201  15-Oct-2023  riastradh rump: Sprinkle sys/syncobj.h here too.
 1.200  28-Sep-2023  manu Fix root search in RAID 1 sets

We use the wedge information given by bootstrap, where the kernel was
found. This requires src/sys/arch/i386/stand/i386/lib/biosdisk.c 1.59
to work in all cases.
 1.199  22-Apr-2023  riastradh rumpkern: Provide stub pnbuf_cache weak alias.

Needed only by sys_module.c handle_modctl_load, which won't work if
there's no rumpvfs linked in anyway.
 1.198  22-Apr-2023  riastradh rumpkern: Provide fs_filtops weak alias.

We should introduce a link set for sys_kfilters, but this works
around the problem for now -- librump's dependency on librumpvfs
symbols.
 1.197  26-Feb-2023  skrll nkmempages should be size_t
 1.196  30-Apr-2020  riastradh branches: 1.196.20;
Rewrite entropy subsystem.

Primary goals:

1. Use cryptography primitives designed and vetted by cryptographers.
2. Be honest about entropy estimation.
3. Propagate full entropy as soon as possible.
4. Simplify the APIs.
5. Reduce overhead of rnd_add_data and cprng_strong.
6. Reduce side channels of HWRNG data and human input sources.
7. Improve visibility of operation with sysctl and event counters.

Caveat: rngtest is no longer used generically for RND_TYPE_RNG
rndsources. Hardware RNG devices should have hardware-specific
health tests. For example, checking for two repeated 256-bit outputs
works to detect AMD's 2019 RDRAND bug. Not all hardware RNGs are
necessarily designed to produce exactly uniform output.

ENTROPY POOL

- A Keccak sponge, with test vectors, replaces the old LFSR/SHA-1
kludge as the cryptographic primitive.

- `Entropy depletion' is available for testing purposes with a sysctl
knob kern.entropy.depletion; otherwise it is disabled, and once the
system reaches full entropy it is assumed to stay there as far as
modern cryptography is concerned.

- No `entropy estimation' based on sample values. Such `entropy
estimation' is a contradiction in terms, dishonest to users, and a
potential source of side channels. It is the responsibility of the
driver author to study the entropy of the process that generates
the samples.

- Per-CPU gathering pools avoid contention on a global queue.

- Entropy is occasionally consolidated into global pool -- as soon as
it's ready, if we've never reached full entropy, and with a rate
limit afterward. Operators can force consolidation now by running
sysctl -w kern.entropy.consolidate=1.

- rndsink(9) API has been replaced by an epoch counter which changes
whenever entropy is consolidated into the global pool.
. Usage: Cache entropy_epoch() when you seed. If entropy_epoch()
has changed when you're about to use whatever you seeded, reseed.
. Epoch is never zero, so initialize cache to 0 if you want to reseed
on first use.
. Epoch is -1 iff we have never reached full entropy -- in other
words, the old rnd_initial_entropy is (entropy_epoch() != -1) --
but it is better if you check for changes rather than for -1, so
that if the system estimated its own entropy incorrectly, entropy
consolidation has the opportunity to prevent future compromise.

- Sysctls and event counters provide operator visibility into what's
happening:
. kern.entropy.needed - bits of entropy short of full entropy
. kern.entropy.pending - bits known to be pending in per-CPU pools,
can be consolidated with sysctl -w kern.entropy.consolidate=1
. kern.entropy.epoch - number of times consolidation has happened,
never 0, and -1 iff we have never reached full entropy

CPRNG_STRONG

- A cprng_strong instance is now a collection of per-CPU NIST
Hash_DRBGs. There are only two in the system: user_cprng for
/dev/urandom and sysctl kern.?random, and kern_cprng for kernel
users which may need to operate in interrupt context up to IPL_VM.

(Calling cprng_strong in interrupt context does not strike me as a
particularly good idea, so I added an event counter to see whether
anything actually does.)

- Event counters provide operator visibility into when reseeding
happens.

INTEL RDRAND/RDSEED, VIA C3 RNG (CPU_RNG)

- Unwired for now; will be rewired in a subsequent commit.
 1.195  02-Jan-2020  thorpej - Eliminate the global "boottime" variable, which was being accessed
without any synchronization against changes by e.g. clock_settime().
- Replace with new getbinboottime() / getnanoboottime() / getmicroboottime()
functions (naming mirrors that of other time access functions in kern_tc.c).
It returns the (maybe-converted) value of timebasebin, which also tracks
our estimate of when the system was booted (i.e. the legacy "boottime" was
redundant).

XXX There needs to be a lockless synchronization mechanism for reading
timebasebin, but this is a problem in kern_tc.c that pre-existed these
"boottime" changes. At least now the problem is centralized in one location.
 1.194  02-Jan-2020  martin Add shutting_down variable for rump.
 1.193  16-Dec-2019  ad - Extend the per-CPU counters matt@ did to include all of the hot counters
in UVM, excluding uvmexp.free, which needs special treatment and will be
done with a separate commit. Cuts system time for a build by 20-25% on
a 48 CPU machine w/DIAGNOSTIC.

- Avoid 64-bit integer divide on every fault (for rnd_add_uint32).
 1.192  26-Sep-2019  bad Provide a weak alias for vnode_to_path to be used unless librumpvfs is present.
 1.191  02-Jun-2019  kre branches: 1.191.2;

Apply a patch from hannken@ which adds a weak alias for rump_getcwd_common()
allowing -lrump to be used without -lrumpvfs.

This is an alternate fix to the earluer one which added -lrumvfs to
many rump based tests (and the rump server) which might be undone soon.

This also fixes the sun2 build.
 1.190  09-Mar-2019  hannken Rumpkernel has its own thread deallocation. Add missing fstrans_lwp_dtor()
to lwproc_freelwp().

PR bin/50350: rump/rumpkern/t_sp/stress_{long,short} fail on Core 2 Quad
 1.189  05-Dec-2018  christos no more need for get_expose_address() here.
 1.188  06-Oct-2018  christos add get_expose_address()
 1.187  05-Oct-2018  hannken Bring back three state file system suspension:

NORMAL -> SUSPENDING -> SUSPENDED

and add operation fstrans_start_lazy() that only blocks while SUSPENDED.

Change vndthread() support operation handle_with_rdwr() to bracket
its file system operations by fstrans_start_lazy() and fstrans_done().

PR kern/53624 (dom0 freeze on domU exit)
 1.186  10-Aug-2018  pgoyette Allow syscall_establish() to install new syscalls when the existing
entry-point is either sys_nomodule or sys_nosys. Update the
makesyscalls.sh script to create a const array of bits to allow
syscall_disestablish() to properly restore the original entry-point.
Update all the initializers of struct emul to initialize the pointer
to the bit array struct emul.

XXX Regen of all files created by makesyscalls.sh will come soon,
XXX followed by a kernel version bump (since struct emul is being
XXX modified).

This commit should address PR kern/45781 and also removes the need
for the work-around for that PR in file

sys/arch/usermode/modules/syscallemu/syscallemu.c
 1.185  21-Nov-2017  ozaki-r branches: 1.185.2; 1.185.4;
Add missing inclusion of pserialize.h (fix build)
 1.184  21-Nov-2017  ozaki-r Implement debugging feature for pserialize(9)

The debugging feature detects violations of pserialize constraints.
It causes a panic:
- if a context switch happens in a read section, or
- if a sleepable function is called in a read section.

The feature is enabled only if LOCKDEBUG is on.

Discussed on tech-kern@
 1.183  09-Nov-2017  christos added booted_method
 1.182  04-Jun-2017  hannken Operations fstrans_start() and fstrans_start_nowait() now always
use FSTRANS_SHARED as lock type so remove the lock type argument.

File system state FSTRANS_SUSPENDING is now unused so remove it.

Regen vnode_if files.

Ride 8.99.1 less than a hour ago.
 1.181  22-Feb-2017  hannken branches: 1.181.6;
Add weak aliases for _fstrans_start() and fstrans_done().
 1.180  22-Dec-2016  cherry branches: 1.180.2;
physmem should be of type psize_t

Also, use PRIxPSIZE when printf(9)ing physmem.
 1.179  26-Jan-2016  pooka branches: 1.179.2;
Put the kernelside rump kernel headers into <rump-sys> instead of
sprinkling them around the faction directories. Avoids having
to add a CPPFLAGS (or several) to pretty much every component
Makefile.

Leave compat headers around in the old locations.

The commit changes some autogenerated files, but I'll fix the
generators shortly and regen.
 1.178  22-Jan-2016  ozaki-r Fix build with RUMP_LOCKDEBUG=yes
 1.177  18-Jan-2016  pooka put lwp/proc stuff into the same source module (emul.c -> lwproc.c)
 1.176  18-Jan-2016  pooka massively reduce header pollution from times prehistoric
 1.175  18-Jan-2016  pooka boottime is a timespec, not timeval
 1.174  29-Dec-2015  pgoyette Now that the table of auto-loadable syscalls is per-emulation, make sure
that the rump-kernel has its own list. Otherwise, missing syscalls won't
trigger a module auto-load.

This commit finishes the work to get tests/lib/librumphijack/t_tcpip
nfs_autoload test case working again after 16 months of failures! (see
PR bin/49153).
 1.173  25-Aug-2015  pooka add cpu_getmodel()
 1.172  24-Jul-2015  pooka Since the rump kernel does not know when the container it's running in
actually halts, print "halted" in the hypercall.
 1.171  22-Apr-2015  pooka Include kern_clock.c in rump kernels.
 1.170  18-Apr-2015  pooka Give remote clients struct pmap storage. Although the pmap is unused,
that way we can sure that the pmap macro framework doesn't access all
the wrong places.
 1.169  03-Jan-2015  pooka Put all sysproxy routines to their own C module, sysproxy.c
 1.168  18-Nov-2014  pooka branches: 1.168.2;
delay() can't use rumpuser_clock_sleep(), because that may unschedule().

Instead, busyloop with calls to rumpuser_clock_gettime(). Fixing delay()
properly should addressed in hypercall rev.18 by introducing a nowrap
variant/flag for rumpuser_clock_sleep().
 1.167  18-Nov-2014  pooka Attempt to make sure that DELAY()/delay() is available in all MD names.
 1.166  28-May-2014  justin Add missing __diagused in rump code
 1.165  25-Apr-2014  pooka cpu_reboot() is more of an emul.c thing than a rump.c thing
 1.164  11-Mar-2014  pooka branches: 1.164.2;
Put the syncobjs in emul.c instead of locks.c so that they are
present for both locks.c and locks_up.c alike.
 1.163  20-Feb-2014  pooka + resettodr
 1.162  29-Jan-2014  pooka lwp0 needs l_proc set for panic->cpu_reboot to dump core the right way
 1.161  17-Jan-2014  pooka Use subr_cprng.c instead of stub implementation. Rijndael migrates from
rumpkern_crypto to rumpkern due to it being mandatory for cprng.
 1.160  16-Dec-2013  pooka Translate return values for emulations, e.g. Linux. For ports without
__HAVE_MINIMAL_EMUL, we simply look up the values from p->p_emul->e_errno.
For ports which cannot afford to keep an extra pointer per emul structure
around, we hope there is __HAVE_SYSCALL_INTERN support and thread the
errno values through p_emuldata. Notably, we cannot alter the syscall
method like most ports do with syscall_intern, since they do it via
p_mdproc, so MI code is not possible there.
 1.159  09-Dec-2013  pooka Support ktrace for rump kernels.

Requested by Justin Cormack on rumpkernel-users.
 1.158  30-Apr-2013  pooka branches: 1.158.4;
Flip parameter order in the clock hypercalls to make them consistent
with everything else wrt in/out parameters.
 1.157  30-Apr-2013  pooka Make hypercall calling conventions consistent: iff a hypercall can fail,
it returns an int containing the error value.
 1.156  28-Apr-2013  pooka Improve the time-related hypercalls so that's it's possible to
sleep until an absolute time on the host's monotonic clock (should
something like that be supported).
 1.155  18-Mar-2013  para calculate vnode cache size based on the resource it gets allocated from
this stops setting kern.maxvnodes to high so it exhausts available space in kmem

http://mail-index.netbsd.org/tech-kern/2013/03/08/msg015095.html
 1.154  07-Mar-2013  pooka set e_nsysent
 1.153  19-Feb-2013  martin Stopgap fix to make rump cooperate with pserialize, may be revisited later.
Patch from pooka, ok: rmind. No related regressions in a complete atf test
run (which works again with this, even on non x86 SMP machines).
 1.152  20-Jan-2013  rmind Provide xc_send_ipi() routine in RUMP, which is required for high-priority
xcall(9) mechanism. It is emulated using low-priority xcall(9).
 1.151  27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.150  21-Mar-2011  pooka branches: 1.150.4; 1.150.10; 1.150.14;
Update copyright statements.

no functional change.
 1.149  21-Jan-2011  pooka Since "physmem" is largely unused except for zfs wanting to know
if it has enough memory available, just pick a number which makes
zfs happy.

We *could* use a MIN() of available host mem and rump_memlimit,
though ...
 1.148  06-Jan-2011  pooka branches: 1.148.2; 1.148.4;
Support LOCKDEBUG. To use it, compile sys/rump with RUMP_LOCKDEBUG=yes.

requested by martin (sparc64 gdb cannot reliably produce a stack trace)
 1.147  21-Nov-2010  pooka Realize the >1yo comment above rump_reboot and retire them to make
room for sys_reboot.
 1.146  15-Oct-2010  tsutsui Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
 1.145  01-Sep-2010  pooka Implement rump_lwproc: the new lwp/proc management routines for
rump. These move the management of the pid/lwpid space from the
application into the kernel, make code more robust, and make it
possible to attach multiple lwp's to non-proc0 processes.
 1.144  23-Jun-2010  pooka As normal, fix breakage from untested commits by rmind.
 1.143  14-Jun-2010  pooka Remove comment which wasn't supposed to get committed.
 1.142  14-Jun-2010  pooka Make some stubby tty routines used by printf weak aliases, so that
the full ones will be used if we have the upcoming tty component
loaded.
 1.141  13-Jun-2010  pooka Fix previous in emul.c -- only numbers are operands for cpp comparisons.
Apparently non-numbers logically produce arch-dependent behaviour.
 1.140  13-Jun-2010  pooka deal with sun3's module disability
 1.139  13-Jun-2010  pooka add rest of sparc pagesize variables
 1.138  10-Jun-2010  pooka Use kern_proc.c instead of a collection of stubs. But what we
really wanted from this commit was the support for proc_specificdata.

TODO: make creating a new process actually use kern_proc and
maybe even add an interface which starts a process with
"any pid you don't like"
 1.137  11-May-2010  pooka adjust comment in previous.
XXX: should make that (and physmem) mean something here
 1.136  11-May-2010  pooka remove unnecessary #ifdef
 1.135  01-May-2010  pooka Now that we have a big devsw_conv0, need at least as many entries
in devsw as the highest device number in the conv table. Do a
"good for a hundred years" guess now, fix properly later.
 1.134  30-Apr-2010  pooka Include devsw_conv0 from an i386 kernel compilation (no, we don't
care about the arch as long as all the devices we care about are
present). The file should be autogenerated, but that requires some
more changes to config(1).
 1.133  28-Apr-2010  pooka Make initial devsw a little more believable. Especially adjust
max_sys_devsw, since it was previously a bit too much, given that
the correct value is 0.
 1.132  21-Apr-2010  pooka remove stuff which now comes via std. kernel source modules
 1.131  21-Apr-2010  pooka support kern_resource
 1.130  21-Apr-2010  pooka Move all signal-related from emul.c to signals.c. Additionally,
define a few alternate signal models for the rump kernel, including
ones where signals are ignored or sent to host processes.
 1.129  19-Apr-2010  pooka no \n in panic
 1.128  17-Apr-2010  pooka One emul is enough and since we need emul_netbsd, retire emul_rump.
 1.127  17-Apr-2010  pooka Move scheduling related routines from emul.c to scheduler.c
 1.126  14-Apr-2010  pooka Use kern_syscall.c instead of homegrown syscall dis/establishment routines.
 1.125  14-Apr-2010  pooka Include kern_tc and use a timecounter driver instead of homerolled
kern_tc implementation.
 1.124  31-Mar-2010  pooka We don't have a real rootdev (by default at least), so set it to NODEV.
 1.123  01-Mar-2010  pooka branches: 1.123.2;
add signal stubs required by mfs
 1.122  08-Feb-2010  joerg Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
 1.121  31-Jan-2010  pooka branches: 1.121.2;
Include newly-created subr_device.c and remove few special case
device accessor copypastes. This makes it possible to link static
binaries which use -lrumpdev.
 1.120  31-Jan-2010  pooka include kern_hook.c
 1.119  15-Jan-2010  pooka Use subr_percpu.c instead of homegrown implementation. ...except
when using malloc(3)-relegated allocators (happens in production
e.g. on Linux), since subr_percpu.c uses vmem and i don't want to
reimplement vmem.
 1.118  13-Jan-2010  pooka Minimize unnecessary differences in rump.
 1.117  13-Jan-2010  pooka Add a few symbols used by the tty code.
 1.116  09-Jan-2010  pooka Include kern_pmf.c in rumpdev.
 1.115  08-Jan-2010  dyoung Expand PMF_FN_* macros.
 1.114  25-Dec-2009  elad allow rump to build
 1.113  16-Dec-2009  pooka Generate vers.c and include it in the kernel component.
 1.112  03-Dec-2009  pooka Decide it's not worth the fuss to have rumpfs as a module and just
hardcode attach into rump_vfs_init(). Saves us from a lot of
pingpong init bouncing from one component to another to get the order
right.
 1.111  01-Dec-2009  pooka Include cpu crosscall support (instead of stubbing it out).
 1.110  26-Nov-2009  pooka For rumpfs, do mountroot instead of the bunch of homegrown hacks
currently there. Still needs a little massage to get the kernel
interfaces right and avoid copypaste especially from main().

Also, move it a bit more into the direction of a real file system
(finally!) by giving it a vfsops. Most ops are still unimplemented,
though.
 1.109  04-Nov-2009  pooka misc_stub and emul have been the same thing for a looong time now,
so just move the few remaining routines in misc_stub to emul.
 1.108  04-Nov-2009  pooka Give the kthread->pthread interface emulation its own module.
 1.107  04-Nov-2009  pooka Pull all relegating memory allocators under a common roof in memalloc.c
 1.106  04-Nov-2009  pooka move copy-related routines to their own module
 1.105  04-Nov-2009  pooka Use std. uiomove() & friends.
 1.104  21-Oct-2009  rmind Sync rump with kernel changes.
 1.103  16-Oct-2009  pooka Include sys_select.c for proper select()/poll() support.
 1.102  15-Oct-2009  pooka Give lwp usage some much-needed love: stop treating lwp0 as the
all-sink and make sure each separate thread in rump has its own
lwp. Happy-go-lucky callers will get scheduled a temporary lwp
on entry, while true lwp connoisseurs may request a stable lwp
for their purposes. Some more love may be required later down the
road, but for now different threads will stepping on each others
toes.
 1.101  15-Oct-2009  pooka Add initial work on a rump virtual cpu scheduler. This is necessary
for kernel code which has been written to avoid MP contention by
using cpu-local storage (most prominently, select and pool_cache).

Instead of always assuming rump_cpu, the scheduler must now be run
(and unrun) on all entry points into rump. Likewise, rumpuser
unruns and re-runs the scheduler around each potentially blocking
operation. As an optimization, I modified some locking primitives
to try to get the lock without blocking before releasing the cpu.

Also, ltsleep was modified to assume that it is never called without
the biglock held and made to use the biglock as the sleep interlock.
Otherwise there is just too much drama with deadlocks. If some
kernel code wants to call ltsleep without the biglock, then, *snif*,
it's no longer supported and rump and should be modified to support
newstyle locks anyway.
 1.100  14-Oct-2009  pooka "rumppriv" goes back to "rump" per internal interface naming change.
 1.99  14-Oct-2009  pooka Adjust rump sources for external/internal interfaces.
No functional change.
 1.98  09-Oct-2009  pooka Provide an interface for reboot.
 1.97  03-Oct-2009  christos Need proc_uidmatch
 1.96  24-Sep-2009  pooka remove a no longer necessary hack
 1.95  20-Sep-2009  pooka default to AB_SILENT
 1.94  07-Sep-2009  pooka provide pmf stubs
 1.93  06-Sep-2009  pooka move hppa cpp kludge to the end of the file
 1.92  04-Sep-2009  pooka add a few global symbols required by kernel code
 1.91  20-Jul-2009  pooka realloc works much better if it actually uses realloc instead of malloc
 1.90  09-Jun-2009  pooka Nuke some bss stuff which is coming from vfs_bio via rumpvfs.
 1.89  07-May-2009  pooka Don't create unpgc thread if RUMP_THREADS is 0. The benefit is the
usual: possible to run programs using AF_LOCAL without threads.
 1.88  29-Apr-2009  pooka Add proof-of-concept code for enabling system calls to rump virtual
kernels running in other processes on the same machine or on an
entirely different host. I wrote this a while ago and am now
committing it mainly to avoid losing it. It works, but could do
with a little tuning here and there.

What this will hopefully eventually buy us is the ability to use
standard userland tools to configure rump kernels, e.g. ifconfig(8)
and route(8) could be used to configure the networking stack provided
by a rump kernel. Also some distributed OS implications may apply.

fun fact: a system call which just does copyin/copyout takes >1000x
longer when made over the LAN as compared to when made on the same
machine.
 1.87  26-Apr-2009  pooka Fix getnano/microuptime to report actual uptime.
 1.86  26-Apr-2009  pgoyette Catch up with recent changes to sys/proc.h (Hello, rmind!)
 1.85  30-Mar-2009  christos we want microuptime too.
 1.84  30-Mar-2009  christos need getnanouptime not getmicrouptime
 1.83  30-Mar-2009  christos one more timeval -> timespec line
 1.82  29-Mar-2009  christos Catch up with kernel changes
 1.81  18-Mar-2009  pooka Support kqueue in the rump virtual kernel.
 1.80  18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.79  27-Feb-2009  pooka decouple rumpuser gettime from struct timeval
 1.78  26-Feb-2009  pooka Make rumpuser stat and nanosleep independent of the host system
stat and timespec definitions.
 1.77  07-Feb-2009  pooka branches: 1.77.2;
Make the clock interrupt tick based on absolute time instead of
relative time. This prevents drifting. Also, keep track of time
within userspace, so we do not have to make a syscall to get the
clock value. This is approximately 7 times cheaper, but on the
negative side is limited to the clock interrupt frequency.
 1.76  13-Jan-2009  pooka Implement block I/O as a real block driver instead of a hacked copy
of specfs. That was easier years ago when rump didn't support
devices, but brings no gain now. This allows us to include the
real specfs in rump.
 1.75  12-Jan-2009  pooka Shove in some hppa love to help with spcopy.S (why does that need
to be in libkern?).
 1.74  11-Jan-2009  pooka Protect against nfssilly in RUMP_THREADS=0
 1.73  11-Jan-2009  christos merge christos-time_t
 1.72  07-Jan-2009  pooka provide kern_realloc
 1.71  05-Jan-2009  pooka Rename malloc() to kern_malloc() to avoid name conflict with libc.
Now it is possible to use the kernel linker with rump.
 1.70  04-Jan-2009  pooka Include libkern contents in librump.
 1.69  02-Jan-2009  pooka Sauce with some kludges:
* revert rev 1.68 of emul.c: delay() is hopelessly MD and needs
whipping (not the fun kind)
* #undef DELAY in cpu.h

This will hopefully fix build for all archs and give me time to
hop through our 46521 fine archs and edit the headers.
 1.68  02-Jan-2009  pooka Export delay, _delay and delay_func symbols to attempt to appease
the macro mania set over all architectures.
 1.67  02-Jan-2009  pooka Include kernel printf routines in rump instead of relying on the
magic libc symbol. This also allows to bid farewell to subr_prf2.c
and merge the contents back to subr_prf.c. The host kernel bridging
is now done via rumpuser_putchar().
 1.66  01-Jan-2009  pooka Define MODULAR for rump core components. This enables module
loading via the kernel module framework (instead of dlopen()).
For now it only works on amd64 and i386, but for the rest it should
just be a matter of including the relevant kobj_machdep.c modules
from the kernel sources.
 1.65  30-Dec-2008  pooka properly handle kthread_exit()
 1.64  29-Dec-2008  pooka include subr_devsw in rumpkern
 1.63  21-Dec-2008  cegger branches: 1.63.2;
undo turn malloc flags to enums.
Requested by christos.

Keep malloc flag defines in kernel section.
 1.62  20-Dec-2008  cegger Turn malloc flags into an enum. Fixes build breakage.
 1.61  18-Dec-2008  pooka __KERNEL_RCSID
 1.60  17-Dec-2008  pooka If available (__NetBSD__), use pthread_setname_np() to set the
thread name for kthread_create().
 1.59  14-Dec-2008  pooka If the arch uses __BSWAP_RENAME, provide non-namespaced kernel
symbols which just call the libc symbols. Allows to get rid of
rump machine/bswap.h.

XXX:
1) this is unlikely to work on non-NetBSD
==>
2) should look into including libkern in librump
 1.58  10-Dec-2008  pooka Make non-mpsafe threads KERNEL_LOCK() before starting execution.
 1.57  27-Nov-2008  pooka Remove the whole magic ubc window thingie. All file systems use
ubc_uiomove() now, so we can hook ourselves there.
 1.56  26-Nov-2008  pooka Add a few symbols required by nfsd
 1.55  17-Nov-2008  pooka Add more verbose commentage to the module thread non-creation.
 1.54  17-Nov-2008  pooka Ignore the module unload thread.
 1.53  14-Oct-2008  pooka branches: 1.53.2; 1.53.4; 1.53.8;
Add some more trivial emulations.
 1.52  13-Oct-2008  pooka Provide psignal() so that we don't get linked against psignal(3).
As there is no real process model currently, just "trap" the signals
appropriately.
 1.51  10-Oct-2008  pooka Support callouts and call callout_hardclock() from the timer
interrupt thread.

The sleepq implementation required for callouts is horrible, kludged
only for callouts, and generally unacceptable. It needs revisiting,
but I'm not sure yet should rump or kern_timeout be improved. It's
almost untested as of now, but committing this will give me some
maneuvering space while letting application compile.
 1.50  02-Oct-2008  pooka Remove rumpuser_yield(). Not only doesn't it really make sense
here, some kind soul made it completely empty.
 1.49  30-Sep-2008  pooka Switch to std kern_auth.
 1.48  25-Sep-2008  pooka Move global malloc types from kern_malloc into a separate module.
 1.47  12-Aug-2008  pooka Make it possible to control starting of threads per env variable
instead of only at compile-time.
 1.46  04-Aug-2008  pooka Add support for using real kmem/vmem. Don't enable it by default,
though, since it a) is a lot of unnecessary indirection in rump
b) requires callouts which are so far unimplemented.
 1.45  01-Aug-2008  pooka support real sysctls
 1.44  29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.43  21-Jul-2008  pooka Repeat after me: do not pollute sys with #ifdef _RUMPKERNEL
 1.42  18-Jul-2008  pooka emulate vlog()
 1.41  25-Jun-2008  pooka branches: 1.41.2;
Don't compile kern_lock for rump any more, it's no longer required.
Allows us to get rid of the incorrect _RUMPKERNEL ifdefs outside sys/rump.
 1.40  24-Jun-2008  pooka Make kpause() use nanosleep() instead of usleep(). Fixes >=1s sleeps
to actually sleep a bit too.

from Arnaud Ysmal
 1.39  29-May-2008  pooka branches: 1.39.2;
Also fake the namecache g/c thread in kthread_create() so that file
systems can again be run without threads (and hence gdb can be used
on them).
 1.38  24-Apr-2008  ad branches: 1.38.2; 1.38.4;
Catch up with process locking changes.
 1.37  06-Apr-2008  matt branches: 1.37.2;
Add a device_xname() stub.
 1.36  25-Mar-2008  yamt - for some ports, especially for ones without pmap_growkernel,
buf_memcalc is used by bootstrap as well. fix NULL dereference for them.
- limit kva usage for each cache to 20% of vm_map. XXX a bit arbitrary.
- add a comment.
 1.35  24-Mar-2008  martin Adapt to sel* changes
 1.34  23-Mar-2008  yamt when calculating some cache sizes, consider the amount of available kva.
PR/33185.
 1.33  21-Mar-2008  ad Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.
 1.32  19-Mar-2008  bjs Add lwp_unsleep from kern/kern_lwp.c so that this builds. ok ad@
 1.31  12-Mar-2008  pooka Support multiple file systems within one process with ukfs by using
a "chroot" for each file system.
 1.30  11-Mar-2008  pooka Backup some fixes for recent breakage from local tree. Also some
other improvements such as exporting the real kernel namei and
using that in ukfs instead of the homegrown heap'o hacks namei.
"etcetc".
 1.29  15-Feb-2008  ad branches: 1.29.2; 1.29.6;
Implement yield().
 1.28  15-Feb-2008  ad Add dummy hardclock_ticks.
 1.27  27-Jan-2008  pooka Use vfs_subr.c from sys/kern. This brings differences in the vnode
life cycle between rump and a real kernel to a minimum.
 1.26  24-Jan-2008  pooka Use namei() etc. from kernel sources instead of a reimplementation.
To accommodate, give the rootvnode its own vnode op vector with a
simple lookup operation. This is used for looking up the file
system's device vnode instead of doing that directly in a homesmoked
namei().
 1.25  24-Jan-2008  pooka Don't use PAGE_SIZE when faking physmem, as it's not always available
at compile-time. We could init it runtime, but it's just a random
number anyway.
 1.24  24-Jan-2008  pooka Default physmem was too tight, increase to 256megs from 0 bytes.
 1.23  22-Jan-2008  pooka Until debugging threaded programs in NetBSD is fixed, supply the
cpp option RUMP_WITHOUT_THREADS as a workaround. If defined, it
makes rump itself operate single-threaded and prevents kthread_create()
from working.
 1.22  20-Jan-2008  joerg Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
 1.21  04-Jan-2008  pooka Print "panic: " before panicstr when panicking.
 1.20  02-Jan-2008  pooka Add the ability to run puffs in userspace. This means that puffs
can now be developed in userspace using puffs for development
(I hate emulators, they are annoyingly clumsy).

To e.g. mount psshfs using puffs-on-puffs, run fs/bin/syspuffs/syspuffs
with the regular mount_psshfs command line as an argument:

golem> ./syspuffs /usr/sbin/mount_psshfs ftp.netbsd.org:/pub /puffs

This will make the mount appear as usual, with the exception that the
requests will be passed through puffs both in the kernel and userspace:

ftp.netbsd.org:/pub on /puffs type puffs|p2k|puffs|psshfs
 1.19  11-Nov-2007  pooka branches: 1.19.6;
fix build (hi rmind!)
 1.18  04-Nov-2007  pooka branches: 1.18.2;
* sprinkle some locking into the vm code
* avoid extra insert+search+remove step in file systems using
ubc_uiomove() instead of standard uiomove()
 1.17  31-Oct-2007  pooka Make it possible to run rumps multithreaded. This brings real
locking and makes it possible to run file systems which create
threads. It also makes rump file system behaviour better match
file system behaviour in the kernel.
 1.16  24-Oct-2007  pooka branches: 1.16.2;
"flags * (M_CANFAIL | M_NOWAIT)" is probably not correct. Use & instead.
And while committing, add other random cruft I've needed recently.
 1.15  19-Oct-2007  ad machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.14  24-Sep-2007  pooka branches: 1.14.2;
Don't whine about wakeup() not being implemented every time it's
called. Nobody cares unless ltsleep() is called (and it panics).
 1.13  11-Sep-2007  briggs branches: 1.13.2;
If !_HAVE_TIMECOUNTER, initialize 'time' instead of 'time_second.'
 1.12  10-Sep-2007  pooka Provide errno from rumpuser_{gettimeofday,close}() to be consistent.
 1.11  26-Aug-2007  pooka branches: 1.11.2; 1.11.4;
few panicky functions
 1.10  20-Aug-2007  pooka branches: 1.10.2;
Hide NetBSD kernel headers completely from ukfs. This includes creating
accessors for:
* struct mount & VFS ops
* struct uio
* struct vnode
* struct vattr

and some namespace games for:
* namei flags
* VOPs
* enum vtype

Also, split rump services into two categories: library private and public
(rump_private.h and rump.h, respectively).

As a result, it is now possible to compile and use the NetBSD kernel
file systems on Linux (and probably other systems too with very
little work), although the makefiles need a bit of work to make it
a pleasureable experience.
 1.9  15-Aug-2007  pooka Wrap malloc() so that we catch the kernel arguments (namely M_ZERO)
properly. It's fairly amusing that this wasn't noticed until now.
 1.8  14-Aug-2007  pooka branches: 1.8.2;
Kill handrolled buffercache and use vfs_bio from the kernel. This is
mostly to get the flag jungle in sync with the kernel.
 1.7  13-Aug-2007  pooka Use supermarket variety vfs_vnops.c instead of homecooked routines
(that's actually a good thing here).
 1.6  13-Aug-2007  pooka compile in libkern __assert.c, argument order differs from libc model
 1.5  09-Aug-2007  pooka Add some stubs for lfs.
 1.4  08-Aug-2007  pooka Provide rumpmachine bswap.h, which makes bswapxx() call rumpuser
directly instead of relying on a symbol in rumpkern. I would like
to make it call the libc symbol directly, but I don't currently know
how to make it do that MI.

Makes hfs work (on i386), as it avoids endless recursion in bswap64().
Thanks to dillo for the image!
 1.3  08-Aug-2007  pooka * compile param.c
* move opts to a separate directory
 1.2  08-Aug-2007  pooka add microtime
 1.1  05-Aug-2007  pooka branches: 1.1.2;
Introduce RUMPs - Runnable Userspace Meta-Programs

/sys/rump contains programs which run unmodified kernel code in an
emulated userspace environment. The kernel environment is provided
by librump. Currently supported are a number of file systems,
which by using puffs integrate seamlessly into the system and
provide a similar user experience to if the code was running as
part of the kernel. Potential future rumpification targets include
for example parts of the networking stack and some device drivers.

This work was supported by Google Summer of Code 2007.
 1.1.2.2  05-Aug-2007  pooka Introduce RUMPs - Runnable Userspace Meta-Programs

/sys/rump contains programs which run unmodified kernel code in an
emulated userspace environment. The kernel environment is provided
by librump. Currently supported are a number of file systems,
which by using puffs integrate seamlessly into the system and
provide a similar user experience to if the code was running as
part of the kernel. Potential future rumpification targets include
for example parts of the networking stack and some device drivers.

This work was supported by Google Summer of Code 2007.
 1.1.2.1  05-Aug-2007  pooka file emul.c was added on branch matt-mips64 on 2007-08-05 22:28:08 +0000
 1.8.2.3  03-Sep-2007  skrll Sync with HEAD.
 1.8.2.2  15-Aug-2007  skrll Sync with HEAD.
 1.8.2.1  14-Aug-2007  skrll file emul.c was added on branch nick-csl-alignment on 2007-08-15 13:50:35 +0000
 1.10.2.4  23-Oct-2007  ad Sync with head.
 1.10.2.3  09-Oct-2007  ad Sync with head.
 1.10.2.2  20-Aug-2007  ad Sync with HEAD.
 1.10.2.1  20-Aug-2007  ad file emul.c was added on branch vmlocking on 2007-08-20 22:07:26 +0000
 1.11.4.9  24-Mar-2008  yamt sync with head.
 1.11.4.8  17-Mar-2008  yamt sync with head.
 1.11.4.7  27-Feb-2008  yamt sync with head.
 1.11.4.6  04-Feb-2008  yamt sync with head.
 1.11.4.5  21-Jan-2008  yamt sync with head
 1.11.4.4  15-Nov-2007  yamt sync with head.
 1.11.4.3  27-Oct-2007  yamt sync with head.
 1.11.4.2  03-Sep-2007  yamt sync with head.
 1.11.4.1  26-Aug-2007  yamt file emul.c was added on branch yamt-lazymbuf on 2007-09-03 14:45:26 +0000
 1.11.2.3  23-Mar-2008  matt sync with HEAD
 1.11.2.2  09-Jan-2008  matt sync with HEAD
 1.11.2.1  06-Nov-2007  matt sync with HEAD
 1.13.2.1  06-Oct-2007  yamt sync with head.
 1.14.2.2  13-Nov-2007  bouyer Sync with HEAD
 1.14.2.1  25-Oct-2007  bouyer Sync with HEAD.
 1.16.2.4  14-Nov-2007  joerg Sync with HEAD.
 1.16.2.3  04-Nov-2007  jmcneill Sync with HEAD.
 1.16.2.2  31-Oct-2007  joerg Sync with HEAD.
 1.16.2.1  24-Oct-2007  joerg file emul.c was added on branch jmcneill-pm on 2007-10-31 23:14:16 +0000
 1.18.2.2  18-Feb-2008  mjf Sync with HEAD.
 1.18.2.1  19-Nov-2007  mjf Sync with HEAD.
 1.19.6.3  23-Jan-2008  bouyer Sync with HEAD.
 1.19.6.2  08-Jan-2008  bouyer Sync with HEAD
 1.19.6.1  02-Jan-2008  bouyer Sync with HEAD
 1.29.6.6  17-Jan-2009  mjf Sync with HEAD.
 1.29.6.5  05-Oct-2008  mjf Sync with HEAD.
 1.29.6.4  28-Sep-2008  mjf Sync with HEAD.
 1.29.6.3  29-Jun-2008  mjf Sync with HEAD.
 1.29.6.2  02-Jun-2008  mjf Sync with HEAD.
 1.29.6.1  03-Apr-2008  mjf Sync with HEAD.
 1.29.2.1  24-Mar-2008  keiichi sync with head.
 1.37.2.2  04-Jun-2008  yamt sync with head
 1.37.2.1  18-May-2008  yamt sync with head.
 1.38.4.3  10-Oct-2008  skrll Sync with HEAD.
 1.38.4.2  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.38.4.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.38.2.8  09-Oct-2010  yamt sync with head
 1.38.2.7  11-Aug-2010  yamt sync with head.
 1.38.2.6  11-Mar-2010  yamt sync with head
 1.38.2.5  16-Sep-2009  yamt sync with head
 1.38.2.4  19-Aug-2009  yamt sync with head.
 1.38.2.3  20-Jun-2009  yamt sync with head
 1.38.2.2  16-May-2009  yamt sync with head
 1.38.2.1  04-May-2009  yamt sync with head.
 1.39.2.3  31-Jul-2008  simonb Sync with head.
 1.39.2.2  21-Jul-2008  simonb Sync with head.
 1.39.2.1  27-Jun-2008  simonb Sync with head.
 1.41.2.2  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.41.2.1  19-Oct-2008  haad Sync with HEAD.
 1.53.8.1  15-Feb-2014  matt Add vpanic
 1.53.4.1  15-Jul-2011  riz Pull up following revision(s) (requested by manu in ticket #1604):
sys/fs/puffs/puffs_msgif.c: revision 1.84
Apply patch from PR kern/44093 by yamt:
Interrupt server wait only on certain signals (same set at nfs -i)
instead of all signals. According to the PR this helps with
"git clone" run on a puffs file system.
 1.53.2.3  28-Apr-2009  skrll Sync with HEAD.
 1.53.2.2  03-Mar-2009  skrll Sync with HEAD.
 1.53.2.1  19-Jan-2009  skrll Sync with HEAD.
 1.63.2.5  10-Jan-2009  christos merge diffs
 1.63.2.4  04-Jan-2009  christos merge diffs.
 1.63.2.3  30-Dec-2008  christos sync with head.
 1.63.2.2  28-Dec-2008  christos missing const
 1.63.2.1  21-Dec-2008  christos file emul.c was added on branch christos-time_t on 2008-12-28 22:22:12 +0000
 1.77.2.2  23-Jul-2009  jym Sync with HEAD.
 1.77.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.121.2.3  22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.121.2.2  17-Aug-2010  uebayasi Sync with HEAD.
 1.121.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.123.2.4  21-Apr-2011  rmind sync with head
 1.123.2.3  05-Mar-2011  rmind sync with head
 1.123.2.2  03-Jul-2010  rmind sync with head
 1.123.2.1  30-May-2010  rmind sync with head
 1.148.4.1  08-Feb-2011  bouyer Sync with HEAD
 1.148.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.150.14.5  03-Dec-2017  jdolecek update from HEAD
 1.150.14.4  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.150.14.3  23-Jun-2013  tls resync from head
 1.150.14.2  25-Feb-2013  tls resync with head
 1.150.14.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.150.10.1  08-Feb-2013  riz Pull up following revision(s) (requested by rmind in ticket #794):
sys/rump/librump/rumpkern/emul.c: revision 1.152
Provide xc_send_ipi() routine in RUMP, which is required for high-priority
xcall(9) mechanism. It is emulated using low-priority xcall(9).
 1.150.4.3  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.150.4.2  23-Jan-2013  yamt sync with head
 1.150.4.1  30-Oct-2012  yamt sync with head
 1.158.4.1  18-May-2014  rmind sync with head
 1.164.2.1  10-Aug-2014  tls Rebase.
 1.168.2.6  28-Aug-2017  skrll Sync with HEAD
 1.168.2.5  05-Feb-2017  skrll Sync with HEAD
 1.168.2.4  19-Mar-2016  skrll Sync with HEAD
 1.168.2.3  22-Sep-2015  skrll Sync with HEAD
 1.168.2.2  06-Jun-2015  skrll Sync with HEAD
 1.168.2.1  06-Apr-2015  skrll Sync with HEAD
 1.179.2.2  20-Mar-2017  pgoyette Sync with HEAD
 1.179.2.1  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.180.2.1  21-Apr-2017  bouyer Sync with HEAD
 1.181.6.3  09-Oct-2018  martin Pull up following revision(s) (requested by hannken in ticket #1052):

sys/kern/vfs_trans.c: revision 1.51
distrib/sets/lists/comp/mi: revision 1.2233
share/man/man9/fstrans.9: revision 1.27
share/man/man9/Makefile: revision 1.431
sys/sys/fstrans.h: revision 1.12
sys/rump/librump/rumpkern/emul.c: revision 1.187
sys/dev/vnd.c: revision 1.266
sys/miscfs/genfs/genfs_vfsops.c: revision 1.8

Bring back three state file system suspension:

NORMAL -> SUSPENDING -> SUSPENDED

and add operation fstrans_start_lazy() that only blocks while SUSPENDED.

Change vndthread() support operation handle_with_rdwr() to bracket
its file system operations by fstrans_start_lazy() and fstrans_done().

PR kern/53624 (dom0 freeze on domU exit)
 1.181.6.2  30-Nov-2017  martin Pull up following revision(s) (requested by ozaki-r in ticket #405):
sys/sys/pserialize.h: revision 1.2
sys/kern/kern_lock.c: revision 1.160
sys/kern/subr_pserialize.c: revision 1.9
sys/rump/librump/rumpkern/emul.c: revision 1.184
sys/rump/librump/rumpkern/emul.c: revision 1.185
sys/rump/librump/rumpkern/rump.c: revision 1.330
Implement debugging feature for pserialize(9)
The debugging feature detects violations of pserialize constraints.
It causes a panic:
- if a context switch happens in a read section, or
- if a sleepable function is called in a read section.
The feature is enabled only if LOCKDEBUG is on.
Discussed on tech-kern@
Add missing inclusion of pserialize.h (fix build)
 1.181.6.1  04-Jun-2017  bouyer pullup the following revisions, requested by hannken in ticket #2:
src/share/man/man9/fstrans.9 1.25
src/sys/kern/vfs_mount.c 1.66
src/sys/kern/vfs_subr.c 1.468
src/sys/kern/vfs_trans.c 1.46
src/sys/kern/vfs_vnode.c 1.94, 1.95, 1.96
src/sys/kern/vnode_if.c 1.105, 1.106
src/sys/kern/vnode_if.sh 1.65, 1.66
src/sys/kern/vnode_if.src 1.76
src/sys/miscfs/genfs/genfs_io.c 1.69
src/sys/miscfs/genfs/genfs_vnops.c 1.196, 1.197
src/sys/miscfs/genfs/layer_extern.h 1.40
src/sys/miscfs/genfs/layer_vfsops.c 1.51
src/sys/miscfs/genfs/layer_vnops.c 1.67
src/sys/miscfs/nullfs/null_vnops.c 1.42
src/sys/miscfs/overlay/overlay_vnops.c 1.24
src/sys/miscfs/umapfs/umap_vnops.c 1.60
src/sys/rump/include/rump/rumpvnode_if.h 1.29, 1.30
src/sys/rump/librump/rumpkern/emul.c 1.182
src/sys/rump/librump/rumpvfs/rumpvnode_if.c 1.29, 1.30
src/sys/sys/fstrans.h 1.11
src/sys/sys/vnode.h 1.278
src/sys/sys/vnode_if.h 1.100, 1.101
src/sys/sys/vnode_impl.h 1.14, 1.15
src/sys/ufs/lfs/lfs_pages.c 1.12

Vnode state, lock and fstrans cleanup:
- Rename vnode state "VS_ACTIVE" to "VS_LOADED" and add synthetic
state "VS_ACTIVE" to assert a loaded vnode with usecount > 0.

- Redo FSTRANS in vnode_if.c and use it for VOP_LOCK and VOP_UNLOCK.

- Cleanup the genfs lock operations.

- Make "struct vnode_impl" member "vi_lock" a krwlock_t again.

- Remove the lock type argument from fstrans_start and
fstrans_start_nowait,
remove now unused FSTRANS state "FSTRANS_SUSPENDING".
 1.185.4.3  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.185.4.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.185.4.1  10-Jun-2019  christos Sync with HEAD
 1.185.2.3  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.185.2.2  20-Oct-2018  pgoyette Sync with head
 1.185.2.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.191.2.1  18-Oct-2023  martin Pull up following revision(s) (requested by manu in ticket #1751):

sys/dev/raidframe/rf_netbsdkintf.c: revision 1.383
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.385
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.402
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.403
sys/arch/i386/stand/lib/biosdisk.c: revision 1.59
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.377
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.378
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.379
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.392
sys/rump/librump/rumpkern/emul.c: revision 1.200
sys/arch/i386/stand/lib/biosdisk.c: revision 1.60
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.416
(all via patch)

Get &rsc->sc_dksc only when we know 'rsc' is not NULL. This was actually
harmless because we didn't use the pointer then.

Gcc -Os on landisk is not smart enough to follow the conditional
initialization and warns, unconditionaly initialize dksc at declaration
with a XXX gcc comment.

Improve wording in comments in raid_dumpblock().

in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.

Nix trailing whitespace.

if raidframe sets booted_device, log a debug message about it.
merge two debug lines in auto-root selection.
convert non-config-handled "DEBUG_ROOT" to aprint_debug().
now it's possible to get boot-time info about raidframe root
device selection with simple "boot -x".

Align the behavior of different boot methods in RAIDframe

We enforce the documented and paritally implemented behavior when
looking for the kernel in RAID 1 sets without a partition name given.

We search for:
- A GPT partition with bootme attribute set
- A FFS or LFS patititon
- The first partition

Fix root search in RAID 1 sets

We use the wedge information given by bootstrap, where the kernel was
found. This requires src/sys/arch/i386/stand/i386/lib/biosdisk.c 1.59
to work in all cases.

Fix build with -DNO_GPT
 1.196.20.1  18-Oct-2023  martin Pull up following revision(s) (requested by manu in ticket #418):

sys/arch/i386/stand/lib/biosdisk.c: revision 1.59
sys/rump/librump/rumpkern/emul.c: revision 1.200
sys/arch/i386/stand/lib/biosdisk.c: revision 1.60
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.416

Align the behavior of different boot methods in RAIDframe

We enforce the documented and paritally implemented behavior when
looking for the kernel in RAID 1 sets without a partition name given.

We search for:
- A GPT partition with bootme attribute set
- A FFS or LFS patititon
- The first partition

Fix root search in RAID 1 sets

We use the wedge information given by bootstrap, where the kernel was
found. This requires src/sys/arch/i386/stand/i386/lib/biosdisk.c 1.59
to work in all cases.

Fix build with -DNO_GPT

RSS XML Feed