lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190823130727.GA10333@kernel.org>
Date:   Fri, 23 Aug 2019 10:07:27 -0300
From:   Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To:     Benjamin Peterson <benjamin@...hon.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf trace beauty ioctl: fix off-by-one error in table

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@...hon.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ