From: jose.marchesi@oracle.com (Jose E. Marchesi)
To: Weimin Pan <weimin.pan@oracle.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v8] gdb: ADI support
Date: Wed, 23 Aug 2017 09:02:00 -0000 [thread overview]
Message-ID: <87fuciacc5.fsf@oracle.com> (raw)
In-Reply-To: <1503440369-113905-1-git-send-email-weimin.pan@oracle.com> (Weimin Pan's message of "Tue, 22 Aug 2017 17:19:29 -0500")
The M7 processor supports an Application Data Integrity (ADI) feature
that detects invalid data accesses. When software allocates data, it
chooses a 4-bit version number, sets the version in the upper 4 bits
of the 64-bit pointer to that data, and stores the 4-bit version in
every cacheline of the object. Hardware saves the latter in spare
bits in the cache and memory hierarchy. On each load and store, the
processor compares the upper 4 VA (virtual address) bits to the
cacheline's version. If there is a mismatch, the processor generates
a version mismatch trap which can be either precise or disrupting.
The trap is an error condition which the kernel delivers to the process
as a SIGSEGV signal.
The upper 4 bits of the VA represent a version and are not part of the
true address. The processor clears these bits and sign extends bit 59
to generate the true address.
Note that 32-bit applications cannot use ADI.
This patch adds ADI support in gdb which allows the user to examine
current version tags and assign new version tags in the program.
It also catches and reports precise or disrupting memory corruption
traps.
Tested in sparc64-linux-gnu. No regressions.
I just committed this on your behalf, as approved by Yao.
Salud!
next prev parent reply other threads:[~2017-08-23 9:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 22:31 Weimin Pan
2017-08-23 9:02 ` Jose E. Marchesi [this message]
2017-08-23 17:29 ` Jose E. Marchesi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fuciacc5.fsf@oracle.com \
--to=jose.marchesi@oracle.com \
--cc=gdb-patches@sourceware.org \
--cc=weimin.pan@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox