Skip to contentSkip to conversation

dns_resolver docs formatting cleanup

PATCH Superseded Bagas Sanjaya 3 participants 10 messages Sep 22, 2025 – Sep 25, 2025

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover dns_resolver docs formatting cleanup

Hi,

Here are reST cleanups for DNS Resolver Module documentation. The shortlog below should be self-explanatory.

Enjoy!

Bagas Sanjaya (3):
net: dns_resolver: Use reST bullet list for features list
net: dns_resolver: Move dns_query() explanation out of code block
net: dns_resolver: Fix request-key cross-reference

 Documentation/networking/dns_resolver.rst | 53 +++++++++++------------
 1 file changed, 26 insertions(+), 27 deletions(-)

base-commit: 312e6f7676e63bbb9b81e5c68e580a9f776cc6f0

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#1 lore raw

PATCH 1/3 net: dns_resolver: Use reST bullet list for features list

Features overview list uses an asterisk in parentheses (``(*)``) as bullet list marker, which isn't supported by Sphinx as proper bullet. Replace it with just asterisk.

---
 Documentation/networking/dns_resolver.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/networking/dns_resolver.rst +2 -2
index c0364f7070af84..5cec37bedf9950 100644
@@ -25,11 +25,11 @@ These routines must be supported by userspace tools dns.upcall, cifs.upcall and
 request-key.  It is under development and does not yet provide the full feature
 set.  The features it does support include:
 
- (*) Implements the dns_resolver key_type to contact userspace.
+ * Implements the dns_resolver key_type to contact userspace.
 
 It does not yet support the following AFS features:
 
- (*) Dns query support for AFSDB resource record.
+ * DNS query support for AFSDB resource record.
 
 This code is extracted from the CIFS filesystem.
 
Signature · 1 line
An old man doll... just what I always wanted! - Clara
reviewer Reviewed-by on v1 1/3
#2 lore raw

Re: [PATCH net-next 1/3] net: dns_resolver: Use reST bullet list for features list

Quoted 5 lines · Bagas Sanjaya

Features overview list uses an asterisk in parentheses (``(*)``) as bullet list marker, which isn't supported by Sphinx as proper bullet. Replace it with just asterisk.

Thanks,

I visually inspected the html output in a browser and confirmed that before '(*)' was rendered, and now a bullet is.

#3 lore raw

PATCH 2/3 net: dns_resolver: Move dns_query() explanation out of code block

In reply to Bagas Sanjaya

Documentation for dns_query() is placed in the function's literal code block snippet instead. Move it out of there.

Fixes 9dfe1361261b ("docs: networking: convert dns_resolver.txt to ReST")
---
 Documentation/networking/dns_resolver.rst | 45 +++++++++++------------
 1 file changed, 22 insertions(+), 23 deletions(-)
Documentation/networking/dns_resolver.rst +22 -23
index 5cec37bedf9950..329fb21d005ccd 100644
@@ -64,44 +64,43 @@ before the more general line given above as the first match is the one taken::
 Usage
 =====
 
-To make use of this facility, one of the following functions that are
-implemented in the module can be called after doing::
+To make use of this facility, the appropriate header must be included first::
 
 	#include <linux/dns_resolver.h>
 
-     ::
+Then you can make queries by calling::
 
 	int dns_query(const char *type, const char *name, size_t namelen,
 		     const char *options, char **_result, time_t *_expiry);
 
-     This is the basic access function.  It looks for a cached DNS query and if
-     it doesn't find it, it upcalls to userspace to make a new DNS query, which
-     may then be cached.  The key description is constructed as a string of the
-     form::
+This is the basic access function.  It looks for a cached DNS query and if
+it doesn't find it, it upcalls to userspace to make a new DNS query, which
+may then be cached.  The key description is constructed as a string of the
+form::
 
 		[<type>:]<name>
 
-     where <type> optionally specifies the particular upcall program to invoke,
-     and thus the type of query to do, and <name> specifies the string to be
-     looked up.  The default query type is a straight hostname to IP address
-     set lookup.
+where <type> optionally specifies the particular upcall program to invoke,
+and thus the type of query to do, and <name> specifies the string to be
+looked up.  The default query type is a straight hostname to IP address
+set lookup.
 
-     The name parameter is not required to be a NUL-terminated string, and its
-     length should be given by the namelen argument.
+The name parameter is not required to be a NUL-terminated string, and its
+length should be given by the namelen argument.
 
-     The options parameter may be NULL or it may be a set of options
-     appropriate to the query type.
+The options parameter may be NULL or it may be a set of options
+appropriate to the query type.
 
-     The return value is a string appropriate to the query type.  For instance,
-     for the default query type it is just a list of comma-separated IPv4 and
-     IPv6 addresses.  The caller must free the result.
+The return value is a string appropriate to the query type.  For instance,
+for the default query type it is just a list of comma-separated IPv4 and
+IPv6 addresses.  The caller must free the result.
 
-     The length of the result string is returned on success, and a negative
-     error code is returned otherwise.  -EKEYREJECTED will be returned if the
-     DNS lookup failed.
+The length of the result string is returned on success, and a negative
+error code is returned otherwise.  -EKEYREJECTED will be returned if the
+DNS lookup failed.
 
-     If _expiry is non-NULL, the expiry time (TTL) of the result will be
-     returned also.
+If _expiry is non-NULL, the expiry time (TTL) of the result will be
+returned also.
 
 The kernel maintains an internal keyring in which it caches looked up keys.
 This can be cleared by any process that has the CAP_SYS_ADMIN capability by
Signature · 1 line
An old man doll... just what I always wanted! - Clara
reviewer
#4 lore raw

Re: [PATCH net-next 2/3] net: dns_resolver: Move dns_query() explanation out of code block

Quoted 5 lines · Bagas Sanjaya

Documentation for dns_query() is placed in the function's literal code block snippet instead. Move it out of there.

Fixes 9dfe1361261b ("docs: networking: convert dns_resolver.txt to ReST")

Thanks, this renders much better. In a browser at least.

I've added a few comments below.

Quoted 9 lines
---
 Documentation/networking/dns_resolver.rst | 45 +++++++++++------------
 1 file changed, 22 insertions(+), 23 deletions(-)
Documentation/networking/dns_resolver.rst +0 -0
index 5cec37bedf9950..329fb21d005ccd 100644

Documentation/networking/dns_resolver.rst before the more general line given above as the first match is the one taken:: · line 67

Quoted 6 lines
Documentation/networking/dns_resolver.rst +1 -2
@@ -64,44 +64,43 @@ before the more general line given above as the first match is the one taken::
 Usage
 =====
 
-To make use of this facility, one of the following functions that are
-implemented in the module can be called after doing::
+To make use of this facility, the appropriate header must be included first::

Maybe: ..., first linux/dns_resolver.h must be included.

Documentation/networking/dns_resolver.rst before the more general line given above as the first match is the one taken:: · line 71

Quoted 5 lines
Documentation/networking/dns_resolver.rst +1 -1
 	#include <linux/dns_resolver.h>
 
-     ::
+Then you can make queries by calling::

Please use imperative mood:

Then queries may be made by calling::

Quoted 11 lines
Documentation/networking/dns_resolver.rst +3 -4
 	int dns_query(const char *type, const char *name, size_t namelen,
 		     const char *options, char **_result, time_t *_expiry);
 
-     This is the basic access function.  It looks for a cached DNS query and if
-     it doesn't find it, it upcalls to userspace to make a new DNS query, which
-     may then be cached.  The key description is constructed as a string of the
-     form::
+This is the basic access function.  It looks for a cached DNS query and if
+it doesn't find it, it upcalls to userspace to make a new DNS query, which
+may then be cached.  The key description is constructed as a string of the

Documentation/networking/dns_resolver.rst before the more general line given above as the first match is the one taken:: · line 84

Quoted 10 lines
Documentation/networking/dns_resolver.rst +3 -4
+form::
 
 		[<type>:]<name>
 
-     where <type> optionally specifies the particular upcall program to invoke,
-     and thus the type of query to do, and <name> specifies the string to be
-     looked up.  The default query type is a straight hostname to IP address
-     set lookup.
+where <type> optionally specifies the particular upcall program to invoke,
+and thus the type of query to do, and <name> specifies the string to be

I think while we are here "to do" could be removed. But maybe that's just me.

Quoted 2 lines
Documentation/networking/dns_resolver.rst +2 -0
+looked up.  The default query type is a straight hostname to IP address
+set lookup.

...

#5 lore raw

Re: [PATCH net-next 2/3] net: dns_resolver: Move dns_query() explanation out of code block

Quoted 64 lines · Simon Horman
Quoted 5 lines · Bagas Sanjaya

Documentation for dns_query() is placed in the function's literal code block snippet instead. Move it out of there.

Fixes 9dfe1361261b ("docs: networking: convert dns_resolver.txt to ReST")

Thanks, this renders much better. In a browser at least.

I've added a few comments below.

Quoted 9 lines
---
 Documentation/networking/dns_resolver.rst | 45 +++++++++++------------
 1 file changed, 22 insertions(+), 23 deletions(-)
Documentation/networking/dns_resolver.rst +0 -0
index 5cec37bedf9950..329fb21d005ccd 100644

Documentation/networking/dns_resolver.rst before the more general line given above as the first match is the one taken:: · line 67

Quoted 6 lines
Documentation/networking/dns_resolver.rst +1 -2
@@ -64,44 +64,43 @@ before the more general line given above as the first match is the one taken::
 Usage
 =====
 
-To make use of this facility, one of the following functions that are
-implemented in the module can be called after doing::
+To make use of this facility, the appropriate header must be included first::

Maybe: ..., first linux/dns_resolver.h must be included.

Documentation/networking/dns_resolver.rst before the more general line given above as the first match is the one taken:: · line 71

Quoted 5 lines
Documentation/networking/dns_resolver.rst +1 -1
 	#include <linux/dns_resolver.h>
 
-     ::
+Then you can make queries by calling::

Please use imperative mood:

Then queries may be made by calling::

Quoted 11 lines
Documentation/networking/dns_resolver.rst +3 -4
 	int dns_query(const char *type, const char *name, size_t namelen,
 		     const char *options, char **_result, time_t *_expiry);
 
-     This is the basic access function.  It looks for a cached DNS query and if
-     it doesn't find it, it upcalls to userspace to make a new DNS query, which
-     may then be cached.  The key description is constructed as a string of the
-     form::
+This is the basic access function.  It looks for a cached DNS query and if
+it doesn't find it, it upcalls to userspace to make a new DNS query, which
+may then be cached.  The key description is constructed as a string of the

Documentation/networking/dns_resolver.rst before the more general line given above as the first match is the one taken:: · line 84

Quoted 10 lines
Documentation/networking/dns_resolver.rst +3 -4
+form::
 
 		[<type>:]<name>
 
-     where <type> optionally specifies the particular upcall program to invoke,
-     and thus the type of query to do, and <name> specifies the string to be
-     looked up.  The default query type is a straight hostname to IP address
-     set lookup.
+where <type> optionally specifies the particular upcall program to invoke,
+and thus the type of query to do, and <name> specifies the string to be

I think while we are here "to do" could be removed. But maybe that's just me.

Quoted 4 lines
Quoted 2 lines
Documentation/networking/dns_resolver.rst +2 -0
+looked up.  The default query type is a straight hostname to IP address
+set lookup.

...

Thanks for the wording suggestions! I'll apply them in v2.

Signature · 1 line
An old man doll... just what I always wanted! - Clara
reviewer
#6 lore raw

Re: [PATCH net-next 2/3] net: dns_resolver: Move dns_query() explanation out of code block

In reply to Simon Horman

Hi,

Quoted 30 lines · Simon Horman
Quoted 5 lines · Bagas Sanjaya

Documentation for dns_query() is placed in the function's literal code block snippet instead. Move it out of there.

Fixes 9dfe1361261b ("docs: networking: convert dns_resolver.txt to ReST")

Thanks, this renders much better. In a browser at least.Hi

I've added a few comments below.

Quoted 9 lines
---
  Documentation/networking/dns_resolver.rst | 45 +++++++++++------------
  1 file changed, 22 insertions(+), 23 deletions(-)
Documentation/networking/dns_resolver.rst +0 -0
index 5cec37bedf9950..329fb21d005ccd 100644

Documentation/networking/dns_resolver.rst before the more general line given above as the first match is the one taken:: · line 67

Quoted 6 lines
Documentation/networking/dns_resolver.rst +1 -2
@@ -64,44 +64,43 @@ before the more general line given above as the first match is the one taken::
  Usage
  =====
 
-To make use of this facility, one of the following functions that are
-implemented in the module can be called after doing::
+To make use of this facility, the appropriate header must be included first::

Maybe: ..., first linux/dns_resolver.h must be included.

Quoted 1 line
Quoted 9 lines

Documentation/networking/dns_resolver.rst before the more general line given above as the first match is the one taken:: · line 71

Quoted 4 lines
  	#include <linux/dns_resolver.h>
Documentation/networking/dns_resolver.rst +1 -1
-     ::
+Then you can make queries by calling::

Please use imperative mood:

Then queries may be made by calling::

I think imperative mood would be more like:

Then make queries by calling::

but I'm not asking for a v3 patch.

Signature · 1 line
~Randy
reviewer
#7 lore raw

Re: [PATCH net-next 2/3] net: dns_resolver: Move dns_query() explanation out of code block

Quoted 4 lines · Randy Dunlap

Hi,

Quoted 1 line · Simon Horman

On Mon, Sep 22, 2025 at 04:56:47PM +0700, Bagas Sanjaya wrote:

...

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

+Then you can make queries by calling::

Please use imperative mood:

Quoted 8 lines
Quoted 2 lines

Then queries may be made by calling::

I think imperative mood would be more like:

Then make queries by calling::

but I'm not asking for a v3 patch.

Thanks Randy,

Sorry for my incorrect advice.

I also agree that a v3 isn't necessary just for this.

#8 lore raw

PATCH 3/3 net: dns_resolver: Fix request-key cross-reference

In reply to Bagas Sanjaya

Link to "Key Request Service" docs uses file:// scheme instead due to angled brackets markup. Fix it to proper cross-reference.

Fixes 3db38ed76890 ("doc: ReSTify keys-request-key.txt")
---
 Documentation/networking/dns_resolver.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/networking/dns_resolver.rst +2 -2
index 329fb21d005ccd..18c2af83d5129c 100644
@@ -141,8 +141,8 @@ the key will be discarded and recreated when the data it holds has expired.
 dns_query() returns a copy of the value attached to the key, or an error if
 that is indicated instead.
 
-See <file:Documentation/security/keys/request-key.rst> for further
-information about request-key function.
+See Documentation/security/keys/request-key.rst for further information about
+request-key function.
 
 
 Debugging
Signature · 1 line
An old man doll... just what I always wanted! - Clara
reviewer Reviewed-by on v1 3/3
#9 lore raw

Re: [PATCH net-next 3/3] net: dns_resolver: Fix request-key cross-reference

Quoted 5 lines · Bagas Sanjaya

Link to "Key Request Service" docs uses file:// scheme instead due to angled brackets markup. Fix it to proper cross-reference.

Fixes 3db38ed76890 ("doc: ReSTify keys-request-key.txt")

Thanks,

I visually inspected the html output in a browser and confirmed the both the name and link for cross-reference is now correct.