lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211209165303.3205464-1-void@manifault.com>
Date:   Thu,  9 Dec 2021 08:53:04 -0800
From:   David Vernet <void@...ifault.com>
To:     pmladek@...e.com, linux-doc@...r.kernel.org,
        live-patching@...r.kernel.org, linux-kernel@...r.kernel.org,
        jpoimboe@...hat.com, jikos@...nel.org, mbenes@...e.cz,
        joe.lawrence@...hat.com, corbet@....net
Cc:     void@...ifault.com, yhs@...com, songliubraving@...com
Subject: [PATCH] Documentation: livepatch: Add kernel-doc link to klp_enable_patch

The `klp_enable_patch()` function is the main entrypoint to the livepatch
subsystem, and is invoked by a KLP module from the module_init callback
when it is ready to be enabled.  The livepatch documentation specifies that
`klp_enable_patch()` should be invoked from the `module_init()` callback,
but does not actually link the user to the function's kerneldoc comment.

This simple change therefore adds a kernel-doc directive to link the
`klp_enable_patch()` function's kerneldoc comment in the livepatch
documentation page. With this, kernel/livepatch/core.c no longer comes up
as a file containing an unused doc with
`scripts/find-unused-docs.sh kernel/livepatch`

Signed-off-by: David Vernet <void@...ifault.com>
---
 Documentation/livepatch/livepatch.rst | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/Documentation/livepatch/livepatch.rst b/Documentation/livepatch/livepatch.rst
index 68e3651e8af9..4fa9e4ebcc3a 100644
--- a/Documentation/livepatch/livepatch.rst
+++ b/Documentation/livepatch/livepatch.rst
@@ -312,8 +312,15 @@ the patch cannot get enabled.
 -------------
 
 The livepatch gets enabled by calling klp_enable_patch() from
-the module_init() callback. The system will start using the new
-implementation of the patched functions at this stage.
+the module_init() callback:
+
+.. kernel-doc:: kernel/livepatch/core.c
+   :functions: klp_enable_patch
+
+----
+
+The system will start using the new implementation of the patched functions at
+this stage.
 
 First, the addresses of the patched functions are found according to their
 names. The special relocations, mentioned in the section "New functions",
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ