• Russell King's avatar
    ARM: remove user cmpxchg syscall · db695c05
    Russell King authored
    Mark Brand reports that a NEEDS_SYSCALL_FOR_CMPXCHG enabled kernel would
    open a security hole in the ghost syscall used to implement cmpxchg, as
    it fails to validate the user pointer.
    
    However, in order for this option to be enabled, you'd need to be
    building a pre-ARMv6 kernel with SMP support.  There is only one system
    known which fits that, which is an early ARM SMP FPGA implementation
    based on the ARM926T.
    
    In any case, the Kconfig does not allow SMP to be enabled for pre-ARMv6
    systems.
    
    Moreover, even if NEEDS_SYSCALL_FOR_CMPXCHG were to be enabled, the
    kernel would not build as __ARM_NR_cmpxchg64 is not defined.
    
    The simple answer is to remove the buggy code.
    Reported-by: default avatarMark Brand <markbrand@google.com>
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    db695c05
unistd.h 1.49 KB