• Ingo Molnar's avatar
    perf_counter, x86: Improve interactions with fast-gup · 0c871971
    Ingo Molnar authored
    Improve a few details in perfcounter call-chain recording that
    makes use of fast-GUP:
    
    - Use ACCESS_ONCE() to observe the pte value. ptes are fundamentally
      racy and can be changed on another CPU, so we have to be careful
      about how we access them. The PAE branch is already careful with
      read-barriers - but the non-PAE and 64-bit side needs an
      ACCESS_ONCE() to make sure the pte value is observed only once.
    
    - make the checks a bit stricter so that we can feed it any kind of
      cra^H^H^H user-space input ;-)
    Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    0c871971
uaccess.h 16.6 KB