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]
Message-ID: <CA+rthh9NSMR0ou-Vc--o6F6z0tONm4+S-2paRGdeWoMWaESNAw@mail.gmail.com>
Date:	Wed, 22 Apr 2015 22:12:29 +0200
From:	Mathias Krause <minipli@...glemail.com>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Ingo Molnar <mingo@...hat.com>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH] perf: Ensure symbols for plugins are exported

On 18 April 2015 at 17:46, Jiri Olsa <jolsa@...hat.com> wrote:
> On Fri, Apr 17, 2015 at 11:01:07PM +0200, Mathias Krause wrote:
>> On 17 April 2015 at 17:34, Jiri Olsa <jolsa@...hat.com> wrote:
>> > On Sun, Apr 12, 2015 at 06:00:51PM +0200, Mathias Krause wrote:
>> >> When building perf with perl or python support it implicitly gets linked
>> >> with the -export-dynamic linker option through the additional linker
>> >> flags, namely with -Wl,-E via perl or -Xlinker -export-dynamic via
>> >> python. That flag is essential for the traceevent plugin support so we
>> >> shouldn't rely on adding it implicitly.
>
> I dont see the -E flag being added for perl on my setup,
> but I guess that could be different on each distro

Yeah, seems so. On Debian I get the following:

$ perl -MExtUtils::Embed -e ldopts
-Wl,-E  -fstack-protector -L/usr/local/lib
-L/usr/lib/x86_64-linux-gnu/perl/5.20/CORE -lperl -ldl -lm -lpthread
-lc -lcrypt

$ python-config --ldflags
-L/usr/lib/python2.7/config-x86_64-linux-gnu -L/usr/lib -lpython2.7
-lpthread -ldl  -lutil -lm  -Xlinker -export-dynamic -Wl,-O1
-Wl,-Bsymbolic-functions

So, the -export-dynamic linker flag gets added by both -- perl and python.

However on CentOS 7 I don't see the -Wl,-E for perl either. But python
still adds it. So the patch is even more needed as leaving out perf
python support on such a distro would make it miss the flag, too.

> maybe we should look for proper fix and export only
> needed symbols

Well, that would require maintaining a symbol file. Don't know if it's
worth it :/

> , anyway for this bugfix:
>
> Acked-by: Jiri Olsa <jolsa@...nel.org>

Thanks,
Mathias
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ