Skip to content

Commit

Permalink
s390/runtime_instrumentation: fix storage key handling
Browse files Browse the repository at this point in the history
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.
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: e4b8b3f ("s390: add support for runtime instrumentation")
Reported-by: Claudio Imbrenda <[email protected]>
Signed-off-by: Heiko Carstens <[email protected]>
  • Loading branch information
hcahca committed Aug 17, 2020
1 parent b76fee1 commit 9eaba29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/kernel/runtime_instr.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static void init_runtime_instr_cb(struct runtime_instr_cb *cb)
cb->k = 1;
cb->ps = 1;
cb->pc = 1;
cb->key = PAGE_DEFAULT_KEY;
cb->key = PAGE_DEFAULT_KEY >> 4;
cb->v = 1;
}

Expand Down

0 comments on commit 9eaba29

Please sign in to comment.