The content is parsed directly (see also this) from the source .c files1:
In order to provide embedded, 'C' friendly, easy to maintain, but
consistent and extractable documentation of the functions and data
structures in the Linux kernel, the Linux kernel has adopted a
consistent style for documenting functions and their parameters, and
structures and their members.
The format for this documentation is called the kernel-doc format. It
is documented in this Documentation/kernel-doc-nano-HOWTO.txt file.
This style embeds the documentation within the source files, using a
few simple conventions. The scripts/kernel-doc perl script, some SGML
templates in Documentation/DocBook, and other tools understand these
conventions, and are used to extract this embedded documentation into
The opening comment mark "/**" is reserved for kernel-doc comments.
Only comments so marked will be considered by the kernel-doc scripts,
and any comment so marked must be in kernel-doc format.
Which means only such formatted comments can be extracted this way and that you could leverage the
kernel-doc Perl script used by the
kernel-doc [ -docbook | -html | -html5 | -text | -man | -list ]
[ -no-doc-sections ]
[ -function funcname [ -function funcname ...] ]
c file(s)s > outputfile
and therefore that you are not limited to the mandocs target:
After installation, "make psdocs", "make pdfdocs", "make htmldocs", or
"make mandocs" will render the documentation in the requested format.
There are also driver specific text files in the kernel repository/source. More generally, their Linux man-pages project (man1 through man8) is available for download. On a last note kernel.org also maintains some output documentation.
1. The kernel is not the only case where such a technique is used to generate manpages. GNU coreutils is one such other case; most of its manpages are generated using the output of
command --help the content of which is in the usage function the utility source file ( 1 2 ).