Skip to content

kconfig: Make 'm' safe before modules symbol is defined

Ulf Magnusson linux-kbuild lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3kconfig: Rename menu_check_dep() to rewrite_m()scripts/kconfig/menu.c+10 -60 replies
2/3kconfig: Clarify expression rewritingscripts/kconfig/menu.c+52 -00 replies
3/3kconfig: Clean up modules handling and fix crashscripts/kconfig/menu.c+6 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] kconfig: Make 'm' safe before modules symbol is defined

Hello,

This patchset fixes a segfault that occurs if 'm' appears in certain expressions before the modules symbol is defined. The problem is that m is rewritten to m && <modules symbol> already during parsing. Doing it in menu_finalize(), which runs after parsing, fixes the problem.

To aid the review and people trying to understand menu_finalize() in the future (including me), it also renames menu_check_dep() to rewrite_m() and adds comments to clarify the existing expression rewriting and dependency propagation logic.

The changes have been tested for regressions using zconfdump(), Kconfiglib, and Valgrind.

Cheers,
Ulf

Ulf Magnusson (3):
kconfig: Rename menu_check_dep() to rewrite_m()
kconfig: Clarify expression rewriting
kconfig: Clean up modules handling and fix crash

 scripts/kconfig/menu.c | 74 ++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 66 insertions(+), 8 deletions(-)
Signature · 1 line
2.7.4