marked SONPROC.
- Fix a bug where all cpu_info structures except for the boot CPUs
would exist at both a CPU-local VA (CPUINFO_VA) and a gloal VA;
The boot CPU's existed only a CPUINFO_VA.
- Add a self-reference pointer to the cpu_info that references the
global address in the MULTIPROCESSOR case. Just allow it to reference
the `local' VA in the single-processor case, as CPUINFO_VA is global
enough when there's only one processor to care about. Change curcpu()
to return the global address.
marked SONPROC.
- Always make curproc, fpcurproc, astpending, and want_resched per-CPU
variables in struct cpu_info. Restructure code accordingly, and trim
a few instructions from a few spots in various places in locore.
p_cpu member to struct proc. Use this in certain places when
accessing scheduler state, etc. For the single-processor case,
just initialize p_cpu in fork1() to avoid having to set it in the
low-level context switch code on platforms which will never have
multiprocessing.
While I'm here, comment a few places where there are known issues
for the SMP implementation.
* If we get to the bottom and there is still an inodedep, set IN_MODIFIED so
that ffs_update() will force the inode block out and we can free up all the
dependencies.
* Move the clearing of IN_MODIFIED and IN_ACCESSED later, so they are not
cleared if the bread() failed.
* Explicitly set waitfor to 0 in the softdep case, if IN_MODIFIED is not
set (mirroring the bwrite()/bdwrite() decision).
had been granted access to the portmapper via hosts.{allow,deny} could use
PMAPPROC_CALLIT to call PMAPPROC_{SET,UNSET} to (un)register services as if
they were running on the local host.
The new code disallows all indirect calls to the portmapper except for
PMAPPROC_NULL unless the -i (insecure) flag has been specified.
While there, add a new flag, -p (paranoid) which also disallows indirect calls
to a small number of other services, including key parts of NFS and NIS. This
code hardcodes the services to be disallowed, and is thus somewhat of a hack,
but will serve for the time being (until portmap is replaced by rpcbind as part
of fvdl's current rpc work, due to happen before 1.5).
Problem pointed out by Frank van der Linden <fvdl@netbsd.org>, solution determined
in discussion with Frank van der Linden and with Bill Sommerfeld <sommerfeld@netbsd.org>.
Some inspiration drawn from the (less general) handling of this problem in Wietse
Venema's libwrap'ed portmap.
case, which created inodes with dependencies, but no IN_* flag set,
so the dependencies were never flushed (after the waitfor check in
ffs_update was removed).