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] [day] [month] [year] [list]
Date:   Mon, 28 Sep 2020 16:19:49 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Hagen Paul Pfeifer <hagen@...u.net>, linux-kernel@...r.kernel.org,
        Jiri Olsa <jolsa@...nel.org>,
        Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: perf script, libperf: python binding bug (bytearrays vs. strings)

Em Mon, Sep 28, 2020 at 03:39:42PM +0200, Jiri Olsa escreveu:
> On Mon, Sep 28, 2020 at 12:43:11PM +0200, Hagen Paul Pfeifer wrote:
> > * Jiri Olsa | 2020-09-28 12:08:08 [+0200]:
> > 
> > >patch below fixes it for me, but seems strange this was
> > >working till now.. maybe you're the only one using this
> > >with python3 ;-)
> > 
> > and I thought python2 is obsolete and not maintained anymore ... ;-)
> > Anyway, the patch fixed everything: no more garbage for Python2 and Python3
> > as well as no bytearray type Python3!
> > 
> > Tested-by: Hagen Paul Pfeifer <hagen@...u.net>
> > 
> > Thank you Jiri!
> > 
> > Probably this patch should be applied on stable too!? Not sure when the 
> > problem was introduced.
> 
> great, I'll check on that and send full patch later, thanks 

Thanks, I'll do one more pull req for v5.9, will have that in.

Hagen, please consider sending a patch making using python3 the default,
with python2 left just for whoever still needs it.

Thanks!

- Arnaldo
 
> jirka
> 
> > 
> > Hagen
> > 
> > >jirka
> > >
> > >
> > >---
> > >diff --git a/tools/perf/util/print_binary.c b/tools/perf/util/print_binary.c
> > >index 599a1543871d..13fdc51c61d9 100644
> > >--- a/tools/perf/util/print_binary.c
> > >+++ b/tools/perf/util/print_binary.c
> > >@@ -50,7 +50,7 @@ int is_printable_array(char *p, unsigned int len)
> > > 
> > > 	len--;
> > > 
> > >-	for (i = 0; i < len; i++) {
> > >+	for (i = 0; i < len && p[i]; i++) {
> > > 		if (!isprint(p[i]) && !isspace(p[i]))
> > > 			return 0;
> > > 	}
> > >
> > 
> 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ