<p dir="auto">This adds decoding of <code>si_pkey</code> field  which is set on <code>SIGSEGV</code> in case<br>
of memory access violation on some modern CPUs (these have <code>pku</code> flag in <code>/proc/cpuinfo</code>).</p>
<p dir="auto">Here's few sample outputs:</p>
<div class="snippet-clipboard-content position-relative overflow-auto" data-snippet-clipboard-copy-content="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} ---"><pre><code>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} ---
</code></pre></div>
<p dir="auto">or another case:</p>
<div class="snippet-clipboard-content position-relative overflow-auto" data-snippet-clipboard-copy-content="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} ---"><pre><code>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} ---
</code></pre></div>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/strace/strace/pull/210'>https://github.com/strace/strace/pull/210</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/strace/strace/pull/210/commits/f98f197d0a9d6586b83925bb724df22c7db36d4f" class="commit-link">f98f197</a>  printsiginfo: decode si_pkey field</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/strace/strace/pull/210/files">3 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/strace/strace/pull/210/files#diff-7ee66c4f1536ac84dc5bbff1b8312e2eef24b974b3e48a5c5c2bcfdf2eb8f3ce">NEWS</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/strace/strace/pull/210/files#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810">configure.ac</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/strace/strace/pull/210/files#diff-c6f4ed98562e7e5fb138a09866476c434296bab8d8cbc387bf9d0b050bcec520">src/printsiginfo.c</a>
    (6)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/strace/strace/pull/210.patch'>https://github.com/strace/strace/pull/210.patch</a></li>
  <li><a href='https://github.com/strace/strace/pull/210.diff'>https://github.com/strace/strace/pull/210.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/strace/strace/pull/210">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AOVBTR7GBUXPMLPPWBSQRBLUZEOFVANCNFSM5NL4DJ6Q">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AOVBTR4XSJOP2775KWPJOKTUZEOFVA5CNFSM5NL4DJ62YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4QW6FBKQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><strace/strace/pull/210</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/strace/strace/pull/210",
"url": "https://github.com/strace/strace/pull/210",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>