From: Richard Henderson <richard.henderson@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: Riku Voipio <riku.voipio@iki.fi>, Laurent Vivier <laurent@vivier.eu>
Subject: Re: [PATCH v1 1/5] linux-user: convert target_mprotect debug to tracepoint
Date: Sun, 1 Dec 2019 17:04:40 -0800 [thread overview]
Message-ID: <b60ffffa-651c-b6f0-cf5c-f75304a38021@linaro.org> (raw)
In-Reply-To: <20191128194603.24818-2-alex.bennee@linaro.org>
On 11/28/19 7:45 PM, Alex Bennée wrote:
> -#ifdef DEBUG_MMAP
> - printf("mprotect: start=0x" TARGET_ABI_FMT_lx
> - "len=0x" TARGET_ABI_FMT_lx " prot=%c%c%c\n", start, len,
> - prot & PROT_READ ? 'r' : '-',
> - prot & PROT_WRITE ? 'w' : '-',
> - prot & PROT_EXEC ? 'x' : '-');
> -#endif
> + if (TRACE_TARGET_MPROTECT_ENABLED) {
> + char prot_str[4];
> + prot_str[0] = prot & PROT_READ ? 'r' : '-';
> + prot_str[1] = prot & PROT_WRITE ? 'w' : '-';
> + prot_str[2] = prot & PROT_EXEC ? 'x' : '-';
> + prot_str[3] = 0;
> + trace_target_mprotect(start, len, prot_str);
> + }
There are other bits in prot other than these 3.
See especially my linux-user BTI patch set, and
know that the same sort of thing will be in the
as-yet undecided abi for the MTE extension.
Unless you have a good reason otherwise, I think
we should just print the numeric value in hex.
r~
next prev parent reply other threads:[~2019-12-02 1:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-28 19:45 [PATCH v1 0/5] linux-user mmap debug cleanup Alex Bennée
2019-11-28 19:45 ` [PATCH v1 1/5] linux-user: convert target_mprotect debug to tracepoint Alex Bennée
2019-12-02 1:04 ` Richard Henderson [this message]
2019-11-28 19:46 ` [PATCH v1 2/5] linux-user: convert target_mmap " Alex Bennée
2019-12-02 1:11 ` Richard Henderson
2019-11-28 19:46 ` [PATCH v1 3/5] linux-user: add target_mmap_complete tracepoint Alex Bennée
2019-12-02 1:12 ` Richard Henderson
2019-11-28 19:46 ` [PATCH v1 4/5] linux-user: log page table changes under -d page Alex Bennée
2019-12-02 1:26 ` Richard Henderson
2019-12-02 18:20 ` Richard Henderson
2019-11-28 19:46 ` [PATCH v1 5/5] linux-user: convert target_munmap debug to a tracepoint Alex Bennée
2019-12-02 1:28 ` Richard Henderson
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=b60ffffa-651c-b6f0-cf5c-f75304a38021@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/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;
as well as URLs for NNTP newsgroup(s).