Skip to contentSkip to conversation

riscv: replace select with dependency for visible RELOCATABLE

PATCH In review Julian Braha 3 participants 3 messages May 3 – May 26

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: replace select with dependency for visible RELOCATABLE

RANDOMIZE_BASE currently selects RELOCATABLE even though RELOCATABLE is visible to users. Some other architectures, like x86, use 'depends on' for RELOCATABLE in their definition of RANDOMIZE_BASE, so let's do the same here.

This select-visible Kconfig misusage was detected by Kconfirm, a static analysis tool for Kconfig.

---
 arch/riscv/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/Kconfig +1 -1
index d32309846fa3..da26559a0893 100644
@@ -1143,7 +1143,7 @@ config RELOCATABLE
 
 config RANDOMIZE_BASE
         bool "Randomize the address of the kernel image"
-        select RELOCATABLE
+        depends on RELOCATABLE
         depends on MMU && 64BIT
         help
           Randomizes the virtual address at which the kernel image is
Signature · 1 line
2.53.0
maintainer
#1 lore raw
Quoted 9 lines · Julian Braha

RANDOMIZE_BASE currently selects RELOCATABLE even though RELOCATABLE is visible to users. Some other architectures, like x86, use 'depends on' for RELOCATABLE in their definition of RANDOMIZE_BASE, so let's do the same here.

This select-visible Kconfig misusage was detected by Kconfirm, a static analysis tool for Kconfig.

Thanks, queued for v7.2.

- Paul

#2 lore raw

Hi Paul,

Quoted 6 lines · Paul Walmsley
Quoted 5 lines · Julian Braha

RANDOMIZE_BASE currently selects RELOCATABLE even though RELOCATABLE is visible to users. Some other architectures, like x86, use 'depends on' for RELOCATABLE in their definition of RANDOMIZE_BASE, so let's do the same here.

Quoted 6 lines
Quoted 4 lines

This select-visible Kconfig misusage was detected by Kconfirm, a static analysis tool for Kconfig.

Thanks, queued for v7.2.

This was applied twice to riscv/for-next, in commits 7bce18b7c0835686 and a74483879d1d4769 ("riscv: replace select with dependency for visible RELOCATABLE"). Apparently, the second commit is empty.

I noticed because it broke my workflow: I use "git cherry -v linux-next/master master" to check which of my patches were accepted in linux-next. Thanks to your empty commit, all my empty separator commits are now flagged as present in linux-next...

Thanks for fixing! ;-)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds