• Heiko Carstens's avatar
    s390/ptrace: fix storage key handling · c5599b90
    Heiko Carstens authored
    [ Upstream commit fd78c594 ]
    
    The key member of the runtime instrumentation control block contains
    only the access key, not the complete storage key. Therefore the value
    must be shifted by four bits. Since existing user space does not
    necessarily query and set the access key correctly, just ignore the
    user space provided key and use the correct one.
    Note: this is only relevant for debugging purposes in case somebody
    compiles a kernel with a default storage access key set to a value not
    equal to zero.
    
    Fixes: 262832bc ("s390/ptrace: add runtime instrumention register get/set")
    Reported-by: default avatarClaudio Imbrenda <imbrenda@linux.ibm.com>
    Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    c5599b90
ptrace.c 46.4 KB