<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/kernel-doc, branch v6.15.2</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.15.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.15.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2025-03-04T16:47:42Z</updated>
<entry>
<title>scripts/kernel-doc: drop dead code for Wcontents_before_sections</title>
<updated>2025-03-04T16:47:42Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2025-02-24T09:08:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=19b100b0116d703b9529f7bbbf797428de51816a'/>
<id>urn:sha1:19b100b0116d703b9529f7bbbf797428de51816a</id>
<content type='text'>
There is a warning about contents before sections, which doesn't
work, since in_doc_sect variable is always true at the point
it is checked.

Drop the dead code.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Link: https://lore.kernel.org/r/174a15607fd057c736dc9123c53d0835ce20e68b.1740387599.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts/kernel-doc: don't add not needed new lines</title>
<updated>2025-03-04T16:47:40Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2025-02-24T09:08:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b9609ecba35ecf7fa85d9bcd519242009174e6a2'/>
<id>urn:sha1:b9609ecba35ecf7fa85d9bcd519242009174e6a2</id>
<content type='text'>
This helps comparing kernel-doc output with the new .py version
of it.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Link: https://lore.kernel.org/r/6b036ef7d746f26d7d0044626b04d1f0880a2188.1740387599.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts/kernel-doc: drop Sphinx version check</title>
<updated>2025-02-13T18:33:33Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2025-02-11T06:19:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=089e06c3f113a8641a6cf502a34284a7c0ca1630'/>
<id>urn:sha1:089e06c3f113a8641a6cf502a34284a7c0ca1630</id>
<content type='text'>
As the current minimal supported Sphinx version is 3.4.3, drop
support for older versions.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Reviewed-by: Kees Cook &lt;kees@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/0d002e7550476a68547ee53ad06cfd8fdcaf7c3a.1739254187.git.mchehab+huawei@kernel.org
</content>
</entry>
<entry>
<title>scripts/kernel-doc: remove an obscure logic from kernel-doc</title>
<updated>2025-02-13T16:44:24Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2025-02-12T06:02:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ba561b485709b6160e56d1fe32a2717fffb332cc'/>
<id>urn:sha1:ba561b485709b6160e56d1fe32a2717fffb332cc</id>
<content type='text'>
Kernel-doc has an obscure logic that uses an external file
to map files via a .tmp_filelist.txt file stored at the current
directory. The rationale for such code predates git time,
as it was added on Kernel v2.4.5.5, with the following description:

	# 26/05/2001 -         Support for separate source and object trees.
	#              Return error code.
	#              Keith Owens &lt;kaos@ocs.com.au&gt;

from commit 396a6123577d ("v2.4.5.4 -&gt; v2.4.5.5") at the historic
tree:
	https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/

Support for separate source and object trees is now done on a different
way via make O=&lt;object&gt;.

There's no logic to create such file, so it sounds to me that this is
just dead code.

So, drop it.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Link: https://lore.kernel.org/r/fd3b28dec36ba1668325d6770d4c4754414337fc.1739340170.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts/kernel-doc: fix identifier parsing regex</title>
<updated>2024-12-30T18:15:10Z</updated>
<author>
<name>Vegard Nossum</name>
<email>vegard.nossum@oracle.com</email>
</author>
<published>2024-12-21T22:22:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=da3ecf00ffc7b169b9a31a1218bbb52aa19d8df7'/>
<id>urn:sha1:da3ecf00ffc7b169b9a31a1218bbb52aa19d8df7</id>
<content type='text'>
John wrote:

&gt; kernel-doc gets confused by code like the following:
&gt;
&gt; /**
&gt;  * define HOMA_MIN_DEFAULT_PORT - The 16-bit port space is divided into
&gt;  * two nonoverlapping regions. Ports 1-32767 are reserved exclusively
&gt;  * for well-defined server ports. The remaining ports are used for client
&gt;  * ports; these are allocated automatically by Homa. Port 0 is reserved.
&gt;  */
&gt; #define HOMA_MIN_DEFAULT_PORT 0x8000
&gt;
&gt; It seems to use the last "-" on the line (the one in "16-bit") rather
&gt; than the first one, so it produces the following false error message:
&gt;
&gt; homa.h:50: warning: expecting prototype for HOMA_MIN_DEFAULT_PORT -
&gt; The 16(). Prototype was for HOMA_MIN_DEFAULT_PORT() instead
&gt;
&gt; There are similar problems if there is a ":" later on the line.

The problem is the regex for the identifier, which is a greedy /.*/ that
matches everything up to the last - or : (i.e. $decl_end). Fix it by
tightening up this regex and not matching those characters as part of the
identifier.

Link: https://lore.kernel.org/all/CAGXJAmzfRzE=A94NT5ETtj3bZc-=2oLg-9E5Kjh4o_-iuw1q8g@mail.gmail.com/
Reported-by: John Ousterhout &lt;ouster@cs.stanford.edu&gt;
Reviewed-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/20241221222214.1969823-1-vegard.nossum@oracle.com
</content>
</entry>
<entry>
<title>scripts/kernel-doc: Get -export option working again</title>
<updated>2024-12-11T16:15:26Z</updated>
<author>
<name>Akira Yokosawa</name>
<email>akiyks@gmail.com</email>
</author>
<published>2024-12-10T11:04:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d9339496729f1471b8dc326face17c4cf108b027'/>
<id>urn:sha1:d9339496729f1471b8dc326face17c4cf108b027</id>
<content type='text'>
Since commit cdd30ebb1b9f ("module: Convert symbol namespace to string
literal"), exported symbols marked by EXPORT_SYMBOL_NS(_GPL) are
ignored by "kernel-doc -export" in fresh build of "make htmldocs".

This is because regex in the perl script for those markers fails to
match the new signatures:

  - EXPORT_SYMBOL_NS(symbol, "ns");
  - EXPORT_SYMBOL_NS_GPL(symbol, "ns");

Update the regex so that it matches quoted string.

Note: Escape sequence of \w is good for C identifiers, but can be
too strict for quoted strings.  Instead, use \S, which matches any
non-whitespace character, for compatibility with possible extension
of namespace convention in the future [1].

Fixes: cdd30ebb1b9f ("module: Convert symbol namespace to string literal")
Link: https://lore.kernel.org/CAK7LNATMufXP0EA6QUE9hBkZMa6vJO6ZiaYuak2AhOrd2nSVKQ@mail.gmail.com/ [1]
Signed-off-by: Akira Yokosawa &lt;akiyks@gmail.com&gt;
Cc: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/e5c43f36-45cd-49f4-b7b8-ff342df3c7a4@gmail.com
</content>
</entry>
<entry>
<title>kernel-doc: allow object-like macros in ReST output</title>
<updated>2024-10-17T15:33:29Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2024-10-15T18:11:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bb8fd09e2811e2386bb40b9f0d3c7dd6e7961a1e'/>
<id>urn:sha1:bb8fd09e2811e2386bb40b9f0d3c7dd6e7961a1e</id>
<content type='text'>
output_function_rst() does not handle object-like macros. It presents
a trailing "()" while output_function_man() handles these macros
correctly.

Update output_function_rst() to handle object-like macros.
Don't show the "Parameters" heading if there are no parameters.

For output_function_man(), don't show the "ARGUMENTS" heading if there
are no parameters.

I have tested this quite a bit with my ad hoc test files for both ReST
and man format outputs. The generated output looks good.

Fixes: cbb4d3e6510b ("scripts/kernel-doc: handle object-like macros")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Horia Geanta &lt;horia.geanta@freescale.com&gt;
Tested-by: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/20241015181107.536894-1-rdunlap@infradead.org
</content>
</entry>
<entry>
<title>scripts/kernel-doc: Do not track section counter across processed files</title>
<updated>2024-10-14T16:19:22Z</updated>
<author>
<name>Chen-Yu Tsai</name>
<email>wenst@chromium.org</email>
</author>
<published>2024-10-08T08:29:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=be9264110e4e874622d588a75daf930539fdf6ea'/>
<id>urn:sha1:be9264110e4e874622d588a75daf930539fdf6ea</id>
<content type='text'>
The section counter tracks how many sections of kernel-doc were added.
The only real use of the counter value is to check if anything was
actually supposed to be output and give a warning is nothing is
available.

The current logic of remembering the initial value and then resetting
the value then when processing each file means that if a file has the
same number of sections as the previously processed one, a warning is
incorrectly given.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Chen-Yu Tsai &lt;wenst@chromium.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/20241008082905.4005524-1-wenst@chromium.org
</content>
</entry>
<entry>
<title>scripts/kernel-doc: Fix build time warnings</title>
<updated>2024-10-14T15:51:38Z</updated>
<author>
<name>André Almeida</name>
<email>andrealmeid@igalia.com</email>
</author>
<published>2024-10-10T22:59:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=82f5ee35d0b960c54370a72418b9ec0dca382262'/>
<id>urn:sha1:82f5ee35d0b960c54370a72418b9ec0dca382262</id>
<content type='text'>
As stated at Documentation/kbuild/llvm.rst, to make usage of ccache one
must set KBUILD_BUILD_TIMESTAMP=''. Setting this together with W=1
will trigger the following warning for every compiled file:

  date: invalid date ‘+%s’

This comes from kernel-doc script, that produces the following command
when KBUILD_BUILD_TIMESTAMP is empty:

  date -d"" +%s

That triggers the warning above. Add a space between the flag `-d` and
the string argument to fix date command and remove the warning.

Signed-off-by: André Almeida &lt;andrealmeid@igalia.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/20241010225933.166436-1-andrealmeid@igalia.com
</content>
</entry>
<entry>
<title>mm/slab: Plumb kmem_buckets into __do_kmalloc_node()</title>
<updated>2024-07-03T10:24:19Z</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2024-07-01T19:12:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=67f2df3b82d091ed095d0e47e1f3a9d3e18e4e41'/>
<id>urn:sha1:67f2df3b82d091ed095d0e47e1f3a9d3e18e4e41</id>
<content type='text'>
Introduce CONFIG_SLAB_BUCKETS which provides the infrastructure to
support separated kmalloc buckets (in the following kmem_buckets_create()
patches and future codetag-based separation). Since this will provide
a mitigation for a very common case of exploits, it is recommended to
enable this feature for general purpose distros. By default, the new
Kconfig will be enabled if CONFIG_SLAB_FREELIST_HARDENED is enabled (and
it is added to the hardening.config Kconfig fragment).

To be able to choose which buckets to allocate from, make the buckets
available to the internal kmalloc interfaces by adding them as the
second argument, rather than depending on the buckets being chosen from
the fixed set of global buckets. Where the bucket is not available,
pass NULL, which means "use the default system kmalloc bucket set"
(the prior existing behavior), as implemented in kmalloc_slab().

To avoid adding the extra argument when !CONFIG_SLAB_BUCKETS, only the
top-level macros and static inlines use the buckets argument (where
they are stripped out and compiled out respectively). The actual extern
functions can then be built without the argument, and the internals
fall back to the global kmalloc buckets unconditionally.

Co-developed-by: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
Signed-off-by: Vlastimil Babka &lt;vbabka@suse.cz&gt;
</content>
</entry>
</feed>
