.th PBB VIII 4/21/86
.sh "NAME"
PBB - Process Bootstrapper
.sh "DESCRIPTION"
The Process Bootstrapper may only be used by a process executing in
supervisor space.  It is an intermediary that is brought into execution
via the K_invoke and K_spawn Kernel calls.  The function of the PBB is
to replace the segments of its process with segments filled from the
image files specified in the argument segment passed to the
Bootstrapper.  After this replacement has been accomplished, the PBB
sets the privileges, sets the effective user and group id's, and
transfers control to the supervisor domain at a well-defined location.
.sp
The steps performed when an invoke or spawn 
is executed, using 
PBB
as the intermediary, are given below.
.sp
.lp 14 7
a.     For the pdp-11, the calling process (via the spawn/invoke interfaces used by the NKSR)
will construct the argument segment
for the process bootstrapper.
The argument block is built in location 0, user domain, d-space.
.sp
.lp 14 7
b.     It will then map the argument segment out of its' address space.
.sp
.lp 14 7
c.     K_invoke or K_spawn will be called.
(K_invoke will release all of the calling segments
except the argument segment. K_spawn will
only instantiate the argument segment.)
.sp
.lp 14 7
d.     For the pdp-11, K_invoke/K_spawn will then rendezvous with a copy of the intermediary
segment and put it at supervisor domain, i-space, address 0.
The current pc/ps will be set to address 0 in the supervisor
domain. This set up is required for the process bootstrapper to
run non-separate I&D.
.sp
.lp 14 7
e.     For the pdp-11, the process bootstrapper will map the argument segment
into its supervisor i-space, thus maintaining
non-separate I&D.
.sp
.lp 14 7
f.     The process bootstrapper will then build the invoked supervisor
domain image in the user domain and then map it
out, and use K_set_segment_status to make the
vitual address be supervisor domain instead of user domain.
.sp
.lp 14 7
g.     The process bootstrapper will then build the invoked user
domain image in the user domain.
.sp
.lp 14 7
h.     The process bootstrapper will release the argument segment.
.sp
.lp 14 7
i.     The process bootstrapper will then issue a K_boot call with
the segment descriptor of the intermediary segment.
The K_boot Kernel call will release the intermediary
segment and then map in the supervisor domain segments
to where they belong. The pc/ps will be set to address
0 in the supervisor domain.
.sp
The invoked process image now exists and is executing.
.i0
.i7
.sp
.sp
The initial process builds two bootstrapper segments:
a user process bootstrapper and a Secure Server bootstrapper segment.
.s3
The user process boostrapper segment
is available to all users.
The new process runs at the same level as the parent process,
and is given the privileges of its' a.out file.
.s3
The Secure Server process bootstrapper segment
is only used by the NKSR and exists at system high level.
It takes a tii structure as part of the argument block.
The child process runs with a tii equal to that which
was passed in the argument block.
.i0
.i7
.s3
Once the process bootstrapper segments are built, the secure initiator
process (SIP) makes directory entries "/sys/sysbin/userPBB" and
"/sys/sysbin/serverPBB".
.bp
The user process bootstrapper argument segment
has the following format:
.nf


	      |-------------------------------|
	      |                               |
	      |       User Domain             |
	      |                               |
	      |         Arguments             |
	      |                               |
	      |                               |
      160014B |-------------------------------|
  + supv_size |                               |
	      |       Supervisor Domain       |
	      |                               |
	      |         Arguments             |
	      |                               |
  args_addr = |                               |
      160014B |-------------------------------|
	      |       User arguments size     | = user_size
      160012B |-------------------------------|
	      |   Supervisor arguments size   | = supv_size
      160010B |-------------------------------|
	      |                               |
	      |       User Domain f_seid      | = user_seid
	      |                               |
      160004B |-------------------------------|
	      |                               |
	      |    Supervisor Domain f_seid   | = supv_seid
	      |                               |
      160000B |-------------------------------|
      = argseg_addr


.fi
.bp
The Secure Server process bootstrapper argument segment
has the following format:
.nf


	      |-------------------------------|
	      |                               |
	      |       User Domain             |
	      |                               |
	      |         Arguments             |
	      |                               |
	      |                               |
      160014B |-------------------------------|
  + supv_size |                               |
	      |       Supervisor Domain       |
	      |                               |
	      |         Arguments             |
	      |                               |
  args_addr = |                               |
      160034B |-------------------------------|
	      |             TII               | = tii
      160014B |-------------------------------|
	      |       User arguments size     | = user_size
      160012B |-------------------------------|
	      |   Supervisor arguments size   | = supv_size
      160010B |-------------------------------|
	      |                               |
	      |       User Domain f_seid      | = user_seid
	      |                               |
      160004B |-------------------------------|
	      |                               |
	      |    Supervisor Domain f_seid   | = supv_seid
	      |                               |
      160000B |-------------------------------|
      = argseg_addr


.fi


.sh FILES
/sys/sysbin/userPBB
/sys/sysbin/serverPBB
.sh "SEE ALSO"
SIP(VIII)
