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-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNASrwE3FcoZGK73-0TeH-omk9Yjp1fjcMCOLPpu_xv9_og@mail.gmail.com>
Date:   Fri, 11 Feb 2022 13:27:07 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     3090101217@....edu.cn
Cc:     Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Jing Leng <jleng@...arella.com>
Subject: Re: [PATCH] kconfig: fix failing to generate auto.conf

On Thu, Feb 10, 2022 at 3:40 PM <3090101217@....edu.cn> wrote:
>
> From: Jing Leng <jleng@...arella.com>
>
> When the KCONFIG_AUTOCONFIG is specified (e.g. export \
> KCONFIG_AUTOCONFIG=output/config/auto.conf), the directory of
> include/config/ will not be created, so kconfig can't create deps
> files in it and auto.conf can't be generated.
>
> Signed-off-by: Jing Leng <jleng@...arella.com>
> ---
>  scripts/kconfig/confdata.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> index 59717be31210..800ecf9934bc 100644
> --- a/scripts/kconfig/confdata.c
> +++ b/scripts/kconfig/confdata.c
> @@ -994,14 +994,15 @@ static int conf_write_autoconf_cmd(const char *autoconf_name)
>
>  static int conf_touch_deps(void)
>  {
> -       const char *name;
> +       const char *name, *tmp;
>         struct symbol *sym;
>         int res, i;
>
> -       strcpy(depfile_path, "include/config/");
> -       depfile_prefix_len = strlen(depfile_path);
> -
>         name = conf_get_autoconfig_name();
> +       depfile_prefix_len = ((tmp = strrchr(name, '/'))) ? (tmp - name) + 1 : 0;
> +       strncpy(depfile_path, name, depfile_prefix_len);
> +       depfile_path[depfile_prefix_len] = 0;
> +
>         conf_read_simple(name, S_DEF_AUTO);
>         sym_calc_value(modules_sym);
>
> --
> 2.17.1
>


Thanks.

I wanted to pick up this patch, but
could not find it in the patchwork
(https://patchwork.kernel.org/project/linux-kbuild/list/)
despite you apparently CC'ed the kbuild ML.

Do you know why?
(I do not know if the kbuild/kernel ML requires subscription...)



If you have a chance for re-submission,
can you change the code like follows?

     depfile_prefix_len = ((tmp = strrchr(name, '/'))) ? (tmp - name) + 1 : 0;


     tmp = tmp = strrchr(name, '/');
     depfile_prefix_len = tmp ? tmp - name + 1 : 0;


Too many parentheses make the code unreadable.





-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ