public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
  • * Re: futex_cmpxchg_enabled breakage
           [not found] <20180829222221.GA22017@brightrain.aerifal.cx>
           [not found] ` <alpine.DEB.2.21.1808301109220.1210@nanos.tec.linutronix.de>
    @ 2018-09-16 12:16 ` Florian Weimer
      2018-09-16 13:16   ` Rich Felker
      1 sibling, 1 reply; 5+ messages in thread
    From: Florian Weimer @ 2018-09-16 12:16 UTC (permalink / raw)
      To: Rich Felker
      Cc: Thomas Gleixner, linux-kernel, Peter Zijlstra, Ingo Molnar,
    	linux-man, Michael Kerrisk (man-pages)
    
    * Rich Felker:
    
    > I just spent a number of hours helping someone track down a bug that
    > looks like it's some kind of futex_cmpxchg_enabled detection error on
    > powerpc64 (still not sure of the root cause; set_robust_list producing
    > -ENOSYS), and a while back I hit the same problem on sh2 due to lack
    > of EFAULT on nommu, leading to commit 72cc564f16ca. I think the test
    > (introduced way back in commit a0c1e9073ef7) is fundamentally buggy;
    > if anything, it should be checking for !=-ENOSYS, not ==-EFAULT.
    > Presumably it could also fail to produce -EFAULT if mmap_min_addr is 0
    > and page 0 is mapped (a bad idea, but maybe someone does it...). And
    > of course other nommu archs are possibly still broken.
    
    Maybe it was related to this (“Kernel 4.15 lost set_robust_list
    support on POWER 9”):
    
    <https://lists.ozlabs.org/pipermail/linuxppc-dev/2018-February/168570.html>
    
    The Kconfig change you suggest was explicitly rejected as the fix.
    
    I believe the expected userspace interface is that you probe support
    with set_robust_list first, and then start using the relevant futex
    interfaces only if that call succeeded.  If you do that, most parts of
    a typical system will work as expected even if the kernel support is
    not there, which is a bit surprising.  It definitely makes the root
    cause harder to spot.
    
    ^ permalink raw reply	[flat|nested] 5+ messages in thread

  • end of thread, other threads:[~2018-09-17 16:51 UTC | newest]
    
    Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <20180829222221.GA22017@brightrain.aerifal.cx>
         [not found] ` <alpine.DEB.2.21.1808301109220.1210@nanos.tec.linutronix.de>
         [not found]   ` <20180830135527.GT1878@brightrain.aerifal.cx>
         [not found]     ` <alpine.DEB.2.21.1809151726290.1650@nanos.tec.linutronix.de>
         [not found]       ` <20180915161554.GS1878@brightrain.aerifal.cx>
    2018-09-15 16:58         ` futex_cmpxchg_enabled breakage Rich Felker
    2018-09-16 12:16 ` Florian Weimer
    2018-09-16 13:16   ` Rich Felker
    2018-09-16 13:38     ` Florian Weimer
    2018-09-17 16:51       ` Rich Felker
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox