LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Bad rpath in cpupower with 4.0-rcX
@ 2015-03-06 13:47 Josh Boyer
2015-03-10 12:33 ` Josh Boyer
0 siblings, 1 reply; 5+ messages in thread
From: Josh Boyer @ 2015-03-06 13:47 UTC (permalink / raw)
To: sriram, Thomas Renninger; +Cc: Rafael J. Wysocki, linux-pm, linux-kernel
Hi All,
Commit 5c1de006e8e66 (cpupower Makefile change to help run the tool
without 'make install') added an rpath to the cpupower binary. From
what I can understand, this is to make it easier to run cpupower from
the local build directory without having to run make install. It does
accomplish that, but it also leaves the binary with the rpath in it
which is considered bad practice. It also causes cpupower to fail in
rpmbuild with the following error:
ERROR 0004: file '/usr/bin/cpupower' contains an insecure rpath './'
in [./]
error: Bad exit status from /var/tmp/rpm-tmp.A6u26r (%install)
Bad exit status from /var/tmp/rpm-tmp.A6u26r (%install)
I understand the want for eased development, but couldn't people just
set LD_LIBRARY_PATH instead?
josh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bad rpath in cpupower with 4.0-rcX
2015-03-06 13:47 Bad rpath in cpupower with 4.0-rcX Josh Boyer
@ 2015-03-10 12:33 ` Josh Boyer
2015-03-10 22:30 ` Rafael J. Wysocki
0 siblings, 1 reply; 5+ messages in thread
From: Josh Boyer @ 2015-03-10 12:33 UTC (permalink / raw)
To: Rafael J. Wysocki, Thomas Renninger
Cc: sriram, Linux PM list, Linux-Kernel@Vger. Kernel. Org
On Fri, Mar 6, 2015 at 8:47 AM, Josh Boyer <jwboyer@fedoraproject.org> wrote:
> Hi All,
>
> Commit 5c1de006e8e66 (cpupower Makefile change to help run the tool
> without 'make install') added an rpath to the cpupower binary. From
> what I can understand, this is to make it easier to run cpupower from
> the local build directory without having to run make install. It does
> accomplish that, but it also leaves the binary with the rpath in it
> which is considered bad practice. It also causes cpupower to fail in
> rpmbuild with the following error:
>
> ERROR 0004: file '/usr/bin/cpupower' contains an insecure rpath './'
> in [./]
> error: Bad exit status from /var/tmp/rpm-tmp.A6u26r (%install)
> Bad exit status from /var/tmp/rpm-tmp.A6u26r (%install)
>
> I understand the want for eased development, but couldn't people just
> set LD_LIBRARY_PATH instead?
No comments on this? Should I just send a revert patch instead?
josh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bad rpath in cpupower with 4.0-rcX
2015-03-10 12:33 ` Josh Boyer
@ 2015-03-10 22:30 ` Rafael J. Wysocki
2015-03-11 11:53 ` Thomas Renninger
0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2015-03-10 22:30 UTC (permalink / raw)
To: Josh Boyer
Cc: Rafael J. Wysocki, Thomas Renninger, sriram, Linux PM list,
Linux-Kernel@Vger. Kernel. Org
On Tuesday, March 10, 2015 08:33:54 AM Josh Boyer wrote:
> On Fri, Mar 6, 2015 at 8:47 AM, Josh Boyer <jwboyer@fedoraproject.org> wrote:
> > Hi All,
> >
> > Commit 5c1de006e8e66 (cpupower Makefile change to help run the tool
> > without 'make install') added an rpath to the cpupower binary. From
> > what I can understand, this is to make it easier to run cpupower from
> > the local build directory without having to run make install. It does
> > accomplish that, but it also leaves the binary with the rpath in it
> > which is considered bad practice. It also causes cpupower to fail in
> > rpmbuild with the following error:
> >
> > ERROR 0004: file '/usr/bin/cpupower' contains an insecure rpath './'
> > in [./]
> > error: Bad exit status from /var/tmp/rpm-tmp.A6u26r (%install)
> > Bad exit status from /var/tmp/rpm-tmp.A6u26r (%install)
> >
> > I understand the want for eased development, but couldn't people just
> > set LD_LIBRARY_PATH instead?
>
> No comments on this? Should I just send a revert patch instead?
You can do that.
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bad rpath in cpupower with 4.0-rcX
2015-03-10 22:30 ` Rafael J. Wysocki
@ 2015-03-11 11:53 ` Thomas Renninger
2015-03-11 12:20 ` sriram
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Renninger @ 2015-03-11 11:53 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Josh Boyer, Rafael J. Wysocki, sriram, Linux PM list,
Linux-Kernel@Vger. Kernel. Org
On Tuesday, March 10, 2015 11:30:44 PM Rafael J. Wysocki wrote:
> On Tuesday, March 10, 2015 08:33:54 AM Josh Boyer wrote:
> > On Fri, Mar 6, 2015 at 8:47 AM, Josh Boyer <jwboyer@fedoraproject.org>
wrote:
> > > Hi All,
> > >
> > > Commit 5c1de006e8e66 (cpupower Makefile change to help run the tool
> > > without 'make install') added an rpath to the cpupower binary. From
> > > what I can understand, this is to make it easier to run cpupower from
> > > the local build directory without having to run make install. It does
> > > accomplish that, but it also leaves the binary with the rpath in it
> > > which is considered bad practice. It also causes cpupower to fail in
> > > rpmbuild with the following error:
> > >
> > > ERROR 0004: file '/usr/bin/cpupower' contains an insecure rpath './'
> > > in [./]
> > > error: Bad exit status from /var/tmp/rpm-tmp.A6u26r (%install)
> > >
> > > Bad exit status from /var/tmp/rpm-tmp.A6u26r (%install)
> > >
> > > I understand the want for eased development, but couldn't people just
> > > set LD_LIBRARY_PATH instead?
> >
> > No comments on this? Should I just send a revert patch instead?
I agree adding . as library path was not a good idea.
This probably is also a potential security issue.
What I do is building the libraries statically into the binary when
testing. I will send a Makefile change introducing a static = true/false
variable to do that easily.
> You can do that.
Thanks for sending the revert, it's the right thing to do.
Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bad rpath in cpupower with 4.0-rcX
2015-03-11 11:53 ` Thomas Renninger
@ 2015-03-11 12:20 ` sriram
0 siblings, 0 replies; 5+ messages in thread
From: sriram @ 2015-03-11 12:20 UTC (permalink / raw)
To: Thomas Renninger, Rafael J. Wysocki
Cc: Josh Boyer, Rafael J. Wysocki, Linux PM list,
Linux-Kernel@Vger. Kernel. Org
Sorry for the change.
On Wed, Mar 11, 2015, at 05:23 PM, Thomas Renninger wrote:
> On Tuesday, March 10, 2015 11:30:44 PM Rafael J. Wysocki wrote:
> > On Tuesday, March 10, 2015 08:33:54 AM Josh Boyer wrote:
> > > On Fri, Mar 6, 2015 at 8:47 AM, Josh Boyer <jwboyer@fedoraproject.org>
> wrote:
> > > > Hi All,
> > > >
> > > > Commit 5c1de006e8e66 (cpupower Makefile change to help run the tool
> > > > without 'make install') added an rpath to the cpupower binary. From
> > > > what I can understand, this is to make it easier to run cpupower from
> > > > the local build directory without having to run make install. It does
> > > > accomplish that, but it also leaves the binary with the rpath in it
> > > > which is considered bad practice. It also causes cpupower to fail in
> > > > rpmbuild with the following error:
> > > >
> > > > ERROR 0004: file '/usr/bin/cpupower' contains an insecure rpath './'
> > > > in [./]
> > > > error: Bad exit status from /var/tmp/rpm-tmp.A6u26r (%install)
> > > >
> > > > Bad exit status from /var/tmp/rpm-tmp.A6u26r (%install)
> > > >
> > > > I understand the want for eased development, but couldn't people just
> > > > set LD_LIBRARY_PATH instead?
> > >
> > > No comments on this? Should I just send a revert patch instead?
>
> I agree adding . as library path was not a good idea.
> This probably is also a potential security issue.
>
> What I do is building the libraries statically into the binary when
> testing. I will send a Makefile change introducing a static = true/false
> variable to do that easily.
>
> > You can do that.
>
> Thanks for sending the revert, it's the right thing to do.
>
> Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-11 12:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-06 13:47 Bad rpath in cpupower with 4.0-rcX Josh Boyer
2015-03-10 12:33 ` Josh Boyer
2015-03-10 22:30 ` Rafael J. Wysocki
2015-03-11 11:53 ` Thomas Renninger
2015-03-11 12:20 ` sriram
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).