• P
    [PATCH] uml: fix access_ok · 7a590611
    Paolo 'Blaisorblade' Giarrusso 提交于
    The access_ok_tt() macro is bogus, in that a read access is unconditionally
    considered valid.
    
    I couldn't find in SCM logs the introduction of this check, but I went back to
    2.4.20-1um and the definition was the same.
    
    Possibly this was done to avoid problems with missing set_fs() calls, but
    there can't be any I think because they would fail with SKAS mode.
    TT-specific code is still to check.
    
    Also, this patch joins common code together, and makes the "address range
    wrapping" check happen for all cases, rather than for only some.
    
    This may, possibly, be reoptimized at some time, but the current code doesn't
    seem clever, just confused.
    
    * Important: I've also had to change references to access_ok_{tt,skas} back to
      access_ok - the kernel wasn't that happy otherwise.
    Signed-off-by: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
    Acked-by: NJeff Dike <jdike@addtoit.com>
    Signed-off-by: NAndrew Morton <akpm@osdl.org>
    Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
    7a590611
um_uaccess.h 3.9 KB