Documentation: livepatch: Add livepatch API page
authorDavid Vernet <void@manifault.com>
Tue, 21 Dec 2021 14:57:45 +0000 (06:57 -0800)
committerPetr Mladek <pmladek@suse.com>
Thu, 23 Dec 2021 10:35:53 +0000 (11:35 +0100)
commite368cd72880360ffe9b298349ae96286dd121499
tree1038b28d1eb4fee9ce464f18af70cdf584785b8f
parent50ddcdb2635c82e195a2557341d759c5b9419bf1
Documentation: livepatch: Add livepatch API page

The livepatch subsystem has several exported functions and objects with
kerneldoc comments. Though the livepatch documentation contains handwritten
descriptions of all of these exported functions, they are currently not
pulled into the docs build using the kernel-doc directive.

In order to allow readers of the documentation to see the full kerneldoc
comments in the generated documentation files, this change adds a new
Documentation/livepatch/api.rst page which contains kernel-doc directives
to link the kerneldoc comments directly in the documentation.  With this,
all of the hand-written descriptions of the APIs now cross-reference the
kerneldoc comments on the new Livepatching APIs page, and running
./scripts/find-unused-docs.sh on kernel/livepatch no longer shows any files
as missing documentation.

Note that all of the handwritten API descriptions were left alone with the
exception of Documentation/livepatch/system-state.rst, which was updated to
allow the cross-referencing to work correctly. The file now follows the
cross-referencing formatting guidance specified in
Documentation/doc-guide/kernel-doc.rst. Furthermore, some comments around
klp_shadow_free_all() were updated to say <_, id> rather than <*, id> to
match the rest of the file, and to prevent the docs build from emitting an
"Inline emphasis start-string without end string" error.

Signed-off-by: David Vernet <void@manifault.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20211221145743.4098360-1-void@manifault.com
Documentation/livepatch/api.rst [new file with mode: 0644]
Documentation/livepatch/index.rst
Documentation/livepatch/shadow-vars.rst
Documentation/livepatch/system-state.rst
kernel/livepatch/shadow.c