1. 04 May, 2018 24 commits
    • Matt Macy's avatar
      fix case where pidx_last might be used uninitialized · 8fd222eb
      Matt Macy authored
      Reviewed by:	sbruno
    • Matt Macy's avatar
      fix gcc8 warnings · 1ae4848c
      Matt Macy authored
      Approved by:	sbruno
    • Matt Macy's avatar
      fix gcc8 compile · d39c2658
      Matt Macy authored
      Approved by:	sbruno
    • Mark Johnston's avatar
      Fix some races introduced in r332974. · 1b5c869d
      Mark Johnston authored
      With r332974, when performing a synchronized access of a page's "queue"
      field, one must first check whether the page is logically dequeued. If
      so, then the page lock does not prevent the page from being removed
      from its page queue. Intoduce vm_page_queue(), which returns the page's
      logical queue index. In some cases, direct access to the "queue" field
      is still required, but such accesses should be confined to sys/vm.
      Reported and tested by:	pho
      Reviewed by:	kib
      Sponsored by:	Dell EMC Isilon
      Differential Revision:	https://reviews.freebsd.org/D15280
    • Ian Lepore's avatar
      Make reading imx6 gpio pins work correctly whether the pin is in open-drain · e780d0fc
      Ian Lepore authored
      mode or not.  An earlier attempt to make this work was done in r320456, by
      always reading the pad status register (PSR) instead of the data register.
      But it turns out the values in PSR only reflect the electrical level of an
      output pin if the pad is configured with the SION (Set Input On) bit in the
      pinmux config, and most output gpio pads are not configured that way.
      So now a gpio read is done by returning the value from the data register,
      which works right whether the pin is configured for input or output, unless
      the pin has been set for OPENDRAIN mode, in which case the PSR is read
      instead.  For this to work, the pin must also be configured with SION turned
      on in the fdt pinmux data, which is a reasonable thing to require for the
      unusual case of reading an open-drain output pin.
    • Stephen Hurd's avatar
      iflib: fix invalid free during queue allocation failure · b89827a0
      Stephen Hurd authored
      In r301567, code was added to cleanup to prevent memory leaks for the
      Tx and Rx ring structs. This code carefully tracked txq and rxq, and
      made sure to free them properly during cleanup.
      Because we assigned the txq and rxq pointers into the ctx->ifc_txqs and
      ctx->ifc_rxqs, we carefully reset these pointers to NULL, so that
      cleanup code would not accidentally free the memory twice.
      This was changed by r304021 ("Update iflib to support more NIC designs"),
      which removed this resetting of the pointers to NULL, because it re-used
      the txq and rxq pointers as an index into the queue set array.
      Unfortunately, the cleanup code was left alone. Thus, if we fail to
      allocate DMA or fail to configure the queues using the drivers ifdi
      methods, we will attempt to free txq and rxq. These variables would now
      incorrectly point to the wrong location, resulting in a page fault.
      There are a number of methods to correct this, but ultimately the root
      cause was that we reuse the txq and rxq pointers for two different
      Instead, when allocating, store the returned pointer directly into
      ctx->ifc_txqs and ctx->ifc_rxqs. Then, assign this to txq and rxq as
      index pointers before starting the loop to allocate each queue.
      Drop the cleanup code for txq and rxq, and only use ctx->ifc_txqs and
      Thus, we no longer need to free txq or rxq under any error flow, and
      intsead rely solely on the pointers stored in ctx->ifc_txqs and
      ctx->ifc_rxqs. This prevents the invalid free(), and ensures that we
      still properly cleanup after ourselves as before when failing to
      Submitted by:	Jacob Keller
      Reviewed by:	gallatin, sbruno
      Sponsored by:	Intel Corporation
      Differential Revision:	https://reviews.freebsd.org/D15285
    • Stephen Hurd's avatar
      iflib: remove unused brscp pointer from iflib_queues_alloc · 4d613f5d
      Stephen Hurd authored
      This pointer was no longer written to as of r315217. Since nothing writes
      to the variable, remove it.
      Submitted by:	Jacob Keller <jacob.e.keller@intel.com>
      Reviewed by:	gallatin, kmacy, sbruno
      Differential Revision:	https://reviews.freebsd.org/D15284
    • Alan Somers's avatar
      time(1): use the monotonic clock · 8a9ab042
      Alan Somers authored
      The monotonic clock is more appropriate than the realtime clock for
      measuring durations.
      Reviewed by:	ken, jilles
      Differential Revision:	https://reviews.freebsd.org/D14032
    • Kyle Evans's avatar
    • Philip Paeps's avatar
      Point out that the tzdata 2018e update brings in negative DST for certain time · ba3833a8
      Philip Paeps authored
      zones.  This does not affect the vast majority of users who do not care about
      (or even know about) the tm_isdst flag but may be slightly surprising to those
      with a more specialised interest in time zone arcana.
      MFC after:	3 days
    • Philip Paeps's avatar
      Import tzdata 2018e · d81c2dd9
      Philip Paeps authored
      Changes: https://github.com/eggert/tz/blob/2018e/NEWS
      MFC after:	3 days
    • Philip Paeps's avatar
      Import tzdata 2018e · e5646a62
      Philip Paeps authored
    • Andrey V. Elsukov's avatar
      Immediately propagate EACCES error code to application from tcp_output. · 5ada5423
      Andrey V. Elsukov authored
      In r309610 and r315514 the behavior of handling EACCES was changed, and
      tcp_output() now returns zero when EACCES happens. The reason of this
      change was a hesitation that applications that use TCP-MD5 will be
      affected by changes in project/ipsec.
      TCP-MD5 code returns EACCES when security assocition for given connection
      is not configured. But the same error code can return pfil(9), and this
      change has affected connections blocked by pfil(9). E.g. application
      doesn't return immediately when SYN segment is blocked, instead it waits
      when several tries will be failed.
      Actually, for TCP-MD5 application it doesn't matter will it get EACCES
      after first SYN, or after several tries. Security associtions must be
      configured before initiating TCP connection.
      I left the EACCES in the switch() to show that it has special handling.
      Reported by:	Andreas Longwitz <longwitz at incore dot de>
      MFC after:	10 days
    • Andriy Gapon's avatar
      opensolaris system_taskq does not need to run at maximum priority · ca7019d2
      Andriy Gapon authored
      In fact, this taskqueue should use "boring" threads, nothing special
      about them.
      MFC after:	2 weeks
    • Matt Macy's avatar
      `dup1_processes -t 96 -s 5` on a dual 8160 · 748ff486
      Matt Macy authored
      x dup_before
      + dup_after
      |             x                                            + |
      |x    x   x   x                                         ++ ++|
      |   |____AM___|                                          |AM||
          N           Min           Max        Median           Avg        Stddev
      x   5  1.514954e+08 1.5230351e+08 1.5206157e+08 1.5199371e+08     341205.71
      +   5 1.5494336e+08 1.5519569e+08 1.5511982e+08 1.5508323e+08     96232.829
      Difference at 95.0% confidence
              3.08952e+06 +/- 365604
              2.03266% +/- 0.245071%
              (Student's t, pooled s = 250681)
      Reported by:	mjg@
      MFC after:	1 week
    • Mateusz Guzik's avatar
      amd64: get rid of the pessimized bcopy in syscall arg copy · f0648bcc
      Mateusz Guzik authored
      The code was unnecessarily conditionally copying either 5 or 6 args.
      It can blindly copy 6, which also means the size is known at compilation
      time and the operation can be depessimized.
      Note the entire syscall handling code is rather slow.
      Tested on Skylake, sample result for getppid (calls/s):
      without pti: 7310106 -> 10653569
      with pti: 3304843 -> 4148306
      Some syscalls (like read) did not note any difference, other have typically
      very modest wins.
    • Mateusz Guzik's avatar
      Allow __builtin_memmove instead of bcopy for small buffers of known size · a571c385
      Mateusz Guzik authored
      See r323329 for an explanation why this is a good idea.
    • Pedro F. Giffuni's avatar
      msdosfs: long names of files are created incorrectly. · c8586688
      Pedro F. Giffuni authored
      This fixes a regression that happened in r120492 (2003) where libkiconv
      was introduced and we went from checking unlen to checking for '\0'.
      PR:		111843
      Patch by:	Damjan Jovanovic
      MFC after:	1 week
    • Kyle Evans's avatar
      style(9): add some additional useful FILES/xref information · 37394a5d
      Kyle Evans authored
      Submitted by:	0mp
      Reviewed by:	imp
      Differential Revision:	https://reviews.freebsd.org/D15196
    • Kyle Evans's avatar
      Regen src.conf(5) after r333236 · 912aad0f
      Kyle Evans authored
    • Kyle Evans's avatar
      bsdgrep: annihilate our in-tree TRE, previously disabled by default · a2584d1b
      Kyle Evans authored
      It was an old TRE that had plenty of bugs and no performance gain over
      regex(3). I disabled it by default in r323615, and there was some confusion
      about what the knob does- likely due to poor naming on my part- to the tune
      of "well, it sounds like it should speed things up" (mentioned by multiple
      To compound this, I have no intention of maintaining a second regex
      implementation. If someone would like to step up and volunteer to maintain a
      lean-and-mean implementation for grep, this is OK, but we have very few
      volunteers to maintain even our primary regex implementation.
    • Peter Grehan's avatar
      Allow arbitrary numbers of columns for VNC server screen resolution. · 51688c12
      Peter Grehan authored
      The prior code only allowed multiples of 32 for the
      numbers of columns. Remove this restriction to allow
      a forthcoming UEFI firmware update to allow arbitrary
      x,y resolutions.
      (the code for handling rows already supported non mult-32 values)
      Reviewed by:	Leon Dang (original author)
      MFC after:	3 weeks
      Differential Revision:	https://reviews.freebsd.org/D15274
    • Ed Maste's avatar
      zfs_ioctl: avoid out-of-bound read · 3804f572
      Ed Maste authored
      admbugs:	796
      Submitted by:	Domagoj Stolfa <ds815@cam.ac.uk>
      Reported by:	Ilja Van Sprundel <ivansprundel@ioactive.com>
      Reviewed by:	avg
      MFC after:	1 day
    • Ed Maste's avatar
      gpart: add fat32lba MBR partition type · b525a10a
      Ed Maste authored
      FAT32 partition with LBA addressing.
      Reviewed by:	marcel
      MFC after:	3 days
      Sponsored by:	The FreeBSD Foundation
      Differential Revision:	https://reviews.freebsd.org/D15266
  2. 03 May, 2018 16 commits