gss_impl.c: Fix a nfsd hang when the kgssapi.ko is loaded, but no gssd
After the conversion to using netlink, the kgssapi had
no way of knowing if the gssd daemon was running.
As such, a boot where the kgssapi is loaded, but the
gssd is not enabled would hang the nfsd for a very
long time. (Many timeouts at 300sec each.)
This patch adds a Null RPC upcall with a 200msec
timeout to check to see if the gssd is running.
If the gssd is not running, the nfsd starts up
(without Kerberos support) with only a 200msec
delay.)
Also, move the svc_svc_nl_create() and svc_reg() calls in gssd.c
to before the daemon() call, so they are guaranteed to have
been done before the nfsd(8) daemon is started by
the rc scripts.
[4 lines not shown]
powerpc/booke: Save watchdog context to "critical" save area
Watchdog interrupt is a "critical" interrupt, so save the correct
registers (CSSRn, into critical save area).
powerpc/pmap: Use variable-sized TID
e6500 core supports 14-bit TIDs (16384), while all earlier cores support
only 8 bit TIDs. Dynamically allocate the tidbusy array at bootstrap
time so that it stays in the TLB1, but is sized appropriately for the
core. With MAXCPU of 32, a e6500 tidbusy would be (8 * 32 * 16384), or
4MB for this array, while e5500 would use (8 * 32 * 256), or 64kB.
powerpc/booke: Extend TID register bits to the max
Some Book-E cores (at least e6500) can have much larger PID fields, up
to 14 bits. Extend the PID mask space to the full space, and future
changes may take advantage of this extended space.
meta.autodep.mk remove extra }
remove extra } from GENDIRDEPS_ENV
more debug output for gendirdeps.mk
Reviewed by: stevek
Differential Revision: https://reviews.freebsd.org/D57727
Source upgrade doc: etcupdate no longer needs -B
Note: We confusingly have the instructions to build the system in the
build manual, the UPDATING file, and the Makefile. These will get out
of sync and will be harmful when they do.
Fixes: ddf6fad0295a ("etcupdate: Make nobuild the default")
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D57644
mem*.3: stop refering to strings
POSIX and the C standard now refer to objects and sequences rather
than confusingly revering to strings.
Also update bcopy(3) and bzero(3).
Reviewed by: emaste
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D57680
uiomove_*: centralize the copy function selection
Add a uiomove_step() for the central set of switch statements which
choose between userspace and kernel and if data is going to or from the
iovec.
Refactor uiomove_fromphys loops to unconditionally free per-iteration
resources and drop gotos.
While here, switch from bcopy to memcpy.
Reviewed by: kib
Suggested by: emaste
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D57688
pmap: prefer memcpy over bcopy
Alter pmap_copy_page(s) to use memcpy rather than the deprecated bcopy.
We'll be adding non-provenance preserving versions for CHERI support and
would like to avoid introducing variants of deprecated APIs just to
maintain symmetry.
Reviewed by: kib
Suggested by: emaste
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D57687
kern_exec.c: explicitly include sys/limits.h for UINT_MAX
While there, remove unneeded manual inclusion of sys/cdefs.h.
Fixes: e1a84b7708c2 ("execve_block(): a mechanism for mutual exclusion with execve() on the process")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
amd64: do not restore fsbase/gsbase for 32bit processes
There is no WRFSBASE and WRGSBASE 32bit variants at all. As such, the
fsbase and gsbase must always be equal to the bases in the corresponding
segment descriptor, same as on real i386.
If a 32bit program reloads either %fs or %gs using setcontext(9) or
sigreturn(9), restoring bases from the syscall entry time is wrong.
In all other cases, hardware already does the right action when the
segment register is loaded, and the bases for the ufssel/ugssel in GDT
are updated on the context switch.
Reviewed by: markj (previous version)
Tested by: terehovv at mail.ru
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57611
sys_set*id(9): wait for the execblocks to pass
to ensure stability of the process uid/gids during the
p_cansee()/p_candebug()-protected regions.
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57497
pfs_readdir(): block the target process from execing
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57497
pseudofs: ensure that the target process vmspace is stable for VOP_READ/WRITE
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57497
kern_event: block the target process from execing for sysctl kern.proc.kqueue
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57497
proc: Allow to make proc_rwmem() operate on a consistent address space
Provide proc_vmspace_ref() to safely obtain the reference to the target
process vmspace, optionally
- requiring that the target cannot execve(2) and thus cannot change its
vmspace until vmspace in unreferenced
- requiring the check of permissions of the caller after the vmspace
reference is obtained, since the process lock might have been dropped
in the process.
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57497
execve_block(): a mechanism for mutual exclusion with execve() on the process
A consumer of execve_block(9) is synchorized with the execution of
execve(2) family of syscalls, ensuring that execve_block region is
mutually exclusive with the execve processing. Either execve_block() or
execve() would sleep until other finishes.
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57497