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: <CA+icZUW-Mu-Cak481yrE9f6PvGcfaDN7ZPLhrtX6L7zOPU73Zg@mail.gmail.com>
Date:   Thu, 14 Jul 2022 11:53:52 +0200
From:   Sedat Dilek <sedat.dilek@...il.com>
To:     Daniel Bristot de Oliveira <bristot@...nel.org>
Cc:     linux-kernel@...r.kernel.org, linux-trace-devel@...r.kernel.org,
        Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH V2] rtla: Fix Makefile when called from -C tools/

On Thu, Jul 14, 2022 at 11:07 AM Sedat Dilek <sedat.dilek@...il.com> wrote:
>
> On Wed, Jul 13, 2022 at 11:32 PM Daniel Bristot de Oliveira
> <bristot@...nel.org> wrote:
> >
> > Sedat Dilek reported an error on rtla Makefile when running:
> >
> >     $ make -C tools/ clean
> >     [...]
> >     make[2]: Entering directory
> >     '/home/dileks/src/linux-kernel/git/tools/tracing/rtla'
> >     [...]
> >     '/home/dileks/src/linux-kernel/git/Documentation/tools/rtla'
> >     /bin/sh: 1: test: rtla-make[2]:: unexpected operator    <------ The problem
> >     rm: cannot remove '/home/dileks/src/linux-kernel/git': Is a directory
> >     make[2]: *** [Makefile:120: clean] Error 1
> >     make[2]: Leaving directory
> >
> > This occurred because the rtla calls kernel's Makefile to get the
> > version in silence mode, e.g.,
> >
> >     $ make -sC ../../.. kernelversion
> >     5.19.0-rc4
> >
> > But the -s is being ignored when rtla's makefile is called indirectly,
> > so the output looks like this:
> >
> >     $ make -C ../../.. kernelversion
> >     make: Entering directory '/root/linux'
> >     5.19.0-rc4
> >     make: Leaving directory '/root/linux'
> >
> > Using 'grep -v make' avoids this problem, e.g.,
> >
> >     $ make -C ../../.. kernelversion | grep -v make
> >     5.19.0-rc4
> >
> > Thus, add | grep -v make.
> >
> > Cc: Steven Rostedt <rostedt@...dmis.org>
> > Fixes: 8619e32825fd ("rtla: Follow kernel version")
> > Reported-by: Sedat Dilek <sedat.dilek@...il.com>
> > Tested-by: Sedat Dilek <sedat.dilek@...il.com>
> > Signed-off-by: Daniel Bristot de Oliveira <bristot@...nel.org>
> > ---
>
> Thanks for v2.
> That looks good to me.
>
> Daniel, you are right that not passing -s to make-line will not show
> the grep output.
>
> Formally and again my...
>
> Reported-by: Sedat Dilek <sedat.dilek@...il.com>
> Tested-by: Sedat Dilek <sedat.dilek@...il.com>
>

Addendum:

Subject?

[PATCH V2] rtla: Fix Makefile when called from -C tools/

...called from -C tools/ clean?

 -Sedat-

>
> >  tools/tracing/rtla/Makefile | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/tracing/rtla/Makefile b/tools/tracing/rtla/Makefile
> > index 3822f4ea5f49..1bea2d16d4c1 100644
> > --- a/tools/tracing/rtla/Makefile
> > +++ b/tools/tracing/rtla/Makefile
> > @@ -1,6 +1,6 @@
> >  NAME   :=      rtla
> >  # Follow the kernel version
> > -VERSION :=     $(shell cat VERSION 2> /dev/null || make -sC ../../.. kernelversion)
> > +VERSION :=     $(shell cat VERSION 2> /dev/null || make -sC ../../.. kernelversion | grep -v make)
> >
> >  # From libtracefs:
> >  # Makefiles suck: This macro sets a default value of $(2) for the
> > --
> > 2.32.0
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ