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: <CAK7LNATn2QrFn0fTixnbtZ-VOtWid2PvFKPmjfX+z_UtZgTMgA@mail.gmail.com>
Date:   Thu, 14 Apr 2022 18:33:51 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Jiri Slaby <jslaby@...e.cz>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>
Subject: Re: [PATCH] scripts: dummy-tools, add pahole

On Thu, Apr 14, 2022 at 6:14 PM Jiri Slaby <jslaby@...e.cz> wrote:
>
> CONFIG_PAHOLE_VERSION is a part of a config since the commit below. And
> when multiple people update the config, this value constantly changes.
> Even if they use dummy scripts.
>
> To fix this:
> * add a pahole dummy script returning v99.99 -> 9999
> * call it in Makefile taking CROSS_COMPILE into account.
>
> The latter happens only if $(CROSS_COMPILE)pahole really exists. This is
> because a cross pahole likely exists only in dummy tools now, not in
> real cross tools.


I do not think this is the right thing to do.

(As I said somewhere, I am opposed to checking pahole version in Kconfig).


Also, $(CROSS_COMPILE)pahole looks insane.

You can create a dummy pahole in your local system.

$ echo 'echo v99.99' > $HOME/bin/dummy-pahole
$ chmod +x  $HOME/bin/dummy-pahole
$ make CROSS_COMPILE=scripts/dummy-tools  PAHOLE=dummy-pahole  menuconfig









> Fixes: 613fe1692377 (kbuild: Add CONFIG_PAHOLE_VERSION)
> Cc: Masahiro Yamada <masahiroy@...nel.org>
> Cc: Michal Marek <michal.lkml@...kovi.net>
> Cc: Nick Desaulniers <ndesaulniers@...gle.com>
> Cc: linux-kbuild@...r.kernel.org
> Signed-off-by: Jiri Slaby <jslaby@...e.cz>
> ---
>  Makefile                   | 2 +-
>  scripts/dummy-tools/pahole | 4 ++++
>  2 files changed, 5 insertions(+), 1 deletion(-)
>  create mode 100755 scripts/dummy-tools/pahole
>
> diff --git a/Makefile b/Makefile
> index ecbd42f3451a..2ef722ba0a41 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -502,7 +502,7 @@ RUSTFMT             = rustfmt
>  CLIPPY_DRIVER  = clippy-driver
>  BINDGEN                = bindgen
>  CARGO          = cargo
> -PAHOLE         = pahole
> +PAHOLE         = $(if $(wildcard $(CROSS_COMPILE)pahole),$(CROSS_COMPILE)pahole,pahole)
>  RESOLVE_BTFIDS = $(objtree)/tools/bpf/resolve_btfids/resolve_btfids
>  LEX            = flex
>  YACC           = bison
> diff --git a/scripts/dummy-tools/pahole b/scripts/dummy-tools/pahole
> new file mode 100755
> index 000000000000..53501a36fa71
> --- /dev/null
> +++ b/scripts/dummy-tools/pahole
> @@ -0,0 +1,4 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0-only
> +
> +echo v99.99
> --
> 2.35.2
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ