1. 26 Feb, 2021 4 commits
  2. 25 Feb, 2021 36 commits
    • Mark Johnston's avatar
      pmap: Fix largemap restart checks in the kernel_maps sysctl handler · aac25e22
      Mark Johnston authored
      The purpose of these checks is to ensure that the address of the
      next-level page table page is valid, since nothing is synchronizing with
      a concurrent update of the large map and large map PTPs are freed to the
      system.  However, if PG_PS is set, there is no next level.
      Reported by:	rpokala
      Reviewed by:	kib
      Tested by:	rpokala
      MFC after:	3 days
      Sponsored by:	The FreeBSD Foundation
      Differential Revision:	https://reviews.freebsd.org/D28922
    • John Baldwin's avatar
      ktls: Use COUNTER_U64_DEFINE_EARLY for the ktls_toe_chacha20 counter. · 90972f04
      John Baldwin authored
      I missed updating this counter when rebasing the changes in
      9c64fc40 after the switch to
      COUNTER_U64_DEFINE_EARLY in 1755b2b9.
      Fixes:		9c64fc40 Add Chacha20-Poly1305 as a KTLS cipher suite.
      Sponsored by:	Netflix
    • Kristof Provost's avatar
      pf: Fix incorrect fragment handling · 5f1b1f18
      Kristof Provost authored
      A sequence of overlapping IPv4 fragments could crash the kernel in
      pf due to an assertion.
      Reported by:	Alexander Bluhm
      Obtained from:	OpenBSD
      MFC after:	3 days
      Sponsored by:	Rubicon Communications, LLC ("Netgate")
    • Baptiste Daroussin's avatar
      ncurses: fix generation of term.h · d2eb5dbd
      Baptiste Daroussin authored
      All variable were not properly expanded
      Submitted by:	cy (initial version)
    • Baptiste Daroussin's avatar
      ncurses: fix patch date · e6b81352
      Baptiste Daroussin authored
      Submitted by:	cy
    • Adrian Chadd's avatar
      [ar71xx] Fix routerstation / routerstation pro redboot FIS probing · 547739cc
      Adrian Chadd authored
      Some changes back in ye olde times somewhere has changed the default
      block size the flash device exposes.  So, the default geom redboot
      FIS probing (to find the partition table structure in flash!)
      is no longer finding it.
      So, force it to probe at the last 64k of flash regardless of the
      underlying flash block size.
      * Ubiquiti Routerstation pro, boots -HEAD MIPS
    • Brandon Bergren's avatar
      [PowerPC64LE] pseries: Fix input buffering logic. · 5001c579
      Brandon Bergren authored
      In uart_phyp_get(), when the internal buffer is empty, we make a
      hypercall to retrieve up to 16 bytes of input data from the
      hypervisor. As this is specified to be returned in BE format, we need
      to do a 64-bit byte swap on the first and second half of the data.
      If the buffer being passed in was insufficient to return the fetched
      data, we store the remainder in the internal buffer and use it to
      satisfy the following calls to uart_phyp_get() until it is drained.
      However, in this case, we were accidentally byteswapping the internal
      buffer again.
      Move the byteswapping code to just after the hypercall so it only gets
      swapped when we're filling the buffer.
      Fixes arrow keys in qemu on pseries, among other console oddities.
      Sponsored by:	Tag1 Consulting, Inc.
      MFC after:	3 days
    • Ryan Libby's avatar
      Close races in vm object chain traversal for unlock · d7671ad8
      Ryan Libby authored
      We were unlocking the vm object before reading the backing_object field.
      In the meantime, the object could be freed and reused.  This could cause
      us to go off the rails in the object chain traversal, failing to unlock
      the rest of the objects in the original chain and corrupting the lock
      state of the victim chain.
      Reviewed by:	bdrewery, kib, markj, vangyzen
      MFC after:	3 days
      Sponsored by:	Dell EMC Isilon
      Differential Revision:	https://reviews.freebsd.org/D28926
    • Cy Schubert's avatar
      rc: fix rc script parsing · f1ab7999
      Cy Schubert authored
      77e1ccbe introduced a bug whereby
      rc scripts in etc/rc.d and $local_startup failed to parse output
      from called commands because IFS was set to " " instead of the
      default " \t\n". This caused parsing of output that contains any
      whitespace character, such as tabs and newlines, not matching just a
      space to fail.
      PR:		249192
      MFC after:	3 weeks
      X-MFC with:	77e1ccbe
    • Ryan Moeller's avatar
      Install links for zpool feature compat aliases · 2ae79aa3
      Ryan Moeller authored
      The alias links were missed when this feature was introduced to the
      FreeBSD build system in 10f57cb9.
      Reviewed by:	mm
      MFC after:	1 week
      Sponsored by:	iXsystems, Inc.
      Differential Revision:	https://reviews.freebsd.org/D28925
    • Ryan Moeller's avatar
      libifconfig: Add missing symbols to map · b7109c3c
      Ryan Moeller authored
      Regenerate the list of generated symbols for libifconfig:
      grep -hr ^ifconfig_sfp_ /usr/obj/usr/src/amd64.amd64/lib/libifconfig \
      | sed 's/(.*/;/' | sort -u
      Spotted by build failures caused by a missing symbol while working on
      upgrading libifconfig from internal to private.
      Reviewed by:	markj
      Differential Revision:	https://reviews.freebsd.org/D28927
    • Edward Tomasz Napierala's avatar
      Modify lock_delay() to increase the delay time after spinning · e7a5b3bd
      Edward Tomasz Napierala authored
      Modify lock_delay() to increase the delay time after spinning,
      not before.  Previously we would spin at least twice instead of once.
      In NetApp's benchmarks this fixes a performance regression compared
      to FreeBSD 10, which called cpu_spinwait() directly.
      Reviewed By:	mjg
      Sponsored by:	NetApp, Inc.
      Sponsored by:	Klara, Inc.
      Differential Revision:	https://reviews.freebsd.org/D27331
    • Edward Tomasz Napierala's avatar
      camcontrol(8): remove unnecessary CCB zeroing · 22267215
      Edward Tomasz Napierala authored
      After 3e404b8c, cam_getccb(3) clears the returned CCB, making
      a number of calls to CCB_CLEAR_ALL_EXCEPT_HDR(3) unnecessary.
      Reviewed By:	imp
      Sponsored by:	NetApp, Inc.
      Sponsored by:	Klara, Inc.
      Differential Revision:	https://reviews.freebsd.org/D27812
    • Edward Tomasz Napierala's avatar
      camcontrol: stop pretending cam_cmd is a bitmask · f848d08e
      Edward Tomasz Napierala authored
      Cleanup only, no functional changes.
      Reviewed By:	imp
      Sponsored By:	NetApp, Inc.
      Sponsored By:	Klara, Inc.
      Differential Revision:	https://reviews.freebsd.org/D27813
    • Baptiste Daroussin's avatar
    • Baptiste Daroussin's avatar
    • Baptiste Daroussin's avatar
      ncurses: import version 6.2-20210220 · 7a656419
      Baptiste Daroussin authored
    • Renato Botelho's avatar
      ncurses: Silence MKuserdefs.sh call · 220c6d92
      Renato Botelho authored
      Remove -x flag from sh used to execute MKuserdefs.sh during ncurses
      build and stop polluting make -s output
      Reviewed by:		bapt, manu
      Approved by:		bapt
      Differential Revision:	https://reviews.freebsd.org/D28885
    • Richard Scheffenegger's avatar
      A TCP server has to take into consideration, if TCP_NOOPT is preventing · 2593f858
      Richard Scheffenegger authored
      the negotiation of TCP features. This affects most TCP options but
      adherance to RFC7323 with the timestamp option will prevent a session
      from getting established.
      PR:	253576
      Reviewed By:	tuexen, #transport
      MFC after:	3 days
      Sponsored by:	NetApp, Inc.
      Differential Revision: https://reviews.freebsd.org/D28652
    • Richard Scheffenegger's avatar
      PRR: Avoid accounting left-edge twice in partial ACK. · 31d7a27c
      Richard Scheffenegger authored
      Reviewed By:	#transport, kbowling
      MFC after:	3 days
      Sponsored by:	NetApp, Inc.
      Differential Revision:	https://reviews.freebsd.org/D28819
    • Richard Scheffenegger's avatar
      Address two incorrect calculations and enhance readability of PRR code · 48396dc7
      Richard Scheffenegger authored
      - address second instance of cwnd potentially becoming zero
      - fix sublte bug due to implicit int to uint typecase in max()
      - fix bug due to typo in hand-coded CEILING() function by using howmany() macro
      - use int instead of long, and add a missing long typecast
      - replace if conditionals with easier to read imax/imin (as in pseudocode)
      Reviewed By: #transport, kbowling
      MFC after: 3 days
      Sponsored by: NetApp, Inc.
      Differential Revision: https://reviews.freebsd.org/D28813
    • Baptiste Daroussin's avatar
      Vendor import ncurses 6.2-20210220 · bf0ab546
      Baptiste Daroussin authored
    • Emmanuel Vadot's avatar
      mkimg: Add support for offset if the source is an image · 8f3c71c8
      Emmanuel Vadot authored
      This allow us to create image with the following format:
      mkimg -v -o sdcard -s gpt -p efi:=esp_aarch64.img:1M -p freebsd-ufs::1G
      Which will add a efi partition at a 1M offset on the image with its content
      coming from the esp_aarch64.img file.
      MFC after:	3 days
    • Li-Wen Hsu's avatar
      Add if_wg.4 MLINK · 655fa044
      Li-Wen Hsu authored
    • Ed Maste's avatar
      Add UPDATING entry for PIE default · ba7ede0b
      Ed Maste authored
      As of commit 9a227a2f PIE is on by default for 64-bit architectures.
      Relnotes:	yes
    • Emmanuel Vadot's avatar
      mkimg: We always want the last block of the last inserted partition · 3b6268bb
      Emmanuel Vadot authored
      Even with an absolute offset we want to know the last block the partition
      otherwise we endup with an image the size of the metadata.
      This allow to create image with the ESP placed at a specific position which
      is useful on arm/arm64 where u-boot have always a hard time to read the ESP
      if it's not aligned on 512k.
      mkimg -v -o sdcard -s gpt -p efi::54M:1M -p freebsd-ufs::1G
      now works.
      MFC after:	3 days
    • Mark Johnston's avatar
      buf: Fix the dirtybufthresh check · 369706a6
      Mark Johnston authored
      dirtybufthresh is a watermark, slightly below the high watermark for
      dirty buffers.  When a delayed write is issued, the dirtying thread will
      start flushing buffers if the dirtybufthresh watermark is reached.  This
      helps ensure that the high watermark is not reached, otherwise
      performance will degrade as clustering and other optimizations are
      disabled (see buf_dirty_count_severe()).
      When the buffer cache was partitioned into "domains", the dirtybufthresh
      threshold checks were not updated.  Fix this.
      Reported by:	Shrikanth R Kamath <kshrikanth@juniper.net>
      Reviewed by:	rlibby, mckusick, kib, bdrewery
      Sponsored by:	Juniper Networks, Inc., Klara, Inc.
      Fixes:		3cec5c77
      MFC after:	1 week
      Differential Revision:	https://reviews.freebsd.org/D28901
    • Mark Johnston's avatar
      sendfile: Use the pager size to determine the file extent when possible · faa998f6
      Mark Johnston authored
      Previously sendfile would issue a VOP_GETATTR and use the returned size,
      i.e., the file size.  When paging in file data, sendfile_swapin() will
      use the pager to determine whether it needs to zero-fill, most often
      because of a hole in a sparse file.  An attempt to page in beyond the
      end of a file is treated this way, and occurs when the requested page is
      past the end of the pager.  In other words, both the file size and pager
      size were used interchangeably.
      With ZFS, updates to the pager and file sizes are not synchronized by
      the exclusive vnode lock, at least partially due to its use of
      MNTK_SHARED_WRITES.  In particular, the pager size is updated after the
      file size, so in the presence of a writer concurrently extending the
      file, sendfile could incorrectly instantiate "holes" in the page cache
      pages backing the file, which manifests as data corruption when reading
      the file back from the page cache.  The on-disk copy is unaffected.
      Fix this by consistently using the pager size when available.
      Reported by:	dumbbell
      Reviewed by:	chs, kib
      Tested by:	dumbbell, pho
      MFC after:	1 week
      Sponsored by:	The FreeBSD Foundation
      Differential Revision:	https://reviews.freebsd.org/D28811
    • Andrey V. Elsukov's avatar
      ipfw: make algo name argument optional for some table types · 13ad237a
      Andrey V. Elsukov authored
      Most of table types currently supported by ipfw have only one
      algorithm implementation. When user creates such tables, allow
      to omit algo name in arguments. E.g. now it is possible:
      	ipfw table T1 create type number
      	ipfw table T2 create type iface
      	ipfw table T3 create type flow
      PR:		233072
      MFC after:	1 week
      Sponsored by:	Yandex LLC
    • Baptiste Daroussin's avatar
      bootstrap: fix a last edit typo · b6a51d39
      Baptiste Daroussin authored
      Reported by:	cy
    • Baptiste Daroussin's avatar
      terminfo: add terminfo database · 2a50a9de
      Baptiste Daroussin authored
      Tested by:	manu, jbeich
    • Baptiste Daroussin's avatar
      bootstrap: add tic to the bootstrap tools · 0af562d7
      Baptiste Daroussin authored
      tic is necessary early in the build to be able to build the terminfo
      database later on.
      Tested by:	manu, jbeich
    • Baptiste Daroussin's avatar
      ncurses: Add support for terminfo database · 61f66a1f
      Baptiste Daroussin authored
      Along with the termcap database, ncurses will now lookup for the
      terminfo database, note that the terminfo database is being looked
      up first and then it fallsback on the termcap one.
      While here drop our custom reader for the termcap database, over the
      time it is needed maintenance to be able to catchup with changes on ncurses
      Install the ncurses tools which are needed to deal with the terminfo
      database: tic, infocmp, toe
      Replace our termcap only aware tools with the ncurses counterpart:
      tput, tabs, tset, clear and reset
      In particular they can your the extra capabilities described in the
      terminfo database, which does not exist in termcap
      Note that to add a new terminfo information to the database from ports
      the ports will just need to add their extra information into:
      Tested by:	jbeich, manu
    • Andrew Turner's avatar
      Limit when we call DELAY from KCSAN on amd64 · 3fd63ddf
      Andrew Turner authored
      In some cases the DELAY implementation on amd64 can recurse on a spin
      mutex in the i8254 early delay code. Detect when this is going to
      happen and don't call delay in this case. It is safe to not delay here
      with the only issue being KCSAN may not detect data races.
      Reviewed by:	kib
      Tested by:	arichardson
      Sponsored by:	Innovate UK
      Differential Revision:	https://reviews.freebsd.org/D28895
    • Andrew Turner's avatar
      Use pmap_qenter in the N1SDP PCIe driver · 59f6ddb2
      Andrew Turner authored
      In the Neoverse N1 SDP PCIe driver we need to map a page shared
      between the firmware and the kernel. Previously we would use
      pmap_kenter for this, however as this is not standardised between
      architectures switch to the common pmap_qenter.
      While here fix the error handling code to clean up on failure.
      Reviewed by:	br
      Sponsored by:	Innovate UK
      Differential Revision:	https://reviews.freebsd.org/D28890
    • Kristof Provost's avatar
      bridge tests: Test that we also forward on some interfaces · 7a4dbffa
      Kristof Provost authored
      Ensure that we not only block on some interfaces, but also forward on
      some. Without the previous commit we wound up discarding on all ports,
      rather than only on the ports needed to break the loop.
      MFC after:	1 week
      Sponsored by:	Orange Business Services
      Differential Revision:	https://reviews.freebsd.org/D28917