mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] kconfig: Make 'm' safe before modules symbol is defined
@ 2017-10-05 12:01 Ulf Magnusson
  2017-10-05 12:01 ` [PATCH 1/3] kconfig: Rename menu_check_dep() to rewrite_m() Ulf Magnusson
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ulf Magnusson @ 2017-10-05 12:01 UTC (permalink / raw)
  To: yann.morin.1998, linux-kbuild
  Cc: sam, zippel, nicolas.pitre, mmarek, dirk, yamada.masahiro,
	lacombar, JBeulich, linux-kernel, Ulf Magnusson

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(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-12-14 23:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-05 12:01 [PATCH 0/3] kconfig: Make 'm' safe before modules symbol is defined Ulf Magnusson
2017-10-05 12:01 ` [PATCH 1/3] kconfig: Rename menu_check_dep() to rewrite_m() Ulf Magnusson
2017-10-05 12:01 ` [PATCH 2/3] kconfig: Clarify expression rewriting Ulf Magnusson
2017-10-05 12:01 ` [PATCH 3/3] kconfig: Clean up modules handling and fix crash Ulf Magnusson
2017-12-14 23:27 ` [PATCH 0/3] kconfig: Make 'm' safe before modules symbol is defined Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome