From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Benjamin Peterson <benjamin@python.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf trace beauty ioctl: fix off-by-one error in table
Date: Fri, 23 Aug 2019 10:07:27 -0300 [thread overview]
Message-ID: <20190823130727.GA10333@kernel.org> (raw)
In-Reply-To: <20190823033625.18814-1-benjamin@python.org>
Em Thu, Aug 22, 2019 at 08:36:25PM -0700, Benjamin Peterson escreveu:
> While tracing a program that calls isatty(3), I noticed that strace reported
> TCGETS for the request argument of the underlying ioctl(2) syscall while perf
> trace reported TCSETS. strace is corrrect. The bug in perf was due to the tty
> ioctl beauty table starting at 0x5400 rather than 0x5401.
Applied, thanks a lot!
- Arnaldo
> Fixes: 1cc47f2d46206d67285aea0ca7e8450af571da13 ("perf trace beauty ioctl: Improve 'cmd' beautifier")
> Signed-off-by: Benjamin Peterson <benjamin@python.org>
> ---
> tools/perf/trace/beauty/ioctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/trace/beauty/ioctl.c b/tools/perf/trace/beauty/ioctl.c
> index 52242fa4072b..e19eb6ea361d 100644
> --- a/tools/perf/trace/beauty/ioctl.c
> +++ b/tools/perf/trace/beauty/ioctl.c
> @@ -21,7 +21,7 @@
> static size_t ioctl__scnprintf_tty_cmd(int nr, int dir, char *bf, size_t size)
> {
> static const char *ioctl_tty_cmd[] = {
> - "TCGETS", "TCSETS", "TCSETSW", "TCSETSF", "TCGETA", "TCSETA", "TCSETAW",
> + [_IOC_NR(TCGETS)] = "TCGETS", "TCSETS", "TCSETSW", "TCSETSF", "TCGETA", "TCSETA", "TCSETAW",
> "TCSETAF", "TCSBRK", "TCXONC", "TCFLSH", "TIOCEXCL", "TIOCNXCL", "TIOCSCTTY",
> "TIOCGPGRP", "TIOCSPGRP", "TIOCOUTQ", "TIOCSTI", "TIOCGWINSZ", "TIOCSWINSZ",
> "TIOCMGET", "TIOCMBIS", "TIOCMBIC", "TIOCMSET", "TIOCGSOFTCAR", "TIOCSSOFTCAR",
> --
> 2.20.1
--
- Arnaldo
next prev parent reply other threads:[~2019-08-23 13:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-23 3:36 [PATCH] perf trace beauty ioctl: fix off-by-one error in table Benjamin Peterson
2019-08-23 13:07 ` Arnaldo Carvalho de Melo [this message]
2019-08-27 8:26 ` [tip: perf/core] perf trace beauty ioctl: Fix off-by-one error in cmd->string table tip-bot2 for Benjamin Peterson
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=20190823130727.GA10333@kernel.org \
--to=arnaldo.melo@gmail.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=benjamin@python.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/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).