MFC r271571:

Fix two small nits in ctl.conf(5).

Approved by:	re (glebius)
Sponsored by:	The FreeBSD Foundation
MFH (r271255): fix parsing of ipv6 nameserver lines

Approved by:	re (kib)
MFH (r271256, r271617): avoid segfault if PAM_RHOST nor PAM_TTY are unset.

Approved by:	re (gjb)
PR:		83099
vt(4): Merge several bug fixes and improvements

SVN revisions in this MFC:
  269779 270705 270706 271180 271250 271253 271682 271684

Detailed commit list:

r269779:
  fbd: Fix a bug where vt_fb_attach() success would be considered a failure

  vt_fb_attach() currently always returns 0, but it could return a code
  defined in errno.h. However, it doesn't return a CN_* code. So checking
  its return value against CN_DEAD (which is 0) is incorrect, and in this
  case, a success becomes a failure.

  The consequence was unimportant, because the caller (drm_fb_helper.c)
  would only log an error message in this case. The console would still
  work.

  Approved by:	nwhitehorn

r270705:
  vt(4): Add cngrab() and cnungrab() callbacks

  They are used when a panic occurs or when entering a DDB session for
  instance.

  cngrab() forces a vt-switch to the console window, no matter if the
  original window is another terminal or an X session. However, cnungrab()
  doesn't vt-switch back to the original window currently.

r270706:
  drm: Don't "taskqueue" vt-switch if under DDB/panic situation

  If DDB is active, we can't use a taskqueue thread to switch away from
  the X window, because this thread can't run.

  Reviewed by:	ray@
  Approved by:	ray@

r271180:
  vt_vga: vd_setpixel_t and vd_drawrect_t are noop in text mode

r271250:
  vt(4): Change the terminal and buffer sizes, even without a font

  This fixes a bug where scroll lock would not work for tty #0 when using
  vt_vga's textmode. The reason was that this window is created with a
  static 256x100 buffer, larger than the real size of 80x25.

  Now, in vt_change_font() and vt_compute_drawable_area(), we still
  perform operations even of the window has no font loaded (this is the
  case in textmode here vw->vw_font == NULL). One of these operation
  resizes the buffer accordingly.

  In vt_compute_drawable_area(), we take the terminal size as is (ie.
  80x25) for the drawable area.

  The font argument to vt_set_border() is removed (it was never used) and
  the code now uses the computed drawable area instead of re-doing its own
  calculation.

  Reported by:	Harald Schmalzbauer <h.schmalzbauer_omnilan.de>
  Tested by:	Harald Schmalzbauer <h.schmalzbauer_omnilan.de>

r271253:
  pause_sbt(): Take the cold path (ie. use DELAY()) if KDB is active

  This fixes a panic in the i915 driver when one uses debug.kdb.enter=1
  under vt(4).

  PR:		193269
  Reported by:	emaste@
  Submitted by:	avg@

r271682:
  vt(4): Fix a LOR which occurs during a call to vt_upgrade()

  Reported by:	kib@
  Review:		https://reviews.freebsd.org/D785
  Reviewed by:	ray@
  Approved by:	ray@

r271684:
  vt(4): Use vt_fb_drawrect() and vt_fb_setpixel() in all vt_fb-derivative

  Review:		https://reviews.freebsd.org/D789
  Reviewed by:	nwhitehorn
  Approved by:	nwhitehorn

Approved by:	re (gjb)
MFC tty fixes, r259549 and r259663

Keep tty_makedev as a function to preserve the KBI on 10-stable
(it is a macro in CURRENT). The changes for this are direct
commits to 10-stable.

r259549 (glebius):
  - Rename tty_makedev() into tty_makedevf() and make it capable
    to fail and return error.
  - Use make_dev_p() in tty_makedevf() instead of make_dev_cred().
  - Always pass MAKEDEV_CHECKNAME flag.
  - Optionally pass MAKEDEV_REF flag.
  - Provide macro for compatibility with old API.

  This fixes races with simultaneous creation and desctruction of
  ttys, and makes it possible to call tty_makedevf() from device
  cloners.

  A race in tty_watermarks() still exist, since the latter drops
  lock for M_WAITOK allocation. This will be addressed in separate
  commit.

r259663 (glebius):
  Move list of ttys handling from the allocating procedures, to the
  device creation stage. A device creation can fail, and in that case
  an entry already on the list will be freed.

KBI issue pointed out by:       kib
Reviewed by:    kib (KBI addition)
Approved by:    re (kib)
MFC r271429:
Persist vdev_resilver_txg changes to avoid panic caused by validation
vs a vdev_resilver_txg value from a previous resilver.

Approved by:	re (glebius)
Sponsored by:	Multiplay
MFC r271552:

Make the default choice for the chroot shell at the end be "No". This allows
just pressing enter repeatedly to successfully install a reasonable system.

Approved by:	re (gjb)
MFC r257770 r257818 r257823 r260066 r260067 r260089 r260145 r268587 r268588
    r268589 r268590 r268593 r268597 r269758 r270845 r270847 r270893 r270932
    r270947 r271147

Merge libm work by kargl, bde and das from the past few months.
Besides optimisations and small bug fixes this includes new implementations
for C99 functions expl, coshl, sinhl, tanhl, erfl and erfcl.

Approved by:	re (kib)