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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 29 Feb 2016 14:58:17 -0500
From:	Josh Boyer <jwboyer@...oraproject.org>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	Jiri Olsa <jolsa@...hat.com>,
	"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH] perf tools: Fix python extension build

On Mon, Feb 29, 2016 at 9:08 AM, Arnaldo Carvalho de Melo
<acme@...nel.org> wrote:
> Em Mon, Feb 29, 2016 at 08:20:33AM -0500, Josh Boyer escreveu:
>> On Sat, Feb 27, 2016 at 3:21 PM, Jiri Olsa <jolsa@...hat.com> wrote:
>> > On Fri, Feb 26, 2016 at 11:59:03PM +0100, Jiri Olsa wrote:
>> >> On Fri, Feb 26, 2016 at 05:49:02PM -0500, Josh Boyer wrote:
>> >>
>> >> SNIP
>> >>
>> >> > > ./python_ext_build/tmp/home/jolsa/kernel/linux-perf/tools/perf/util/evsel.o
>> >> > > ./python_ext_build/tmp/home/jolsa/kernel/linux-perf/tools/perf/util/trace-event.o
>> >> > > ./python_ext_build/tmp/home/jolsa/kernel/linux-perf/tools/perf/util/xyarray.o
>> >> > > ./python_ext_build/tmp/home/jolsa/kernel/linux-perf/tools/perf/util/python.o
>> >> > > ./python_ext_build/tmp/home/jolsa/kernel/linux-perf/tools/perf/util/ctype.o
>> >> > > ./python_ext_build/tmp/home/jolsa/kernel/linux-perf/tools/perf/util/cgroup.o
>> >> > > ./python_ext_build/tmp/home/jolsa/kernel/linux-perf/tools/perf/util/rblist.o
>> >> > > ./python_ext_build/tmp/home/jolsa/kernel/linux-perf/tools/perf/util/string.o
>> >> > > ./python_ext_build/tmp/home/jolsa/kernel/linux-perf/tools/lib
>> >> > > ./python_ext_build/tmp/home/jolsa/kernel/linux-perf/tools/lib/hweight.o
>> >> > > ./python_ext_build/tmp/home/jolsa/kernel/linux-perf/tools/lib/rbtree.o
>> >> > > ./python_ext_build/tmp/home/jolsa/kernel/linux-perf/tools/lib/bitmap.o
>> >> > > ./python_ext_build/tmp/home/jolsa/kernel/linux-perf/tools/lib/find_bit.o
>> >> > >
>> >> > > not sure we want to come up with some 'nicer' solution
>> >> >
>> >> > I don't think anything under python_ext_build/tmp/ actually matters in
>> >> > any significant way.  As long as this doesn't negatively impact
>> >> > something via side-effect, it's probably good enough.
>> >>
>> >> right, and it's probably generic sollution too
>> >>
>> >> >
>> >> > Will you write up a full patch?
>> >>
>> >> yep, will post it tomorrow
>> >>
>> >> jirka
>> >
>> > sending full patch
>> >
>> > jirka
>> >
>> >
>> > ---
>> > The util/python-ext-sources file contains sources files
>> > for python extension relative to $(srctree)/tools/perf,
>> >
>> > Such a file path $(FILE).c is handed over to the python
>> > extension build system, which builts final object in
>> > $(PYTHON_EXTBUILD)/tmp/$(FILE).o path.
>> >
>> > After build is done all files from $(PYTHON_EXTBUILD)lib/
>> > are carried as the result binaries.
>> >
>> > Above system fails when we add source file relative to
>> > ../lib, which we do for:
>> >
>> >   ../lib/bitmap.c
>> >   ../lib/find_bit.c
>> >   ../lib/hweight.c
>> >   ../lib/rbtree.c
>> >
>> > All above objects will be built like:
>> >
>> >   $(PYTHON_EXTBUILD)/tmp/../lib/bitmap.c
>> >   $(PYTHON_EXTBUILD)/tmp/../lib/find_bit.c
>> >   $(PYTHON_EXTBUILD)/tmp/../lib/hweight.c
>> >   $(PYTHON_EXTBUILD)/tmp/../lib/rbtree.c
>> >
>> > which accidentally happens to be final library path:
>> >   $(PYTHON_EXTBUILD)/lib/
>> >
>> > Changing setup.py to pass full paths of source files
>> > to Extension build class and thus keep all built objects
>> > under $(PYTHON_EXTBUILD)tmp directory.
>> >
>> > Cc: David Ahern <dsahern@...il.com>
>> > Cc: Namhyung Kim <namhyung@...nel.org>
>> > Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
>> > Reported-by: Josh Boyer <jwboyer@...oraproject.org>
>> > Link: http://lkml.kernel.org/n/tip-z14ivktbyblnz9ivuo0zau8l@git.kernel.org
>> > Signed-off-by: Jiri Olsa <jolsa@...nel.org>
>>
>> The Reported-by: tag should probably be changed to Jeff Bastian
>> <jbastian@...hat.com> if there's still time.  He reported the original
>> bug.  Maybe also include this in stable for 4.2+?
>
> Sure, I'll use Jeff in the Reported-by: tag and have it CCed to stable,
>
> I also will add a Tested-by: Josh Boyer, ok?

Yes, that is fine.  I tested the build and the resulting python-perf
package only has the proper contents.  I see you've added this to the
formal patch, so thank you.  Apologies for the delayed reply.

josh

Powered by blists - more mailing lists