1. 25 Feb, 2021 35 commits
  2. 24 Feb, 2021 5 commits
    • Ryan Libby's avatar
      ofed: quiet gcc -Wint-in-bool-context · bf667f28
      Ryan Libby authored
      The int in the argument to the ternary triggered -Wint-in-bool-context
      from gcc.  Upstream linux has a larger and more entangled patch,
      12f727721eee61b3d19dedb95cb893b2baa9fe41, which doesn't apply cleanly.
      When we eventually sync that, we can just drop this change.
      Reviewed by:	hselasky, imp, kib
      MFC after:	3 days
      Sponsored by:	Dell EMC Isilon
      Differential Revision:	https://reviews.freebsd.org/D28762
    • Ryan Libby's avatar
      ddb: just move cursor when the lexer backs up · d8404b7e
      Ryan Libby authored
      Get rid of db_look_char because it's not compatible with db_get_line().
      This fixes the following issue:
      db> script lockinfo=show alllocks
      db> run lockinfo
      db:0:lockinfo> how alllocks
      No such command; use "help" to list available commands
      Reported by:	markj
      Reviewed by:	markj
      Sponsored by:	Dell EMC Isilon
      Differential Revision:	https://reviews.freebsd.org/D28725
    • Ryan Libby's avatar
      ddb: reliably fail with ambiguous commands · d85c9cef
      Ryan Libby authored
      db_cmd_match had an even/odd bug, where if a third command was partially
      matched (or any odd number greater than one) the search result would be
      set back from CMD_AMBIGUOUS to CMD_FOUND, causing the last command in
      the list to be executed instead of failing the match.
      Reported by:	mlaier
      Reviewed by:	markj, mlaier, vangyzen
      Sponsored by:	Dell EMC Isilon
      Differential Revision:	https://reviews.freebsd.org/D28659
    • Max Laier's avatar
      vm pqbatch: move unmanaged page assert under pagequeue lock · 14b5a3c7
      Max Laier authored
      This KASSERT is overzealous because of the following race condition:
       1) A managed page which is currently in PQ_LAUNDRY is freed.
          vm_page_free_prep calls vm_page_dequeue_deferred()
          The page state is:
       2) The laundry worker comes around and pick up the page and calls
          vm_pageout_defer(m, PQ_LAUNDRY, true) to check if page is still in the
          queue.  We do a vm_page_astate_load and get
          as per above.
       3) The laundry worker is pre-empted and another thread allocates our page
          from the free pool.  For example vm_page_alloc_domain_after calls
          vm_page_dequeue() and sets VPO_UNMANAGED because we are allocating for
          an OBJT_UNMANAGED object.
          The page state is:
             PQ_NONE, 0 - VPO_UNMANAGED
       4) The laundry worker resumes, and processes vm_pageout_defer based on the
          stale astate which leads to a call to vm_page_pqbatch_submit, which will
          trip on the KASSERT.
      Submitted by:	mlaier
      Reviewed by:	markj, rlibby
      Sponsored by:	Dell EMC Isilon
      Differential Revision:	https://reviews.freebsd.org/D28563
    • Marcin Wojtas's avatar
      Enable PIE by default on 64-bit architectures · 9a227a2f
      Marcin Wojtas authored
      This patch adds Position Independent Executables (PIE)
      flags for building OS. It allows to enable the ASLR
      feature based only on the sysctl knobs, without
      need to rebuild the image. Tests showed that
      no problems with stability / performance degradation
      were seen when using PIEs with ASLR disabled.
      The change is limited only for 64-bit architectures.
      Use bsd.opts.mk instead of the src.opts.mk in order
      to satisfy all build dependencies related to MK_PIE.
      Reviewed by: emaste, imp
      Obtained from: Semihalf
      Sponsored by: Stormshield
      Differential Revision: https://reviews.freebsd.org/D28328