• Andrew Morton's avatar
    [PATCH] Fix statically declare FIXMAPs · eb4f6fb9
    Andrew Morton authored
    From: Anton Blanchard <anton@samba.org>, me.
    
    Two uses of the FIXADDR_USER_START/END things are problematic:
    
    a) ppc64 wants the FIXADDR area to be at a different location on 32bit and
       64bit tasks.  On 32bit we want it just below 4GB but that gets in the way
       on 64bit.  By putting both right at -(some small amount) we can also use
       some ppc tricks to get there real quickly (single instruction branches).
    
    b) We assume that FIXADDR_USER_START and FIXADDR_USER_END are constants.
       This breaks the UML build.
    
    Fixes:
    
    - Call it all gate. We currently have half the stuff called fixmap and
      the other gate, lets be consistent.
    
    - Create in_gate_area(), get_gate_vma() and use it in both places
    
    - Provide defaults for in_gate_area/get_gate_vma, allowing an arch to
      override it. (I used CONFIG_* but am open to better suggestions here)
    
    - The /proc/pid/maps vma wasnt marked readable but the get_user
      vma was. That sounds suspicious to me, they are now both the same VMA
      and so have the same (read,exec) permissions
    eb4f6fb9
memory.c 43.6 KB