[strace/strace] printsiginfo: decode si_pkey field (PR #210)

Slava notifications at github.com
Wed Feb 2 12:17:30 UTC 2022


This adds decoding of `si_pkey` field  which is set on `SIGSEGV` in case
of memory access violation on some modern CPUs (these have `pku` flag in `/proc/cpuinfo`).

Here's few sample outputs:

```
pkey_alloc(0, 0)                        = 3
pkey_mprotect(0x7f3f20662000, 4096, PROT_READ|PROT_WRITE, 3) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_PKUERR, si_addr=0x7f3f20662000, si_pkey=3} ---
```
or another case:
```
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f137374b000
mprotect(0x7f137374b000, 4096, PROT_EXEC) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_PKUERR, si_addr=0x7f137374b000, si_pkey=1} ---
```
You can view, comment on, or merge this pull request online at:

  https://github.com/strace/strace/pull/210

-- Commit Summary --

  * printsiginfo: decode si_pkey field

-- File Changes --

    M NEWS (1)
    M configure.ac (3)
    M src/printsiginfo.c (6)

-- Patch Links --

https://github.com/strace/strace/pull/210.patch
https://github.com/strace/strace/pull/210.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/strace/strace/pull/210
You are receiving this because you are subscribed to this thread.

Message ID: <strace/strace/pull/210 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20220202/21ef0e19/attachment.htm>


More information about the Strace-devel mailing list