]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/log
mirror_ubuntu-hirsute-kernel.git
7 years agoDocs: fix table problems in ras.rst
Jonathan Corbet [Sun, 18 Jun 2017 23:30:18 +0000 (17:30 -0600)]
Docs: fix table problems in ras.rst

Two table problems caused the PDF build to fail:

 - Evidently multirow cells are not appreciated in table headers,
   so remove such from the "CS Rows" table.

 - The logging message structure table was incorrectly formatted,
   with two "+" instead of "|".  The HTML build is forgiving of such
   things, but PDF is not.

Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agoDocs: Fix breakage with Sphinx 1.5 and upper
Mauro Carvalho Chehab [Mon, 19 Jun 2017 10:49:06 +0000 (07:49 -0300)]
Docs: Fix breakage with Sphinx 1.5 and upper

Commit 85c21e5c3ee7 (docs-rst: better adjust margins and font size) added a
\usepackage{geometry} that conflicts with another inclusion deep within the
dependencies with newer versions of Sphinx, causing the the PDF build to fail
with a "conflicting parameters" error.

Detect the Sphinx version, using sphinxsetup for Sphinx versions 1.5 and
upper.

Fixes: 85c21e5c3ee74fb75d690c57f7066bae7e2dca55
[jc: Tweaked logic to exclude 1.5.x for x < 3 ]
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agoDocs: Include the Latex "ifthen" package
Jonathan Corbet [Sun, 18 Jun 2017 23:23:52 +0000 (17:23 -0600)]
Docs: Include the Latex "ifthen" package

Otherwise we get PDF build failures when LaTeX refused to acknowledge the
existence of \ifthenelse

Fixes: 41cff161fe99d1c6a773becc2250a1dc3ac035ff
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc/kokr/howto: Only send regression fixes after -rc1
SeongJae Park [Fri, 16 Jun 2017 11:34:32 +0000 (20:34 +0900)]
doc/kokr/howto: Only send regression fixes after -rc1

This commit applies commit 388f9b20f98d ("Documentation/process/howto:
Only send regression fixes after -rc1") to Korean translation.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodocs-rst: fix broken links to dynamic-debug-howto in kernel-parameters
Steffen Maier [Wed, 14 Jun 2017 10:24:12 +0000 (12:24 +0200)]
docs-rst: fix broken links to dynamic-debug-howto in kernel-parameters

Another place in lib/Kconfig.debug was already fixed in commit f8998c226587
("lib/Kconfig.debug: correct documentation paths").

Fixes: 9d85025b0418 ("docs-rst: create an user's manual book")
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: Document suitability of IBM Verse for kernel development
Stewart Smith [Mon, 19 Jun 2017 05:31:22 +0000 (15:31 +1000)]
doc: Document suitability of IBM Verse for kernel development

IBM Verse is a web UI around Lotus Domino mail servers (much like
the Lotus Notes client talks to Domino servers).

For various reasons, it is not at all suitable for kernel development,
all of which have been raised (repeatedly) internally.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Acked-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agoDoc: fix a markup error in coding-style.rst
Ayan Shafqat [Thu, 18 May 2017 18:32:57 +0000 (14:32 -0400)]
Doc: fix a markup error in coding-style.rst

The "\n\t" sequence needs to be quoted or it will not render properly.

[jc: no signoff from the author, but it's trivial]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodocs: driver-api: i2c: remove some outdated information
Wolfram Sang [Tue, 23 May 2017 13:46:54 +0000 (15:46 +0200)]
docs: driver-api: i2c: remove some outdated information

a) Linux can be an I2C slave meanwhile
b) all drivers except one use the driver model currently

Update the documentation.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agoDocumentation: DMA API: fix a typo in a function name
Wolfram Sang [Sat, 27 May 2017 18:52:43 +0000 (20:52 +0200)]
Documentation: DMA API: fix a typo in a function name

Correct the typo, the wrongly typed function does not exist.

Fixes: 6c9c6d6301287e ("dma-debug: New interfaces to debug dma mapping errors")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agoDocs: Insert missing space to separate link from text
Sanjeev Gupta [Mon, 29 May 2017 11:48:46 +0000 (19:48 +0800)]
Docs: Insert missing space to separate link from text

Korean translation, there should be a space terminating the link.

Acked-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc/ko_KR/memory-barriers: Update control-dependencies example
SeongJae Park [Thu, 1 Jun 2017 04:21:02 +0000 (13:21 +0900)]
doc/ko_KR/memory-barriers: Update control-dependencies example

This commit applies upstream change, commit b26cfc48e3e0 ("doc: Update
control-dependencies section of memory-barriers.txt"), to Korean
translation.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agoMerge remote-tracking branch 'mauro-exp/docbook3' into death-to-docbook
Jonathan Corbet [Thu, 18 May 2017 17:03:08 +0000 (11:03 -0600)]
Merge remote-tracking branch 'mauro-exp/docbook3' into death-to-docbook

Mauro says:

This patch series convert the remaining DocBooks to ReST.

The first version was originally
send as 3 patch series:

   [PATCH 00/36] Convert DocBook documents to ReST
   [PATCH 0/5] Convert more books to ReST
   [PATCH 00/13] Get rid of DocBook

The lsm book was added as if it were a text file under
Documentation. The plan is to merge it with another file
under Documentation/security, after both this series and
a security Documentation patch series gets merged.

It also adjusts some Sphinx-pedantic errors/warnings on
some kernel-doc markups.

I also added some patches here to add PDF output for all
existing ReST books.

7 years agoDocumentation, kbuild: fix typo "minimun" -> "minimum"
Tobias Klauser [Thu, 18 May 2017 12:17:29 +0000 (14:17 +0200)]
Documentation, kbuild: fix typo "minimun" -> "minimum"

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodocs: Fix some formatting issues in request-key.rst
Jonathan Corbet [Thu, 18 May 2017 16:46:25 +0000 (10:46 -0600)]
docs: Fix some formatting issues in request-key.rst

The white space in the big enumerated list was inconsistent, leading to
some strange formatting artifacts.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: ReSTify keys-trusted-encrypted.txt
Kees Cook [Sat, 13 May 2017 11:51:53 +0000 (04:51 -0700)]
doc: ReSTify keys-trusted-encrypted.txt

Adjusts for ReST markup and moves under keys security devel index.

Cc: David Howells <dhowells@redhat.com>
Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: ReSTify keys-request-key.txt
Kees Cook [Sat, 13 May 2017 11:51:52 +0000 (04:51 -0700)]
doc: ReSTify keys-request-key.txt

Adjusts for ReST markup and moves under keys security devel index.

Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: ReSTify keys-ecryptfs.txt
Kees Cook [Sat, 13 May 2017 11:51:51 +0000 (04:51 -0700)]
doc: ReSTify keys-ecryptfs.txt

Adjusts for ReST markup and moves under keys security devel index.

Cc: David Howells <dhowells@redhat.com>
Cc: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: ReSTify keys.txt
Kees Cook [Sat, 13 May 2017 11:51:50 +0000 (04:51 -0700)]
doc: ReSTify keys.txt

This creates a new section in the security development index for kernel
keys, and adjusts for ReST markup.

Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: ReSTify Smack.txt
Kees Cook [Sat, 13 May 2017 11:51:49 +0000 (04:51 -0700)]
doc: ReSTify Smack.txt

Adjusts for ReST markup and moves under LSM admin guide.

Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: ReSTify LoadPin.txt
Kees Cook [Sat, 13 May 2017 11:51:48 +0000 (04:51 -0700)]
doc: ReSTify LoadPin.txt

Adjusts for ReST markup and moves under LSM admin guide.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: ReSTify Yama.txt
Kees Cook [Sat, 13 May 2017 11:51:47 +0000 (04:51 -0700)]
doc: ReSTify Yama.txt

Adjusts for ReST markup and moves under LSM admin guide.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: ReSTify tomoyo.txt
Kees Cook [Sat, 13 May 2017 11:51:46 +0000 (04:51 -0700)]
doc: ReSTify tomoyo.txt

Adjusts for ReST markup and moves under LSM admin guide.

Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: ReSTify apparmor.txt
Kees Cook [Sat, 13 May 2017 11:51:45 +0000 (04:51 -0700)]
doc: ReSTify apparmor.txt

Adjusts for ReST markup and moves under LSM admin guide.

Acked-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: ReSTify SELinux.txt
Kees Cook [Sat, 13 May 2017 11:51:44 +0000 (04:51 -0700)]
doc: ReSTify SELinux.txt

Adjusts for ReST markup and moves under LSM admin guide.

Cc: Paul Moore <paul@paul-moore.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: ReSTify and split LSM.txt
Kees Cook [Sat, 13 May 2017 11:51:43 +0000 (04:51 -0700)]
doc: ReSTify and split LSM.txt

The existing LSM.txt file covered both usage and development, so split
this into two files, one under admin-guide and one under kernel
development.

Cc: James Morris <james.l.morris@oracle.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: security: minor cleanups to build kernel-doc
Kees Cook [Sat, 13 May 2017 11:51:42 +0000 (04:51 -0700)]
doc: security: minor cleanups to build kernel-doc

These fixes were needed to parse lsm_hooks.h kernel-doc. More work is
needed, but this is the first step.

Acked-by: James Morris <james.l.morris@oracle.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: ReSTify self-protection.txt
Kees Cook [Sat, 13 May 2017 11:51:41 +0000 (04:51 -0700)]
doc: ReSTify self-protection.txt

This updates the credentials API documentation to ReST markup and moves
it under the security subsection of kernel API documentation.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: ReSTify credentials.txt
Kees Cook [Sat, 13 May 2017 11:51:40 +0000 (04:51 -0700)]
doc: ReSTify credentials.txt

This updates the credentials API documentation to ReST markup and moves
it under the security subsection of kernel API documentation.

Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: ReSTify IMA-templates.txt
Kees Cook [Sat, 13 May 2017 11:51:39 +0000 (04:51 -0700)]
doc: ReSTify IMA-templates.txt

Adjust IMA-templates.txt for ReST markup and add to the index for
security/, under the Kernel API Documentation.

Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: ReSTify no_new_privs.txt
Kees Cook [Sat, 13 May 2017 11:51:38 +0000 (04:51 -0700)]
doc: ReSTify no_new_privs.txt

This updates no_new_privs documentation to ReST markup and adds it to
the user-space API documentation.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc: ReSTify seccomp_filter.txt
Kees Cook [Sat, 13 May 2017 11:51:37 +0000 (04:51 -0700)]
doc: ReSTify seccomp_filter.txt

This updates seccomp_filter.txt for ReST markup, and moves it under the
user-space API index, since it describes how application author can use
seccomp.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agodoc-rst: fix inline emphasis in unshare.rst
Markus Heiser [Sat, 13 May 2017 13:41:38 +0000 (15:41 +0200)]
doc-rst: fix inline emphasis in unshare.rst

The asterisk of the pointer is interpreted as a start tag for inline
emphasis. Asterisks which are not Sphinx markup need to be quoted in
rst-files. This fixes the Sphinx warning:

Documentation/userspace-api/unshare.rst:108: WARNING: Inline emphasis start-string without end-string.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agocore-api: remove an unexpected unident
Markus Heiser [Sat, 13 May 2017 13:28:25 +0000 (15:28 +0200)]
core-api: remove an unexpected unident

As complained by Sphinx:
Documentation/core-api/assoc_array.rst:13: WARNING: Enumerated list ends without a blank line; unexpected unindent.

This was already addressed, but not really fixed in 2ba90ccca7.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
7 years agoMerge tag 'v4.12-rc1' into docs-next
Jonathan Corbet [Thu, 18 May 2017 16:19:33 +0000 (10:19 -0600)]
Merge tag 'v4.12-rc1' into docs-next

Linux 4.12-rc1

7 years agokernel-doc: describe the ``literal`` syntax
Mauro Carvalho Chehab [Tue, 16 May 2017 11:17:49 +0000 (08:17 -0300)]
kernel-doc: describe the ``literal`` syntax

changeset b97f193abf83 ("scripts/kernel-doc: fix parser
for apostrophes") added support for ``literal`` inside
kernel-doc, in order to allow using the "%" symbol inside
a literal block, as this is used at printk() description.

Document it.

Fixes: b97f193abf83 ("scripts/kernel-doc: fix parser for apostrophes")
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: get rid of Documentation/sphinx/tmplcvt script
Mauro Carvalho Chehab [Sun, 14 May 2017 15:22:12 +0000 (12:22 -0300)]
docs-rst: get rid of Documentation/sphinx/tmplcvt script

As everything was converted to ReST, we don't need this
script anymore.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agousb: fix the comment with regards to DocBook
Mauro Carvalho Chehab [Sun, 14 May 2017 15:08:25 +0000 (12:08 -0300)]
usb: fix the comment with regards to DocBook

The USB gadget documentation is not at DocBook anymore.
The main file was converted to ReST, and stored at
Documentation/driver-api/usb/gadget.rst, but there are
still several plain text files related to gadget under
Documentation/usb.

So, be generic and just mention documentation
without specifying where it is.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agofs: fix the location of the kernel-api book
Mauro Carvalho Chehab [Sun, 14 May 2017 15:09:53 +0000 (12:09 -0300)]
fs: fix the location of the kernel-api book

The kernel-api book is now part of the core-api. Update its
location.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agolib: update location of kgdb documentation
Mauro Carvalho Chehab [Sun, 14 May 2017 15:06:29 +0000 (12:06 -0300)]
lib: update location of kgdb documentation

The documentation was moved from DocBook directory.
Update its location.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agofs: update location of filesystems documentation
Mauro Carvalho Chehab [Sun, 14 May 2017 15:04:55 +0000 (12:04 -0300)]
fs: update location of filesystems documentation

The filesystem documentation was moved from DocBook to
Documentation/filesystems/. Update it at the sources.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agoirq: update genericirq book location
Mauro Carvalho Chehab [Sun, 14 May 2017 15:03:39 +0000 (12:03 -0300)]
irq: update genericirq book location

This book got converted from DocBook. Update its references to
point to the current location.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agoia64, scsi: update references for the device-io book
Mauro Carvalho Chehab [Sun, 14 May 2017 14:54:11 +0000 (11:54 -0300)]
ia64, scsi: update references for the device-io book

The book is now at Documentation/driver-api/device-io.rst.
Update such references.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agoata: update references for libata documentation
Mauro Carvalho Chehab [Sun, 14 May 2017 14:52:56 +0000 (11:52 -0300)]
ata: update references for libata documentation

The libata documentation is now using ReST. Update references
to it to point to the new place.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agoMAINTAINERS: update old references for DocBook directory
Mauro Carvalho Chehab [Sun, 14 May 2017 14:52:08 +0000 (11:52 -0300)]
MAINTAINERS: update old references for DocBook directory

As everything was converted, update the references to
point to the new places.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs: update old references for DocBook from the documentation
Mauro Carvalho Chehab [Sun, 14 May 2017 14:50:11 +0000 (11:50 -0300)]
docs: update old references for DocBook from the documentation

DocBook is mentioned several times at the documentation. Update
the obsolete references from it at the DocBook.

Acked-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs: remove DocBook from the building system
Mauro Carvalho Chehab [Sun, 14 May 2017 14:50:01 +0000 (11:50 -0300)]
docs: remove DocBook from the building system

Now that we don't have any DocBook anymore, remove it from
the building system.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: convert lsm from DocBook to ReST
Mauro Carvalho Chehab [Sun, 14 May 2017 14:41:53 +0000 (11:41 -0300)]
docs-rst: convert lsm from DocBook to ReST

This file is outdated. Still, as it is the only one left at
DocBook dir, convert it, and store it, with a .txt extension,
under Documentation/lsm.txt.

This way, we can get rid of DocBook from the building system,
without needing to wait for someone to take care of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: convert sh book to ReST
Mauro Carvalho Chehab [Sat, 13 May 2017 10:50:43 +0000 (07:50 -0300)]
docs-rst: convert sh book to ReST

Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomtd: adjust kernel-docs to avoid Sphinx/kerneldoc warnings
Mauro Carvalho Chehab [Sat, 13 May 2017 10:40:36 +0000 (07:40 -0300)]
mtd: adjust kernel-docs to avoid Sphinx/kerneldoc warnings

./drivers/mtd/nand/nand_bbt.c:1: warning: no structured comments found
./include/linux/mtd/nand.h:785: ERROR: Unexpected indentation.
./drivers/mtd/nand/nand_base.c:449: WARNING: Definition list ends without a blank line; unexpected unindent.
./drivers/mtd/nand/nand_base.c:1161: ERROR: Unexpected indentation.
./drivers/mtd/nand/nand_base.c:1162: WARNING: Block quote ends without a blank line; unexpected unindent.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomtdnand.rst: group the "::" with previous line
Mauro Carvalho Chehab [Sat, 13 May 2017 10:31:32 +0000 (07:31 -0300)]
mtdnand.rst: group the "::" with previous line

Group the :: with the previous paragraph, in order to make it
visually better when reading as a text file.

While here, replace:
ored (with means "Covered or adorned with ore or metal")
by:
OR-ed

To reflect its true meaning.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: convert mtdnand book to ReST
Mauro Carvalho Chehab [Sat, 13 May 2017 10:10:44 +0000 (07:10 -0300)]
docs-rst: convert mtdnand book to ReST

Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

The tables were manually adjusted to fit into 80 columns.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: convert librs book to ReST
Mauro Carvalho Chehab [Sat, 13 May 2017 10:07:47 +0000 (07:07 -0300)]
docs-rst: convert librs book to ReST

Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: convert rapidio book to ReST
Mauro Carvalho Chehab [Fri, 12 May 2017 13:31:41 +0000 (10:31 -0300)]
docs-rst: convert rapidio book to ReST

Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: convert w1 book to ReST
Mauro Carvalho Chehab [Fri, 12 May 2017 13:28:13 +0000 (10:28 -0300)]
docs-rst: convert w1 book to ReST

Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agoscsi: fix some kernel-doc markups
Mauro Carvalho Chehab [Fri, 12 May 2017 13:04:14 +0000 (10:04 -0300)]
scsi: fix some kernel-doc markups

Sphinx is very pedantic with regards to ident/spacing.
Fix some kernel-doc markups in order to solve those
errors/warnings:

./drivers/scsi/scsicam.c:121: WARNING: Inline emphasis start-string without end-string.
./drivers/scsi/scsicam.c:121: WARNING: Inline emphasis start-string without end-string.
./drivers/scsi/scsicam.c:121: WARNING: Inline emphasis start-string without end-string.
./drivers/scsi/scsi_scan.c:1056: ERROR: Unexpected indentation.
./drivers/scsi/scsi_scan.c:1057: WARNING: Block quote ends without a blank line; unexpected unindent.
./drivers/scsi/scsi_transport_fc.c:2918: ERROR: Unexpected indentation.
./drivers/scsi/scsi_transport_fc.c:2921: WARNING: Block quote ends without a blank line; unexpected unindent.
./drivers/scsi/scsi_transport_fc.c:2922: WARNING: Enumerated list ends without a blank line; unexpected unindent.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: convert scsi DocBook to ReST
Mauro Carvalho Chehab [Fri, 12 May 2017 12:59:02 +0000 (09:59 -0300)]
docs-rst: convert scsi DocBook to ReST

Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: convert z8530book DocBook to ReST
Mauro Carvalho Chehab [Fri, 12 May 2017 12:54:05 +0000 (09:54 -0300)]
docs-rst: convert z8530book DocBook to ReST

Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Some manual adjustments were required due to some
conversion error on some literals.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agonet: fix some identation issues at kernel-doc markups
Mauro Carvalho Chehab [Fri, 12 May 2017 12:35:46 +0000 (09:35 -0300)]
net: fix some identation issues at kernel-doc markups

Sphinx is very pedantic with regards to identation and
escape sequences:

  ./include/net/sock.h:1967: ERROR: Unexpected indentation.
  ./include/net/sock.h:1969: ERROR: Unexpected indentation.
  ./include/net/sock.h:1970: WARNING: Block quote ends without a blank line; unexpected unindent.
  ./include/net/sock.h:1971: WARNING: Block quote ends without a blank line; unexpected unindent.
  ./include/net/sock.h:2268: WARNING: Inline emphasis start-string without end-string.
  ./net/core/sock.c:2686: ERROR: Unexpected indentation.
  ./net/core/sock.c:2687: WARNING: Block quote ends without a blank line; unexpected unindent.
  ./net/core/datagram.c:182: WARNING: Inline emphasis start-string without end-string.
  ./include/linux/netdevice.h:1444: ERROR: Unexpected indentation.
  ./drivers/net/phy/phy.c:381: ERROR: Unexpected indentation.
  ./drivers/net/phy/phy.c:382: WARNING: Block quote ends without a blank line; unexpected unindent.

- Fix spacing where needed;
- Properly escape constants;
- Use a literal block for a race description.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agonet: skbuff.h: properly escape a macro name on kernel-doc
Mauro Carvalho Chehab [Fri, 12 May 2017 12:19:29 +0000 (09:19 -0300)]
net: skbuff.h: properly escape a macro name on kernel-doc

The "%" escape code of kernel-doc only handle letters. It
doesn't handle special chars. So, use the ``literal``
notation. That fixes this warning:

./include/linux/skbuff.h:2695: WARNING: Inline literal start-string without end-string.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: convert networking book to ReST
Mauro Carvalho Chehab [Fri, 12 May 2017 12:14:02 +0000 (09:14 -0300)]
docs-rst: convert networking book to ReST

Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: convert s390-drivers DocBook to ReST
Mauro Carvalho Chehab [Fri, 12 May 2017 11:57:50 +0000 (08:57 -0300)]
docs-rst: convert s390-drivers DocBook to ReST

Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agolibata: fix identation on a kernel-doc markup
Mauro Carvalho Chehab [Fri, 12 May 2017 12:04:11 +0000 (09:04 -0300)]
libata: fix identation on a kernel-doc markup

Sphinx got confused with the markup identation:
./drivers/ata/libata-scsi.c:3402: ERROR: Unexpected indentation.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agolibata.rst: add c function and struct cross-references
Mauro Carvalho Chehab [Fri, 12 May 2017 11:53:33 +0000 (08:53 -0300)]
libata.rst: add c function and struct cross-references

Instead of just using text for functions and structs, use
the C domain tags, in order to allow cross-referencing with
the kernel-doc markups.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: convert libata book to ReST
Mauro Carvalho Chehab [Fri, 12 May 2017 11:14:47 +0000 (08:14 -0300)]
docs-rst: convert libata book to ReST

Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agofs: jbd2: escape a string with special chars on a kernel-doc
Mauro Carvalho Chehab [Fri, 12 May 2017 10:58:23 +0000 (07:58 -0300)]
fs: jbd2: escape a string with special chars on a kernel-doc

kernel-doc will try to interpret a foo() string, except if
properly escaped.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agofs: eventfd: fix identation on kernel-doc
Mauro Carvalho Chehab [Fri, 12 May 2017 10:53:50 +0000 (07:53 -0300)]
fs: eventfd: fix identation on kernel-doc

Sphinx require explicit tags in order to use a list of possible
values, otherwise it produces this error:

./fs/eventfd.c:219: WARNING: Option list ends without a blank line; unexpected unindent.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agofs: add a blank lines on some kernel-doc comments
Mauro Carvalho Chehab [Fri, 12 May 2017 10:45:42 +0000 (07:45 -0300)]
fs: add a blank lines on some kernel-doc comments

Sphinx gets confused when it finds identation without a
good reason for it and without a preceding blank line:

./fs/mpage.c:347: ERROR: Unexpected indentation.
./fs/namei.c:4303: ERROR: Unexpected indentation.
./fs/fs-writeback.c:2060: ERROR: Unexpected indentation.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: don't ignore internal functions for jbd2 docs
Mauro Carvalho Chehab [Fri, 12 May 2017 10:27:13 +0000 (07:27 -0300)]
docs-rst: don't ignore internal functions for jbd2 docs

Those functions are currently ignored, causing references at
the documentation to be lost. Don't ignore it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agofs: jbd2: make jbd2_journal_start() kernel-doc parseable
Mauro Carvalho Chehab [Fri, 12 May 2017 10:25:21 +0000 (07:25 -0300)]
fs: jbd2: make jbd2_journal_start() kernel-doc parseable

kernel-doc script expects that a function documentation to
be just before the function, otherwise it will be ignored.

So, move the kernel-doc markup to the right place.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: filesystems: use c domain references where needed
Mauro Carvalho Chehab [Fri, 12 May 2017 10:15:19 +0000 (07:15 -0300)]
docs-rst: filesystems: use c domain references where needed

Instead of just mention the function names, use cross-references
to the kernel-doc tags where pertinent.

While not all function documentation is included here, I
double-checked that all functions mentioned there still
exists.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: convert filesystems book to ReST
Mauro Carvalho Chehab [Fri, 12 May 2017 09:50:22 +0000 (06:50 -0300)]
docs-rst: convert filesystems book to ReST

Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: add userspace API book to pdf output
Mauro Carvalho Chehab [Fri, 12 May 2017 09:28:42 +0000 (06:28 -0300)]
docs-rst: add userspace API book to pdf output

The userspace API book was added without the bits required to
generate PDF output. Add them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: add sound book to pdf output
Mauro Carvalho Chehab [Fri, 12 May 2017 09:27:33 +0000 (06:27 -0300)]
docs-rst: add sound book to pdf output

The sound subsystem book was added without the bits required to
generate PDF output. Add them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: add dev-tools book to pdf output
Mauro Carvalho Chehab [Fri, 12 May 2017 09:21:09 +0000 (06:21 -0300)]
docs-rst: add dev-tools book to pdf output

The dev-tools API book was added without the bits required to
generate PDF output at the main conf.py. Add them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: add crypto API book to pdf output
Mauro Carvalho Chehab [Fri, 12 May 2017 09:14:08 +0000 (06:14 -0300)]
docs-rst: add crypto API book to pdf output

The crypto API book was added without the bits required to
generate PDF output. Add them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: conf.py: remove kernel-documentation from LaTeX
Mauro Carvalho Chehab [Fri, 12 May 2017 09:04:14 +0000 (06:04 -0300)]
docs-rst: conf.py: remove kernel-documentation from LaTeX

There's no kernel-documentation.rst file at Documentation/
anymore. So, remove it from the list of LaTeX-generated
documents.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: conf.py: sort LaTeX documents in alphabetical order
Mauro Carvalho Chehab [Fri, 12 May 2017 09:02:12 +0000 (06:02 -0300)]
docs-rst: conf.py: sort LaTeX documents in alphabetical order

As we add more documents, it makes more sense to sort the
entries there in alphabetical order, as it makes easier to
check if something is not there.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agoconf.py: define a color for important markup on PDF output
Mauro Carvalho Chehab [Thu, 11 May 2017 21:11:01 +0000 (18:11 -0300)]
conf.py: define a color for important markup on PDF output

As kdbg.rst uses the ".. important::" annotation, let's define a
color for PDF output.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agokgdb.rst: Adjust ReST markups
Mauro Carvalho Chehab [Thu, 11 May 2017 20:43:20 +0000 (17:43 -0300)]
kgdb.rst: Adjust ReST markups

The automatic conversion didn't work too well for this file.
It added weird html blocks inside it, and did some weird
things for literals. Manually fix it, in order to present
a nice display at html/pdf outputs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: convert kgdb DocBook to ReST
Mauro Carvalho Chehab [Thu, 11 May 2017 19:23:50 +0000 (16:23 -0300)]
docs-rst: convert kgdb DocBook to ReST

Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agolocking.rst: Update some ReST markups
Mauro Carvalho Chehab [Thu, 11 May 2017 19:15:16 +0000 (16:15 -0300)]
locking.rst: Update some ReST markups

Correct a few minor issues with ReST notation used on
this file (produced by an automatic tool).

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agolocking.rst: add captions to two tables
Mauro Carvalho Chehab [Thu, 11 May 2017 19:15:07 +0000 (16:15 -0300)]
locking.rst: add captions to two tables

Those tables have a "caption" at the end, but ReST
actually expects it on a different way.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agolocking.rst: reformat locking table
Mauro Carvalho Chehab [Thu, 11 May 2017 13:45:47 +0000 (10:45 -0300)]
locking.rst: reformat locking table

Use a different markup for this table, in order to make it
smaller when seeing in text mode.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomutex, futex: adjust kernel-doc markups to generate ReST
Mauro Carvalho Chehab [Thu, 11 May 2017 13:17:45 +0000 (10:17 -0300)]
mutex, futex: adjust kernel-doc markups to generate ReST

There are a few issues on some kernel-doc markups that was
causing troubles with kernel-doc output on ReST format:

./kernel/futex.c:492: WARNING: Inline emphasis start-string without end-string.
./kernel/futex.c:1264: WARNING: Block quote ends without a blank line; unexpected unindent.
./kernel/futex.c:1721: WARNING: Block quote ends without a blank line; unexpected unindent.
./kernel/futex.c:2338: WARNING: Block quote ends without a blank line; unexpected unindent.
./kernel/futex.c:2426: WARNING: Block quote ends without a blank line; unexpected unindent.
./kernel/futex.c:2899: WARNING: Block quote ends without a blank line; unexpected unindent.
./kernel/futex.c:2972: WARNING: Block quote ends without a blank line; unexpected unindent.

Fix them.

No functional changes.

Acked-by: Darren Hart (VMware) <dvhart@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: convert kernel-locking to ReST
Mauro Carvalho Chehab [Thu, 11 May 2017 12:55:30 +0000 (09:55 -0300)]
docs-rst: convert kernel-locking to ReST

Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

- Manually adjust tables with got broken by conversion

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agokernel-hacking: update document
Mauro Carvalho Chehab [Thu, 11 May 2017 12:41:52 +0000 (09:41 -0300)]
kernel-hacking: update document

This document is fairly updated. Yet, some stuff moved to
other kernel headers. So, update to point to the right
places.

While here, adjust some minor ReST markups.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agodocs-rst: convert kernel-hacking to ReST
Mauro Carvalho Chehab [Thu, 11 May 2017 11:03:27 +0000 (08:03 -0300)]
docs-rst: convert kernel-hacking to ReST

Use pandoc to convert documentation to ReST by calling
Documentation/sphinx/tmplcvt script.

- Manually adjusted to use ..note and ..warning
- Minor fixes for it to be parsed without errors
- Use **bold** for emphasis.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agoLinux 4.12-rc1
Linus Torvalds [Sat, 13 May 2017 20:19:49 +0000 (13:19 -0700)]
Linux 4.12-rc1

7 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Sat, 13 May 2017 17:25:05 +0000 (10:25 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull some more input subsystem updates from Dmitry Torokhov:
 "An updated xpad driver with a few more recognized device IDs, and a
  new psxpad-spi driver, allowing connecting Playstation 1 and 2 joypads
  via SPI bus"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: cros_ec_keyb - remove extraneous 'const'
  Input: add support for PlayStation 1/2 joypads connected via SPI
  Input: xpad - add USB IDs for Mad Catz Brawlstick and Razer Sabertooth
  Input: xpad - sync supported devices with xboxdrv
  Input: xpad - sort supported devices by USB ID

7 years agoMerge tag 'upstream-4.12-rc1' of git://git.infradead.org/linux-ubifs
Linus Torvalds [Sat, 13 May 2017 17:23:12 +0000 (10:23 -0700)]
Merge tag 'upstream-4.12-rc1' of git://git.infradead.org/linux-ubifs

Pull UBI/UBIFS updates from Richard Weinberger:

 - new config option CONFIG_UBIFS_FS_SECURITY

 - minor improvements

 - random fixes

* tag 'upstream-4.12-rc1' of git://git.infradead.org/linux-ubifs:
  ubi: Add debugfs file for tracking PEB state
  ubifs: Fix a typo in comment of ioctl2ubifs & ubifs2ioctl
  ubifs: Remove unnecessary assignment
  ubifs: Fix cut and paste error on sb type comparisons
  ubi: fastmap: Fix slab corruption
  ubifs: Add CONFIG_UBIFS_FS_SECURITY to disable/enable security labels
  ubi: Make mtd parameter readable
  ubi: Fix section mismatch

7 years agoMerge branch 'for-linus-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 13 May 2017 17:20:02 +0000 (10:20 -0700)]
Merge branch 'for-linus-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml

Pull UML fixes from Richard Weinberger:
 "No new stuff, just fixes"

* 'for-linus-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
  um: Add missing NR_CPUS include
  um: Fix to call read_initrd after init_bootmem
  um: Include kbuild.h instead of duplicating its macros
  um: Fix PTRACE_POKEUSER on x86_64
  um: Set number of CPUs
  um: Fix _print_addr()

7 years agoMerge branch 'akpm' (patches from Andrew)
Linus Torvalds [Sat, 13 May 2017 16:49:35 +0000 (09:49 -0700)]
Merge branch 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton:
 "15 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  mm, docs: update memory.stat description with workingset* entries
  mm: vmscan: scan until it finds eligible pages
  mm, thp: copying user pages must schedule on collapse
  dax: fix PMD data corruption when fault races with write
  dax: fix data corruption when fault races with write
  ext4: return to starting transaction in ext4_dax_huge_fault()
  mm: fix data corruption due to stale mmap reads
  dax: prevent invalidation of mapped DAX entries
  Tigran has moved
  mm, vmalloc: fix vmalloc users tracking properly
  mm/khugepaged: add missed tracepoint for collapse_huge_page_swapin
  gcov: support GCC 7.1
  mm, vmstat: Remove spurious WARN() during zoneinfo print
  time: delete current_fs_time()
  hwpoison, memcg: forcibly uncharge LRU pages

7 years agomm, docs: update memory.stat description with workingset* entries
Roman Gushchin [Fri, 12 May 2017 22:47:09 +0000 (15:47 -0700)]
mm, docs: update memory.stat description with workingset* entries

Commit 4b4cea91691d ("mm: vmscan: fix IO/refault regression in cache
workingset transition") introduced three new entries in memory stat
file:

 - workingset_refault
 - workingset_activate
 - workingset_nodereclaim

This commit adds a corresponding description to the cgroup v2 docs.

Link: http://lkml.kernel.org/r/1494530293-31236-1-git-send-email-guro@fb.com
Signed-off-by: Roman Gushchin <guro@fb.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agomm: vmscan: scan until it finds eligible pages
Minchan Kim [Fri, 12 May 2017 22:47:06 +0000 (15:47 -0700)]
mm: vmscan: scan until it finds eligible pages

Although there are a ton of free swap and anonymous LRU page in elgible
zones, OOM happened.

  balloon invoked oom-killer: gfp_mask=0x17080c0(GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_NOTRACK), nodemask=(null),  order=0, oom_score_adj=0
  CPU: 7 PID: 1138 Comm: balloon Not tainted 4.11.0-rc6-mm1-zram-00289-ge228d67e9677-dirty #17
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014
  Call Trace:
   oom_kill_process+0x21d/0x3f0
   out_of_memory+0xd8/0x390
   __alloc_pages_slowpath+0xbc1/0xc50
   __alloc_pages_nodemask+0x1a5/0x1c0
   pte_alloc_one+0x20/0x50
   __pte_alloc+0x1e/0x110
   __handle_mm_fault+0x919/0x960
   handle_mm_fault+0x77/0x120
   __do_page_fault+0x27a/0x550
   trace_do_page_fault+0x43/0x150
   do_async_page_fault+0x2c/0x90
   async_page_fault+0x28/0x30
  Mem-Info:
  active_anon:424716 inactive_anon:65314 isolated_anon:0
   active_file:52 inactive_file:46 isolated_file:0
   unevictable:0 dirty:27 writeback:0 unstable:0
   slab_reclaimable:3967 slab_unreclaimable:4125
   mapped:133 shmem:43 pagetables:1674 bounce:0
   free:4637 free_pcp:225 free_cma:0
  Node 0 active_anon:1698864kB inactive_anon:261256kB active_file:208kB inactive_file:184kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:532kB dirty:108kB writeback:0kB shmem:172kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no
  DMA free:7316kB min:32kB low:44kB high:56kB active_anon:8064kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15908kB mlocked:0kB slab_reclaimable:464kB slab_unreclaimable:40kB kernel_stack:0kB pagetables:24kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
  lowmem_reserve[]: 0 992 992 1952
  DMA32 free:9088kB min:2048kB low:3064kB high:4080kB active_anon:952176kB inactive_anon:0kB active_file:36kB inactive_file:0kB unevictable:0kB writepending:88kB present:1032192kB managed:1019388kB mlocked:0kB slab_reclaimable:13532kB slab_unreclaimable:16460kB kernel_stack:3552kB pagetables:6672kB bounce:0kB free_pcp:56kB local_pcp:24kB free_cma:0kB
  lowmem_reserve[]: 0 0 0 959
  Movable free:3644kB min:1980kB low:2960kB high:3940kB active_anon:738560kB inactive_anon:261340kB active_file:188kB inactive_file:640kB unevictable:0kB writepending:20kB present:1048444kB managed:1010816kB mlocked:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:832kB local_pcp:60kB free_cma:0kB
  lowmem_reserve[]: 0 0 0 0
  DMA: 1*4kB (E) 0*8kB 18*16kB (E) 10*32kB (E) 10*64kB (E) 9*128kB (ME) 8*256kB (E) 2*512kB (E) 2*1024kB (E) 0*2048kB 0*4096kB = 7524kB
  DMA32: 417*4kB (UMEH) 181*8kB (UMEH) 68*16kB (UMEH) 48*32kB (UMEH) 14*64kB (MH) 3*128kB (M) 1*256kB (H) 1*512kB (M) 2*1024kB (M) 0*2048kB 0*4096kB = 9836kB
  Movable: 1*4kB (M) 1*8kB (M) 1*16kB (M) 1*32kB (M) 0*64kB 1*128kB (M) 2*256kB (M) 4*512kB (M) 1*1024kB (M) 0*2048kB 0*4096kB = 3772kB
  378 total pagecache pages
  17 pages in swap cache
  Swap cache stats: add 17325, delete 17302, find 0/27
  Free swap  = 978940kB
  Total swap = 1048572kB
  524157 pages RAM
  0 pages HighMem/MovableOnly
  12629 pages reserved
  0 pages cma reserved
  0 pages hwpoisoned
  [ pid ]   uid  tgid total_vm      rss nr_ptes nr_pmds swapents oom_score_adj name
  [  433]     0   433     4904        5      14       3       82             0 upstart-udev-br
  [  438]     0   438    12371        5      27       3      191         -1000 systemd-udevd

With investigation, skipping page of isolate_lru_pages makes reclaim
void because it returns zero nr_taken easily so LRU shrinking is
effectively nothing and just increases priority aggressively.  Finally,
OOM happens.

The problem is that get_scan_count determines nr_to_scan with eligible
zones so although priority drops to zero, it couldn't reclaim any pages
if the LRU contains mostly ineligible pages.

get_scan_count:

        size = lruvec_lru_size(lruvec, lru, sc->reclaim_idx);
size = size >> sc->priority;

Assumes sc->priority is 0 and LRU list is as follows.

N-N-N-N-H-H-H-H-H-H-H-H-H-H-H-H-H-H-H-H

(Ie, small eligible pages are in the head of LRU but others are
 almost ineligible pages)

In that case, size becomes 4 so VM want to scan 4 pages but 4 pages from
tail of the LRU are not eligible pages.  If get_scan_count counts
skipped pages, it doesn't reclaim any pages remained after scanning 4
pages so it ends up OOM happening.

This patch makes isolate_lru_pages try to scan pages until it encounters
eligible zones's pages.

[akpm@linux-foundation.org: clean up mind-bending `for' statement.  Tweak comment text]
Fixes: 3db65812d688 ("Revert "mm, vmscan: account for skipped pages as a partial scan"")
Link: http://lkml.kernel.org/r/1494457232-27401-1-git-send-email-minchan@kernel.org
Signed-off-by: Minchan Kim <minchan@kernel.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agomm, thp: copying user pages must schedule on collapse
David Rientjes [Fri, 12 May 2017 22:47:03 +0000 (15:47 -0700)]
mm, thp: copying user pages must schedule on collapse

We have encountered need_resched warnings in __collapse_huge_page_copy()
while doing {clear,copy}_user_highpage() over HPAGE_PMD_NR source pages.

mm->mmap_sem is held for write, but the iteration is well bounded.

Reschedule as needed.

Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1705101426380.109808@chino.kir.corp.google.com
Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agodax: fix PMD data corruption when fault races with write
Ross Zwisler [Fri, 12 May 2017 22:47:00 +0000 (15:47 -0700)]
dax: fix PMD data corruption when fault races with write

This is based on a patch from Jan Kara that fixed the equivalent race in
the DAX PTE fault path.

Currently DAX PMD read fault can race with write(2) in the following
way:

CPU1 - write(2)                 CPU2 - read fault
                                dax_iomap_pmd_fault()
                                  ->iomap_begin() - sees hole

dax_iomap_rw()
  iomap_apply()
    ->iomap_begin - allocates blocks
    dax_iomap_actor()
      invalidate_inode_pages2_range()
        - there's nothing to invalidate

                                  grab_mapping_entry()
  - we add huge zero page to the radix tree
    and map it to page tables

The result is that hole page is mapped into page tables (and thus zeros
are seen in mmap) while file has data written in that place.

Fix the problem by locking exception entry before mapping blocks for the
fault.  That way we are sure invalidate_inode_pages2_range() call for
racing write will either block on entry lock waiting for the fault to
finish (and unmap stale page tables after that) or read fault will see
already allocated blocks by write(2).

Fixes: 9f141d6ef6258 ("dax: Call ->iomap_begin without entry lock during dax fault")
Link: http://lkml.kernel.org/r/20170510172700.18991-1-ross.zwisler@linux.intel.com
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agodax: fix data corruption when fault races with write
Jan Kara [Fri, 12 May 2017 22:46:57 +0000 (15:46 -0700)]
dax: fix data corruption when fault races with write

Currently DAX read fault can race with write(2) in the following way:

CPU1 - write(2) CPU2 - read fault
dax_iomap_pte_fault()
  ->iomap_begin() - sees hole
dax_iomap_rw()
  iomap_apply()
    ->iomap_begin - allocates blocks
    dax_iomap_actor()
      invalidate_inode_pages2_range()
        - there's nothing to invalidate
  grab_mapping_entry()
  - we add zero page in the radix tree
    and map it to page tables

The result is that hole page is mapped into page tables (and thus zeros
are seen in mmap) while file has data written in that place.

Fix the problem by locking exception entry before mapping blocks for the
fault.  That way we are sure invalidate_inode_pages2_range() call for
racing write will either block on entry lock waiting for the fault to
finish (and unmap stale page tables after that) or read fault will see
already allocated blocks by write(2).

Fixes: 9f141d6ef6258a3a37a045842d9ba7e68f368956
Link: http://lkml.kernel.org/r/20170510085419.27601-5-jack@suse.cz
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agoext4: return to starting transaction in ext4_dax_huge_fault()
Jan Kara [Fri, 12 May 2017 22:46:54 +0000 (15:46 -0700)]
ext4: return to starting transaction in ext4_dax_huge_fault()

DAX will return to locking exceptional entry before mapping blocks for a
page fault to fix possible races with concurrent writes.  To avoid lock
inversion between exceptional entry lock and transaction start, start
the transaction already in ext4_dax_huge_fault().

Fixes: 9f141d6ef6258a3a37a045842d9ba7e68f368956
Link: http://lkml.kernel.org/r/20170510085419.27601-4-jack@suse.cz
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agomm: fix data corruption due to stale mmap reads
Jan Kara [Fri, 12 May 2017 22:46:50 +0000 (15:46 -0700)]
mm: fix data corruption due to stale mmap reads

Currently, we didn't invalidate page tables during invalidate_inode_pages2()
for DAX.  That could result in e.g. 2MiB zero page being mapped into
page tables while there were already underlying blocks allocated and
thus data seen through mmap were different from data seen by read(2).
The following sequence reproduces the problem:

 - open an mmap over a 2MiB hole

 - read from a 2MiB hole, faulting in a 2MiB zero page

 - write to the hole with write(3p). The write succeeds but we
   incorrectly leave the 2MiB zero page mapping intact.

 - via the mmap, read the data that was just written. Since the zero
   page mapping is still intact we read back zeroes instead of the new
   data.

Fix the problem by unconditionally calling invalidate_inode_pages2_range()
in dax_iomap_actor() for new block allocations and by properly
invalidating page tables in invalidate_inode_pages2_range() for DAX
mappings.

Fixes: c6dcf52c23d2d3fb5235cec42d7dd3f786b87d55
Link: http://lkml.kernel.org/r/20170510085419.27601-3-jack@suse.cz
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agodax: prevent invalidation of mapped DAX entries
Ross Zwisler [Fri, 12 May 2017 22:46:47 +0000 (15:46 -0700)]
dax: prevent invalidation of mapped DAX entries

Patch series "mm,dax: Fix data corruption due to mmap inconsistency",
v4.

This series fixes data corruption that can happen for DAX mounts when
page faults race with write(2) and as a result page tables get out of
sync with block mappings in the filesystem and thus data seen through
mmap is different from data seen through read(2).

The series passes testing with t_mmap_stale test program from Ross and
also other mmap related tests on DAX filesystem.

This patch (of 4):

dax_invalidate_mapping_entry() currently removes DAX exceptional entries
only if they are clean and unlocked.  This is done via:

  invalidate_mapping_pages()
    invalidate_exceptional_entry()
      dax_invalidate_mapping_entry()

However, for page cache pages removed in invalidate_mapping_pages()
there is an additional criteria which is that the page must not be
mapped.  This is noted in the comments above invalidate_mapping_pages()
and is checked in invalidate_inode_page().

For DAX entries this means that we can can end up in a situation where a
DAX exceptional entry, either a huge zero page or a regular DAX entry,
could end up mapped but without an associated radix tree entry.  This is
inconsistent with the rest of the DAX code and with what happens in the
page cache case.

We aren't able to unmap the DAX exceptional entry because according to
its comments invalidate_mapping_pages() isn't allowed to block, and
unmap_mapping_range() takes a write lock on the mapping->i_mmap_rwsem.

Since we essentially never have unmapped DAX entries to evict from the
radix tree, just remove dax_invalidate_mapping_entry().

Fixes: c6dcf52c23d2 ("mm: Invalidate DAX radix tree entries only if appropriate")
Link: http://lkml.kernel.org/r/20170510085419.27601-2-jack@suse.cz
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Reported-by: Jan Kara <jack@suse.cz>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: <stable@vger.kernel.org> [4.10+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>