Linux Documentation
 help / color / mirror / Atom feed
From: Julian Braha <julianbraha@gmail.com>
To: Demi Marie Obenour <demiobenour@gmail.com>,
	nathan@kernel.org, nsc@kernel.org
Cc: jani.nikula@linux.intel.com, akpm@linux-foundation.org,
	gary@garyguo.net, ljs@kernel.org, arnd@arndb.de,
	gregkh@linuxfoundation.org, masahiroy@kernel.org,
	ojeda@kernel.org, corbet@lwn.net, qingfang.deng@linux.dev,
	yann.prono@telecomnancy.net, ej@inai.de,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [RFC v3 0/3] add kconfirm
Date: Mon, 18 May 2026 00:21:55 +0100	[thread overview]
Message-ID: <dc9bf309-ba57-4ab2-a297-206fcabe318d@gmail.com> (raw)
In-Reply-To: <c6e9481c-932b-42f7-a903-b781d38cc1a8@gmail.com>

On 5/17/26 07:14, Demi Marie Obenour wrote:
>> Hi all,
>>
>> kconfirm has shrunk a lot since v2!
> Thanks for dropping so many of the dependencies!
> 
> It might be able to shrink it further by using the existing C Kconfig
> parser.  This has the advantage that it ensures kconfirm and Kconfig
> will interpret the Kconfig files the same way.  I'm not sure if
> that would be too much of a change.  That's up to you.
Hi Demi,

I did look into the in-tree parser after your suggestion in v2. What I
discovered was that this parser performs too much evaluation of the
kconfig code during parsing, making it unsuitable for purposes of static
analysis:

The in-tree parser doesn't actually output a parse tree that we can
traverse and analyze, which is how kconfirm currently works. Instead,
semantic actions directly construct the symbol table *during parsing*,
with that symbol table being different from ours. I think(?) this makes
the overall process faster (which is great for real-world kernel
builds), but for static analysis purposes, we really need to preserve
as much of the underlying code as we can. For example, we don't even
preprocess variables, because this allows us to analyze more regardless
of the host and target. (Well, architecture is the one exception there
because we need to resolve imports/"source".)

I do want to point out that Yann, the author of kconfirm's parsing
library (nom-kconfig) is CC'd on these RFCs and has done an awesome job
of supporting the parser and kconfirm's usage of it.

He also helped reduce the number of indirect dependencies pulled in by
the parser following your feedback in RFC v2.

- Julian Braha

      reply	other threads:[~2026-05-17 23:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-16 21:53 [RFC v3 0/3] add kconfirm Julian Braha
2026-05-16 21:53 ` [RFC PATCH v3 1/3] scripts: " Julian Braha
2026-05-17  6:10   ` Demi Marie Obenour
2026-05-17  9:58     ` Miguel Ojeda
2026-05-17 20:25       ` Demi Marie Obenour
2026-05-17 22:53         ` Miguel Ojeda
2026-05-17  6:28   ` Miguel Ojeda
2026-05-17  7:32     ` Demi Marie Obenour
2026-05-17  9:30       ` Miguel Ojeda
2026-05-17  9:32         ` Demi Marie Obenour
2026-05-17  9:48           ` Miguel Ojeda
2026-05-17  9:28     ` Nathan Chancellor
2026-05-16 21:53 ` [RFC PATCH v3 2/3] Documentation: " Julian Braha
2026-05-17  6:05   ` Miguel Ojeda
2026-05-17  9:40     ` Nathan Chancellor
2026-05-17 12:35       ` Miguel Ojeda
2026-05-16 21:53 ` [RFC PATCH v3 3/3] MAINTAINERS: create entry for kconfirm Julian Braha
2026-05-16 22:36 ` [RFC v3 0/3] add kconfirm Julian Braha
2026-05-17  6:14 ` Demi Marie Obenour
2026-05-17 23:21   ` Julian Braha [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc9bf309-ba57-4ab2-a297-206fcabe318d@gmail.com \
    --to=julianbraha@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=corbet@lwn.net \
    --cc=demiobenour@gmail.com \
    --cc=ej@inai.de \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ljs@kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nsc@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=qingfang.deng@linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=yann.prono@telecomnancy.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox