1. 13 Apr, 2018 18 commits
  2. 12 Apr, 2018 22 commits
    • ae's avatar
      Fix integer types mismatch for flags field in nat64stl_cfg structure. · dee0615b
      ae authored
      Also preserve internal flags on NAT64STL reconfiguration.
      Obtained from:	Yandex LLC
      MFC after:	1 week
      Sponsored by:	Yandex LLC
    • ken's avatar
      Handle Programmable Early Warning for control commands in sa(4). · 09084ed6
      ken authored
      When the tape position is inside the Early Warning area, the tape
      drive will return a sense key of NO SENSE, and an ASC/ASCQ of
      0x00,0x02, which means: End-of-partition/medium detected".  If
      this was in response to a control command like WRITE FILEMARKS,
      we correctly translate this as informational status and return
      0 from saerror().
      Programmable Early Warning should be handled the same way, but
      we weren't handling it that way.  As a result, if a PEW status
      (sense key of NO SENSE, ASC/ASCQ of 0x00,0x07, "Programmable early
      warning detected") came back in response to a WRITE FILEMARKS,
      we returned an error.
      The impact of this was that if an application was writing to a
      sa(4) device, and a PEW area was set (in the Device Configuration
      Extension subpage -- mode page 0x10, subpage 1), and a filemark
      needed to be written on close, we could wind up returning an error
      to the user on close because of a "failure" to write the filemarks.
      It actually isn't a failure, but rather just a status report from
      the drive, and shouldn't be treated as a failure.
      	For control commands in saerror(), treat asc/ascq 0x00,0x07
      	the same as 0x00,{0-5} -- not an error.  Return 0, since
      	the command actually did succeed.
      Reported by:	Dr. Andreas Haakh <andreas@haakh.de>
      Tested by:	Dr. Andreas Haakh <andreas@haakh.de>
      Sponsored by:	Spectra Logic
      MFC after:	3 days
    • ae's avatar
      Use cfg->nomatch_verdict as return value from NAT64LSN handler when · ef498e3b
      ae authored
      given mbuf is considered as not matched.
      If mbuf was consumed or freed during handling, we must return
      IP_FW_DENY, since ipfw's pfil handler ipfw_check_packet() expects
      IP_FW_DENY when mbuf pointer is NULL. This fixes KASSERT panics
      when NAT64 is used with INVARIANTS. Also remove unused nomatch_final
      field from struct nat64lsn_cfg.
      Reported by:	Justin Holcomb <justin at justinholcomb dot me>
      Obtained from:	Yandex LLC
      MFC after:	1 week
      Sponsored by:	Yandex LLC
    • ae's avatar
      Migrate NAT64 to FIB KPI. · f1ac9160
      ae authored
      Obtained from:	Yandex LLC
      MFC after:	1 week
    • bdrewery's avatar
      Use known SRCTOP if possible to determine SYSDIR. · 913eb465
      bdrewery authored
      Suggested by:	sjg
      Sponsored by:	Dell EMC
    • kib's avatar
      Fix PSL_T inheritance on exec for x86. · eda1e69e
      kib authored
      The miscellaneous x86 sysent->sv_setregs() implementations tried to
      migrate PSL_T from the previous program to the new executed one, but
      they evaluated regs->tf_eflags after the whole regs structure was
      bzeroed.  Make this functional by saving PSL_T value before zeroing.
      Note that if the debugger is not attached, executing the first
      instruction in the new program with PSL_T set results in SIGTRAP, and
      since all intercepted signals are reset to default dispostion on
      exec(2), this means that non-debugged process gets killed immediately
      if PSL_T is inherited.  In particular, since suid images drop
      P_TRACED, attempt to set PSL_T for execution of such program would
      kill the process.
      Another issue with userspace PSL_T handling is that it is reset by
      trap().  It is reasonable to clear PSL_T when entering SIGTRAP
      handler, to allow the signal to be handled without recursion or
      delivery of blocked fault.  But it is not reasonable to return back to
      the normal flow with PSL_T cleared.  This is too late to change, I
      Discussed with:	bde, Ali Mashtizadeh
      Sponsored by:	The FreeBSD Foundation
      MFC after:	3 weeks
      Differential revision:	https://reviews.freebsd.org/D14995
    • bdrewery's avatar
      Fix using wrong SYSDIR after r331683. · 8025baf8
      bdrewery authored
      This was inadvertently overriding the first found SYSDIR with the last
      of /usr/src which could result in the wrong headers being used if not
      building from /usr/src.
      SYSDIR?= is not used here to avoid evaluating the exists() when unneeded.
      Reported by:	rgrimes, sjg, Mark Millard
      Pointyhat to:	bdrewery
      Sponsored by:	Dell EMC
    • emaste's avatar
      Update vt(4) "Terminus BSD Console" font to v4.46 · 85ea16f7
      emaste authored
      "Terminus BSD Console" is a derivative of Terminus that is provided
      by Mr. Dimitar Zhekov under the 2-clause BSD license for use by the
      FreeBSD vt(4) console and other BSDs.
      PR:		227409
      MFC after:	1 week
      Sponsored by:	The FreeBSD Foundation
    • ae's avatar
      Fix indenting in ipv6.c file, use tabs instead of mixing tabs and spaces. · 6cc52e88
      ae authored
      MFC after:	1 week
    • kib's avatar
      Optimize context switch for PTI on PCID pmap. · 5a40f55a
      kib authored
      In pti-enabled pmap, the PCID allocation scheme assigns temporal id
      for the kernel page table, and user page table twin PCID is
      calculating by setting high bit in the kernel PCID.  So the kernel AS
      is mapped with per-vmspace PCID, and we must completely shut down all
      mappings in KVA when switching contexts, so that newly switched thread
      would see all changes in KVA occured while it was not executing.
      After all, KVA is same between all threads.
      Currently the pti context switch for the user part of the page table
      gets its TLB entries flushed too. It is excessive. The same PCID
      flushing algorithm that is used for non-pti pmap, correctly works for
      the UVA mappings.  The only shared TLB entries are the pages from KVA
      accessed by the kernel entry trampoline.  All of them are static
      except per-thread TSS and LDT. For TSS and LDT, the lifetime of newly
      allocated entries is the whole thread life, so it is fine as well. If
      not fine, then explicit shutdowns for current pmap of the newly
      allocated LDT and TSS pages would be enough.
      Also restore the constant value for the pm_pcid for the kernel_pmap.
      Before, for PTI pmap, pm_pcid was erronously rolled same as user
      pmap's pm_pcid, but it was not used.
      Reviewed by:	markj (previous version)
      Discussed with:	alc
      Tested by:	pho
      Sponsored by:	The FreeBSD Foundation
      MFC after:	1 month
      Differential revision:	https://reviews.freebsd.org/D14961
    • ae's avatar
      Remove printing of "not" keyword from print_ip6() function. · 117bdbcf
      ae authored
      After r331668 handling of F_NOT flag done in one place by
      print_instruction() function. Also remove unused argument from
      print_ip[6]() functions.
      MFC after:	1 week
    • ae's avatar
      Remove printing of "not" keyword from print_ip() function. · 4b88bf82
      ae authored
      After r331668 handling of F_NOT flag done in one place by
      print_instruction() function.
      MFC after:	1 week
    • emaste's avatar
      switch i386 memstick installer images to MBR · 717780fd
      emaste authored
      Some BIOSes have trouble booting from GPT in non-UEFI mode.  This is
      commonly reported with Lenovo laptops, including my x220.  As we do not
      currently support booting FreeBSD/i386 via UEFI there's no reason to
      prefer GPT.
      The "vestigial swap partition" was added in r265017 to work around an
      issue with loader's GPT support, so we should not need it when using
      We may want to make the same change to amd64, although the issue there is
      mitigated by such systems booting via UEFI in the common case.
      PR:		227422
      Reviewed by:	gjb
      MFC after:	3 weeks
      Relnotes:	Yes
      Sponsored by:	The FreeBSD Foundation
    • brooks's avatar
      Add fpa.4.gz missing in the removal of FDDI in r332412. · 14c2e3b8
      brooks authored
      Reported by:	trasz
    • brooks's avatar
      Allow -DNO_CLEAN builds across r332443. · cf97cfc9
      brooks authored
    • brooks's avatar
      Replace MD assembly exect() with a portable version. · 2e15e5ec
      brooks authored
      Originally, on the VAX exect() enable tracing once the new executable
      image was loaded.  This was possible because tracing was controllable
      through user space code by setting the PSL_T flag.  The following
      instruction is a system call that activated tracing (as all
      instructions do) by copying PSL_T to PSL_TP (trace pending).  The
      first instruction of the new executable image would trigger a trace
      This is not portable to all platforms and the behavior was replaced with
      ptrace(PT_TRACE_ME, ...) since FreeBSD forked off of the CSRG repository.
      Platforms either incorrectly call execve(), trigger trace faults inside
      the original executable, or do contain an implementation of this
      The exect() interfaces is deprecated or removed on NetBSD and OpenBSD.
      Submitted by:	Ali Mashtizadeh <ali@mashtizadeh.com>
      Reviewed by:	kib
      Differential Revision:	https://reviews.freebsd.org/D14989
    • gonzo's avatar
      Bump .Dd value (forgot to do this in r332439) · a5d1b32e
      gonzo authored
      MFC after:	3 days
      X-MFC-With:	332439
    • br's avatar
      Add SMP support for BERI CPU. · b0f263b9
      br authored
      Obtained from:	CheriBSD
      Sponsored by:	DARPA, AFRL
    • benno's avatar
      Fix a conditional that got mucked up. · 10246e83
      benno authored
      Sponsored by:	iXsystems, Inc.
    • gonzo's avatar
      Fix quotes in the example code in syslog(3) BUGS section · 204545a2
      gonzo authored
      mdoc treats verbatim quotes in .Dl as a string delimiter and does
      not pass them to the rendered output. Use special char \*q to specify
      double quote
      PR:		216755
      MFC after:	3 days
    • benno's avatar
      Remove a debugging printf that crept in. · 4d1ff9c7
      benno authored
      Sponsored by:	iXsystems, Inc.
    • benno's avatar
      Check the return value of fseek. · 1ebccb19
      benno authored
      Reported by:	Coverity
      CID:		1388267
      Sponsored by:	iXsystems, Inc.