public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Documentation: DocBook: kgdb: update CONFIG_STRICT_KERNEL_RWX info
@ 2017-04-19  1:58 Li Qiang
  2017-04-20 15:28 ` Daniel Thompson
  2017-04-20 21:09 ` Jonathan Corbet
  0 siblings, 2 replies; 4+ messages in thread
From: Li Qiang @ 2017-04-19  1:58 UTC (permalink / raw)
  To: jason.wessel, corbet, labbott
  Cc: linux-doc, linux-kernel, kgdb-bugreport, Li Qiang

CONFIG_STRICT_KERNEL_RWX is no longer selectable on most architectures.
Update this info to the documentation.

Signed-off-by: Li Qiang <liqiang6-s@360.cn>
---
 Documentation/DocBook/kgdb.tmpl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl
index 856ac20..ef0b67b 100644
--- a/Documentation/DocBook/kgdb.tmpl
+++ b/Documentation/DocBook/kgdb.tmpl
@@ -121,7 +121,9 @@
     If kgdb supports it for the architecture you are using, you can
     use hardware breakpoints if you desire to run with the
     CONFIG_STRICT_KERNEL_RWX option turned on, else you need to turn off
-    this option.
+    this option. In most architectures, this option is not selectable.
+    For this situation, it can be turned off by adding a runtime parameter
+    'rodata=off'.
     </para>
     <para>
     Next you should choose one of more I/O drivers to interconnect
-- 
2.7.4

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

* Re: [PATCH] Documentation: DocBook: kgdb: update CONFIG_STRICT_KERNEL_RWX info
  2017-04-19  1:58 [PATCH] Documentation: DocBook: kgdb: update CONFIG_STRICT_KERNEL_RWX info Li Qiang
@ 2017-04-20 15:28 ` Daniel Thompson
       [not found]   ` <CAKXe6S+gu2xm+rC390_PTt5EoGgG8psCJD11333_7ndz6TZHAg@mail.gmail.com>
  2017-04-20 21:09 ` Jonathan Corbet
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Thompson @ 2017-04-20 15:28 UTC (permalink / raw)
  To: Li Qiang, jason.wessel, corbet, labbott
  Cc: linux-doc, linux-kernel, kgdb-bugreport, Li Qiang

On 19/04/17 02:58, Li Qiang wrote:
> CONFIG_STRICT_KERNEL_RWX is no longer selectable on most architectures.
> Update this info to thedocumentation.

"git grep STRICT_KERNEL_RWX" comes up with nothing.

It is selectable on any architecture? If not we should remove it entirely!


Daniel.


>
> Signed-off-by: Li Qiang <liqiang6-s@360.cn>
> ---
>  Documentation/DocBook/kgdb.tmpl | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl
> index 856ac20..ef0b67b 100644
> --- a/Documentation/DocBook/kgdb.tmpl
> +++ b/Documentation/DocBook/kgdb.tmpl
> @@ -121,7 +121,9 @@
>      If kgdb supports it for the architecture you are using, you can
>      use hardware breakpoints if you desire to run with the
>      CONFIG_STRICT_KERNEL_RWX option turned on, else you need to turn off
> -    this option.
> +    this option. In most architectures, this option is not selectable.
> +    For this situation, it can be turned off by adding a runtime parameter
> +    'rodata=off'.
>      </para>
>      <para>
>      Next you should choose one of more I/O drivers to interconnect
>

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

* Re: [PATCH] Documentation: DocBook: kgdb: update CONFIG_STRICT_KERNEL_RWX info
  2017-04-19  1:58 [PATCH] Documentation: DocBook: kgdb: update CONFIG_STRICT_KERNEL_RWX info Li Qiang
  2017-04-20 15:28 ` Daniel Thompson
@ 2017-04-20 21:09 ` Jonathan Corbet
  1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Corbet @ 2017-04-20 21:09 UTC (permalink / raw)
  To: Li Qiang
  Cc: jason.wessel, labbott, linux-doc, linux-kernel, kgdb-bugreport,
	Li Qiang

On Tue, 18 Apr 2017 18:58:45 -0700
Li Qiang <liq3ea@gmail.com> wrote:

> CONFIG_STRICT_KERNEL_RWX is no longer selectable on most architectures.
> Update this info to the documentation.
> 
> Signed-off-by: Li Qiang <liqiang6-s@360.cn>
> ---
>  Documentation/DocBook/kgdb.tmpl | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl
> index 856ac20..ef0b67b 100644
> --- a/Documentation/DocBook/kgdb.tmpl
> +++ b/Documentation/DocBook/kgdb.tmpl
> @@ -121,7 +121,9 @@
>      If kgdb supports it for the architecture you are using, you can
>      use hardware breakpoints if you desire to run with the
>      CONFIG_STRICT_KERNEL_RWX option turned on, else you need to turn off
> -    this option.
> +    this option. In most architectures, this option is not selectable.
> +    For this situation, it can be turned off by adding a runtime parameter
> +    'rodata=off'.

So this is an improvement, I guess, though the paragraph remains kind of
confusing.  Is there any chance we could actually just say which
architectures can use hardware breakpoints, and which should boot with
rodata=off?

Thanks,

jon

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

* Re: [PATCH] Documentation: DocBook: kgdb: update CONFIG_STRICT_KERNEL_RWX info
       [not found]   ` <CAKXe6S+gu2xm+rC390_PTt5EoGgG8psCJD11333_7ndz6TZHAg@mail.gmail.com>
@ 2017-04-21  9:19     ` Daniel Thompson
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Thompson @ 2017-04-21  9:19 UTC (permalink / raw)
  To: Li Qiang, Jonathan Corbet
  Cc: jason.wessel, labbott, linux-doc, linux-kernel, kgdb-bugreport,
	Li Qiang

On 21/04/17 03:26, Li Qiang wrote:
>
> @Daniel
>
> 2017-04-20 23:28 GMT+08:00 Daniel Thompson <daniel.thompson@linaro.org
> <mailto:daniel.thompson@linaro.org>>:
>
>     On 19/04/17 02:58, Li Qiang wrote:
>
>         CONFIG_STRICT_KERNEL_RWX is no longer selectable on most
>         architectures.
>         Update this info to thedocumentation.
>
>
>     "git grep STRICT_KERNEL_RWX" comes up with nothing.
>
>
> It was introduced in commit 0f5bf6d0afe4be6e1391908ff2d6dc9730e91550.

Oops. I did the grep on the wrong machine :-( and therefore on an older 
kernel than I thought...


>     It is selectable on any architecture? If not we should remove it
>     entirely!
>
> The 'STRICT_KERNEL_RWX' is renamed from 'CONFIG_DEBUG_RODATA
> '. The original option is selectable.
>
> I'm not sure is this selectable on any architecture.

So... having found the right kernel, it looks to me like only arm, 
arm64, parisc, s390 and x86 define ARCH_HAS_STRICT_KERNEL_RWX. Of these 
five, only arm defines ARCH_OPTIONAL_KERNEL_RWX and makes it user 
selectable.


>
> @Jonathan
>
>     On Tue, 18 Apr 2017 18:58:45 -0700
>     Li Qiang <liq3ea@gmail.com <mailto:liq3ea@gmail.com>> wrote:
>
>     > CONFIG_STRICT_KERNEL_RWX is no longer selectable on most architectures.
>     > Update this info to the documentation.
>     >
>     > Signed-off-by: Li Qiang <liqiang6-s@360.cn <mailto:liqiang6-s@360.cn>>
>     > ---
>     >  Documentation/DocBook/kgdb.tmpl | 4 +++-
>     >  1 file changed, 3 insertions(+), 1 deletion(-)
>     >
>     > diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl
>     > index 856ac20..ef0b67b 100644
>     > --- a/Documentation/DocBook/kgdb.tmpl
>     > +++ b/Documentation/DocBook/kgdb.tmpl
>     > @@ -121,7 +121,9 @@
>     >      If kgdb supports it for the architecture you are using, you can
>     >      use hardware breakpoints if you desire to run with the
>     >      CONFIG_STRICT_KERNEL_RWX option turned on, else you need to turn off
>     > -    this option.
>     > +    this option. In most architectures, this option is not selectable.
>     > +    For this situation, it can be turned off by adding a runtime parameter
>     > +    'rodata=off'.
>
>     So this is an improvement, I guess, though the paragraph remains kind of
>     confusing.  Is there any chance we could actually just say which
>     architectures can use hardware breakpoints, and which should boot with
>     rodata=off?
>
>
> I think this is unnecessary as it is not common to change the
> default CONFIG_STRICT_KERNEL_RWX /add rodata=off.
> We here give this hint because CONFIG_STRICT_KERNEL_RWX is renamed
> from CONFIG_DEBUG_RODATA.
> And the latter is selectable, this can help the peoples who
> think CONFIG_STRICT_KERNEL_RWX  is also selectable.

Having looked at the earlier part of the paragraph I think the info 
about rodata actually needs to be introduced slightly earlier (and 
rodata should be presented as the primary way to do it because 4 of the 
5 architectures don't make STRICT_KERNEL_RWX optional).

Something like:

   If the architecture that you are using supports making the text
   section read-only (CONFIG_STRICT_KERNEL_RWX), you should consider
   turning it off by adding 'rodata=off' to the kernel commandline or,
   if your architecture makes CONFIG_STRICT_KERNEL_RWX optional, by
   disabling this config option. Alternatively, if your architecture
   supports hardware breakpoints, these can be used to provide limited
   breakpoint support if you desire to run with a read-only text section.


Daniel.

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

end of thread, other threads:[~2017-04-21  9:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-19  1:58 [PATCH] Documentation: DocBook: kgdb: update CONFIG_STRICT_KERNEL_RWX info Li Qiang
2017-04-20 15:28 ` Daniel Thompson
     [not found]   ` <CAKXe6S+gu2xm+rC390_PTt5EoGgG8psCJD11333_7ndz6TZHAg@mail.gmail.com>
2017-04-21  9:19     ` Daniel Thompson
2017-04-20 21:09 ` Jonathan Corbet

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