All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docs: sysctl/kernel: document unaligned controls
@ 2020-05-15 16:04 Stephen Kitt
  2020-05-15 17:27 ` Jonathan Corbet
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Kitt @ 2020-05-15 16:04 UTC (permalink / raw)
  To: Jonathan Corbet, Mauro Carvalho Chehab, linux-doc
  Cc: linux-kernel, Stephen Kitt

This documents ignore-unaligned-usertrap, unaligned-dump-stack, and
unaligned-trap, based on arch/arc/kernel/unaligned.c,
arch/ia64/kernel/unaligned.c, and arch/parisc/kernel/unaligned.c.

While we’re at it, integrate unaligned-memory-access.txt into the docs
tree.

Signed-off-by: Stephen Kitt <steve@sk2.org>
---
 Documentation/admin-guide/sysctl/kernel.rst   | 51 +++++++++++++++++++
 Documentation/index.rst                       |  1 +
 ...access.txt => unaligned-memory-access.rst} |  0
 3 files changed, 52 insertions(+)
 rename Documentation/{unaligned-memory-access.txt => unaligned-memory-access.rst} (100%)

diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
index eb6bc9cc0318..4bb4d55f20ff 100644
--- a/Documentation/admin-guide/sysctl/kernel.rst
+++ b/Documentation/admin-guide/sysctl/kernel.rst
@@ -402,6 +402,25 @@ Controls whether the panic kmsg data should be reported to Hyper-V.
 = =========================================================
 
 
+ignore-unaligned-usertrap
+=========================
+
+On architectures where unaligned accesses cause traps, and where this
+feature is supported (``CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN``;
+currently, ``arc`` and ``ia64``), controls whether all unaligned traps
+are logged.
+
+= =============================================================
+0 Log all unaligned accesses.
+1 Only warn the first time a process traps. This is the default
+  setting.
+= =============================================================
+
+See also `unaligned-trap`_ and `unaligned-dump-stack`_. On ``ia64``,
+this allows system administrators to override the
+``IA64_THREAD_UAC_NOPRINT`` ``prctl`` and avoid logs being flooded.
+
+
 kexec_load_disabled
 ===================
 
@@ -1252,6 +1271,38 @@ See :doc:`/admin-guide/kernel-parameters` and
 :doc:`/trace/boottime-trace`.
 
 
+.. _unaligned-dump-stack:
+
+unaligned-dump-stack (ia64)
+===========================
+
+When logging unaligned accesses, controls whether the stack is
+dumped.
+
+= ===================================================
+0 Do not dump the stack. This is the default setting.
+1 Dump the stack.
+= ===================================================
+
+See also `ignore-unaligned-usertrap`_.
+
+
+unaligned-trap
+==============
+
+On architectures where unaligned accesses cause traps, and where this
+feature is supported (``CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW``; currently,
+``arc`` and ``parisc``), controls whether unaligned traps are caught
+and emulated (instead of failing).
+
+= ========================================================
+0 Do not emulate unaligned accesses.
+1 Emulate unaligned accesses. This is the default setting.
+= ========================================================
+
+See also `ignore-unaligned-usertrap`_.
+
+
 unknown_nmi_panic
 =================
 
diff --git a/Documentation/index.rst b/Documentation/index.rst
index 9599c0f3eea8..17c38d899572 100644
--- a/Documentation/index.rst
+++ b/Documentation/index.rst
@@ -143,6 +143,7 @@ Architecture-agnostic documentation
    :maxdepth: 2
 
    asm-annotations
+   unaligned-memory-access
 
 Architecture-specific documentation
 -----------------------------------
diff --git a/Documentation/unaligned-memory-access.txt b/Documentation/unaligned-memory-access.rst
similarity index 100%
rename from Documentation/unaligned-memory-access.txt
rename to Documentation/unaligned-memory-access.rst

base-commit: 56b62540782bfde459acc8eb15b949eaf151c881
-- 
2.20.1


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

* Re: [PATCH] docs: sysctl/kernel: document unaligned controls
  2020-05-15 16:04 [PATCH] docs: sysctl/kernel: document unaligned controls Stephen Kitt
@ 2020-05-15 17:27 ` Jonathan Corbet
  2020-05-15 18:36   ` Stephen Kitt
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Corbet @ 2020-05-15 17:27 UTC (permalink / raw)
  To: Stephen Kitt; +Cc: Mauro Carvalho Chehab, linux-doc, linux-kernel

On Fri, 15 May 2020 18:04:06 +0200
Stephen Kitt <steve@sk2.org> wrote:

> diff --git a/Documentation/index.rst b/Documentation/index.rst
> index 9599c0f3eea8..17c38d899572 100644
> --- a/Documentation/index.rst
> +++ b/Documentation/index.rst
> @@ -143,6 +143,7 @@ Architecture-agnostic documentation
>     :maxdepth: 2
>  
>     asm-annotations
> +   unaligned-memory-access
>  
>  Architecture-specific documentation
>  -----------------------------------
> diff --git a/Documentation/unaligned-memory-access.txt b/Documentation/unaligned-memory-access.rst
> similarity index 100%
> rename from Documentation/unaligned-memory-access.txt
> rename to Documentation/unaligned-memory-access.rst

Adding this to the toctree is great, but I'd just as soon not leave it in
the top-level directory while we do that.  Since you're renaming it
anyway, can you move it into process/?  It's not a perfect fit, but that's
where that type of material has been going so far.

Thanks,

jon

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

* Re: [PATCH] docs: sysctl/kernel: document unaligned controls
  2020-05-15 17:27 ` Jonathan Corbet
@ 2020-05-15 18:36   ` Stephen Kitt
  2020-05-15 21:17     ` Stephen Kitt
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Kitt @ 2020-05-15 18:36 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: Mauro Carvalho Chehab, linux-doc, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]

On Fri, 15 May 2020 11:27:35 -0600, Jonathan Corbet <corbet@lwn.net> wrote:
> On Fri, 15 May 2020 18:04:06 +0200
> Stephen Kitt <steve@sk2.org> wrote:
> 
> > diff --git a/Documentation/index.rst b/Documentation/index.rst
> > index 9599c0f3eea8..17c38d899572 100644
> > --- a/Documentation/index.rst
> > +++ b/Documentation/index.rst
> > @@ -143,6 +143,7 @@ Architecture-agnostic documentation
> >     :maxdepth: 2
> >  
> >     asm-annotations
> > +   unaligned-memory-access
> >  
> >  Architecture-specific documentation
> >  -----------------------------------
> > diff --git a/Documentation/unaligned-memory-access.txt
> > b/Documentation/unaligned-memory-access.rst similarity index 100%
> > rename from Documentation/unaligned-memory-access.txt
> > rename to Documentation/unaligned-memory-access.rst  
> 
> Adding this to the toctree is great, but I'd just as soon not leave it in
> the top-level directory while we do that.  Since you're renaming it
> anyway, can you move it into process/?  It's not a perfect fit, but that's
> where that type of material has been going so far.

I can indeed. Should it still be listed in the main toctree, or in the
process toctree?

Regards,

Stephen

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] docs: sysctl/kernel: document unaligned controls
  2020-05-15 18:36   ` Stephen Kitt
@ 2020-05-15 21:17     ` Stephen Kitt
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Kitt @ 2020-05-15 21:17 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: Mauro Carvalho Chehab, linux-doc, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]

On Fri, 15 May 2020 20:36:01 +0200, Stephen Kitt <steve@sk2.org> wrote:

> On Fri, 15 May 2020 11:27:35 -0600, Jonathan Corbet <corbet@lwn.net> wrote:
> > On Fri, 15 May 2020 18:04:06 +0200
> > Stephen Kitt <steve@sk2.org> wrote:
> >   
> > > diff --git a/Documentation/index.rst b/Documentation/index.rst
> > > index 9599c0f3eea8..17c38d899572 100644
> > > --- a/Documentation/index.rst
> > > +++ b/Documentation/index.rst
> > > @@ -143,6 +143,7 @@ Architecture-agnostic documentation
> > >     :maxdepth: 2
> > >  
> > >     asm-annotations
> > > +   unaligned-memory-access
> > >  
> > >  Architecture-specific documentation
> > >  -----------------------------------
> > > diff --git a/Documentation/unaligned-memory-access.txt
> > > b/Documentation/unaligned-memory-access.rst similarity index 100%
> > > rename from Documentation/unaligned-memory-access.txt
> > > rename to Documentation/unaligned-memory-access.rst    
> > 
> > Adding this to the toctree is great, but I'd just as soon not leave it in
> > the top-level directory while we do that.  Since you're renaming it
> > anyway, can you move it into process/?  It's not a perfect fit, but that's
> > where that type of material has been going so far.  
> 
> I can indeed. Should it still be listed in the main toctree, or in the
> process toctree?

Never mind, I found the answer, “some overall technical guides that have been
put here for now for lack of a better place” ;-).

Regards,

Stephen

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2020-05-15 21:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 16:04 [PATCH] docs: sysctl/kernel: document unaligned controls Stephen Kitt
2020-05-15 17:27 ` Jonathan Corbet
2020-05-15 18:36   ` Stephen Kitt
2020-05-15 21:17     ` Stephen Kitt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.