On Fri, Aug 15, 2014 at 4:19 PM, Paul Bolle <pebolle@tiscali.nl> wrote:
On Thu, 2014-08-14 at 09:38 -0400, Valdis Kletnieks wrote:
On Thu, 14 Aug 2014 16:46:22 +0530, Chetan Nanda said:
I am trying to enable 'CONFIG_DEBUG_SET_MODULE_RONX' config option on 3.10 kernel (for ARM arch) via writing CONFIG_DEBUG_SET_MODULE_RONX=y at the end of board specific config file.
But .config generated after kernel build do not have this option enabled.
Do I need to enable any other option also before enabling this one?
Go into 'make menuconfig', Enter a '/'. In the textbox, enter a substring of the symbol (I entered 'MODULE_RONX').
At least on x86_64, this shows me:
x Symbol: DEBUG_SET_MODULE_RONX [=y] x x Type : boolean x x Prompt: Set loadable kernel module data as NX and text as RO x x Location: x x (1) -> Kernel hacking x x Defined at arch/x86/Kconfig.debug:112 x x Depends on: MODULES [=y]
Perhaps it's different on ARM - seems pretty silly to enable MODULE_RONX if your kernel doesn't have CONFIG_MODULES=y in the build.
DEBUG_SET_MODULE_RONX was added for ARM in v3.14: $ git grep -nw DEBUG_SET_MODULE_RONX v3.13 v3.13:arch/s390/Kconfig.debug:32:config DEBUG_SET_MODULE_RONX v3.13:arch/x86/Kconfig.debug:103:config DEBUG_SET_MODULE_RONX $ git grep -nw DEBUG_SET_MODULE_RONX v3.14 v3.14:arch/arm/Kconfig.debug:1198:config DEBUG_SET_MODULE_RONX v3.14:arch/s390/Kconfig.debug:32:config DEBUG_SET_MODULE_RONX v3.14:arch/x86/Kconfig.debug:103:config DEBUG_SET_MODULE_RONX
See commit dca9aa92fc7c ("ARM: add DEBUG_SET_MODULE_RONX option to Kconfig"). So using that Kconfig symbol in v3.10 is pointless (for ARM).
But in general, you should *NOT* simply edit the config file, because that does *not* do any checking of select/depend as you make the change.
Then when you actually make the kernel, it *will* re-drive the select/depend logic, and convert the provided .config to a self-consistent form.
And, as Chetan noticed, it will also drop Kconfig symbols that are unknown for that build (as, in this case, DEBUG_SET_MODULE_RONX).
Of course, there is zero guarantee that the self-consistent form corresponds to your intentions....
Hi Valdis, Paul, Thanks for your mails. I would try to backport 'DEBUG_SET_MODULE_RONX' support from v3.14 Thanks, Chetan Nanda
Paul Bolle