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: <20230821160853.GA3913@google.com>
Date:   Tue, 22 Aug 2023 01:08:53 +0900
From:   Sergey Senozhatsky <senozhatsky@...omium.org>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     Sergey Senozhatsky <senozhatsky@...omium.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nicolas Schier <nicolas@...sle.eu>,
        Jonathan Corbet <corbet@....net>,
        Tomasz Figa <tfiga@...omium.org>, linux-kbuild@...r.kernel.org,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH] kconfig: introduce listunknownconfig

On (23/08/21 21:27), Masahiro Yamada wrote:
> > +       const char *list_missing;
> >
> > +       list_missing = getenv("KCONFIG_LIST_MISSING");
> 
> 
> My (original) hope was to add a single switch, KCONFIG_VERBOSE, to address both:
> 
>   - A CONFIG option is hidden by unmet dependency (Ying Sun's case)
>   - A CONFIG option no longer exists  (your case)
>   - Anything else we need to be careful

So I see a "no longer existing option" as a terminal condition. In
general there is no point in continuing the build because the build
will not include some driver/functionality that is still expected to
be there. (This has actually happened to us).

[..]
> > @@ -482,6 +490,12 @@ int conf_read_simple(const char *name, int def)
> >
> >                         sym = sym_find(line + strlen(CONFIG_));
> >                         if (!sym) {
> > +                               if (list_missing) {
> > +                                       conf_warning("unknown symbol: %s",
> > +                                                    line + strlen(CONFIG_));
> > +                                       continue;
> > +                               }
> > +
> 
> 
> This should be warned only if (def != S_DEF_AUTO),
> otherwise the same warning will be displayed twice.

Good point.

> > @@ -530,6 +544,13 @@ int conf_read_simple(const char *name, int def)
> >         }
> >         free(line);
> >         fclose(in);
> > +
> > +       if (list_missing) {
> > +               if (conf_warnings)
> > +                       exit(1);
> > +               exit(0);
> > +       }
> > +
> 
> This is something different because you are making these
> errors instead of warnings.

Right. So "verbose" and "list missing" probably have slightly different
requirements.

When "verbose" complaints about a downgraded option, for instance, then
you can regenerate the config and continue, because the symbol is still
there.

When "list missing" complaints about an option then we should stop and
investigate. That option, for example, can be added by build infra based
on some USE flags switch, etc. So there can be multiple parties that
needs to be fixed. Apart from that we need to figure out what option
(if any) replaces the gone symbol. "list missing" is basically "missed
expectations", we need to do some work before we can build the kernel.

I can "list missing" under KCONFIG_VERBOSE. It probably still better
error exit if missing symbols are found. Thoughts?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ