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: <CAK7LNARA7_3W5CRhW+sKXuqdANjczVbaTO+y1tGTRzAxiJGUzA@mail.gmail.com>
Date: Sun, 23 Mar 2025 00:14:45 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: HONG Yifan <elsk@...gle.com>
Cc: kernel-team@...roid.com, linux-kernel@...r.kernel.org, 
	linux@...musvillemoes.dk
Subject: Re: [PATCH v2] setlocalversion: use ${objtree}/include/config/auto.conf

On Tue, Mar 18, 2025 at 9:59 AM HONG Yifan <elsk@...gle.com> wrote:
>
> setlocalversion reads include/config/auto.conf, which is located below
> $(objtree) with commit 214c0eea43b2 ("kbuild: add $(objtree)/ prefix to
> some in-kernel build artifacts").
>
> To be consistent, the setlocalversion script should use

"To be consistent" is too weak because we do not add
$(objtree)/ to include/config/auto.conf

Just run "git grep include/config/auto.conf"

You will see more include/config/auto.conf instances
that lack $(objtree)/ prefix.

So, "To be consistent" is not a reason.

You described why Google needs to have this
specifically scripts/setlocalversion.

Without that explained, I do not understand _why_.



> ${objtree}/include/config/auto.conf as well.
>
> Signed-off-by: HONG Yifan <elsk@...gle.com>
> ---
> v1: https://lore.kernel.org/lkml/20250312021154.102262-2-elsk@google.com/
> v1 -> v2: fixed the other two locations of include/config/auto.conf in
> setlocalversion script; also removed incorrect claim in commit message.
>
>  scripts/setlocalversion | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/setlocalversion b/scripts/setlocalversion
> index 28169d7e143b..c13fe6e585e9 100755
> --- a/scripts/setlocalversion
> +++ b/scripts/setlocalversion
> @@ -186,16 +186,16 @@ if ${no_local}; then
>         exit 0
>  fi
>
> -if ! test -e include/config/auto.conf; then
> +if ! test -e ${objtree}/include/config/auto.conf; then


Please quote

"${objtree}/include/config/auto.conf"

to avoid a shellcheck warning.




>         echo "Error: kernelrelease not valid - run 'make prepare' to update it" >&2
>         exit 1
>  fi
>
>  # version string from CONFIG_LOCALVERSION
> -config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION=\(.*\)$/\1/p' include/config/auto.conf)
> +config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION=\(.*\)$/\1/p' ${objtree}/include/config/auto.conf)
>
>  # scm version string if not at the kernel version tag or at the file_localversion
> -if grep -q "^CONFIG_LOCALVERSION_AUTO=y$" include/config/auto.conf; then
> +if grep -q "^CONFIG_LOCALVERSION_AUTO=y$" ${objtree}/include/config/auto.conf; then
>         # full scm version string
>         scm_version="$(scm_version)"
>  elif [ "${LOCALVERSION+set}" != "set" ]; then
> --
> 2.49.0.rc1.451.g8f38331e32-goog
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ