kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: pebolle@tiscali.nl (Paul Bolle)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Option CONFIG_DEBUG_SET_MODULE_RONX not working for kernel 3.10
Date: Fri, 15 Aug 2014 12:49:09 +0200	[thread overview]
Message-ID: <1408099749.25159.8.camel@x220> (raw)
In-Reply-To: <34129.1408023523@turing-police.cc.vt.edu>

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....


Paul Bolle

  reply	other threads:[~2014-08-15 10:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-14 11:16 Option CONFIG_DEBUG_SET_MODULE_RONX not working for kernel 3.10 Chetan Nanda
2014-08-14 13:38 ` Valdis.Kletnieks at vt.edu
2014-08-15 10:49   ` Paul Bolle [this message]
2014-08-17  7:57     ` Chetan Nanda

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=1408099749.25159.8.camel@x220 \
    --to=pebolle@tiscali.nl \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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;
as well as URLs for NNTP newsgroup(s).