bpftool: work-around rst2man conversion bug
Subsystems (4)
PATCH 1/1 bpftool: work-around rst2man conversion bug
Work-around what appears to be a bug in rst2man convertion tool, used to create man pages out of reStructureText-formatted documents. If text line starts with dot, rst2man will put it in resulting man file verbatim. This seems to cause man tool to interpret it as a directive/command (e.g., .bs), and subsequently not render entire line because it's unrecognized one.
Enclose '.xxx' words in extra formatting to work around.
--- tools/bpf/bpftool/Documentation/bpftool-gen.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
tools/bpf/bpftool/Documentation/bpftool-gen.rst +8 -7
@@ -112,13 +112,14 @@ DESCRIPTION If BPF object has global variables, corresponding structs with memory layout corresponding to global data data section - layout will be created. Currently supported ones are: .data, - .bss, .rodata, and .extern structs/data sections. These - data sections/structs can be used to set up initial values of - variables, if set before **example__load**. Afterwards, if - target kernel supports memory-mapped BPF arrays, same - structs can be used to fetch and update (non-read-only) - data from userspace, with same simplicity as for BPF side. + layout will be created. Currently supported ones are: *.data*, + *.bss*, *.rodata*, and *.kconfig* structs/data sections. + These data sections/structs can be used to set up initial + values of variables, if set before **example__load**. + Afterwards, if target kernel supports memory-mapped BPF + arrays, same structs can be used to fetch and update + (non-read-only) data from userspace, with same simplicity + as for BPF side. **bpftool gen help** Print short help message.
Signature · 1 line
2.17.1
Quoted 28 lines · Andrii Nakryiko
Work-around what appears to be a bug in rst2man convertion tool, used to create man pages out of reStructureText-formatted documents. If text line starts with dot, rst2man will put it in resulting man file verbatim. This seems to cause man tool to interpret it as a directive/command (e.g.,
.bs), and subsequently not render entire line because it's unrecognized one.Enclose '.xxx' words in extra formatting to work around.
Fixes cb21ac588546 ("bpftool: Add gen subcommand manpage")Reported-by Alexei Starovoitov <[email protected]>Signed-off-by Andrii Nakryiko <[email protected]>--- tools/bpf/bpftool/Documentation/bpftool-gen.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)tools/bpf/bpftool/Documentation/bpftool-gen.rst +0
-5@@ -112,13 +112,14 @@ DESCRIPTION If BPF object has global variables, corresponding structs with memory layout corresponding to global data data section - layout will be created. Currently supported ones are: .data, - .bss, .rodata, and .extern structs/data sections. These - data sections/structs can be used to set up initial values of - variables, if set before **example__load**. Afterwards, if - target kernel supports memory-mapped BPF arrays, same
tools/bpf/bpftool/Documentation/bpftool-gen.rst DESCRIPTION · line 122
Quoted 10 lines
tools/bpf/bpftool/Documentation/bpftool-gen.rst +8
-2- structs can be used to fetch and update (non-read-only) - data from userspace, with same simplicity as for BPF side. + layout will be created. Currently supported ones are: *.data*, + *.bss*, *.rodata*, and *.kconfig* structs/data sections. + These data sections/structs can be used to set up initial + values of variables, if set before **example__load**. + Afterwards, if target kernel supports memory-mapped BPF + arrays, same structs can be used to fetch and update + (non-read-only) data from userspace, with same simplicity + as for BPF side.
Still does not look right.
After build, I did man ./bpftool-gen.8, and I got the following,
sponding to global data data section layout will be
created. Currently supported ones
are: .data, data sections/structs can be used to set
up initial values of variables,
.bss, .rodata .kconfig etc. are missing. I am using:
-bash-4.4$ man --version
man 2.6.3
Quoted 4 lines
tools/bpf/bpftool/Documentation/bpftool-gen.rst +0
-0**bpftool gen help** Print short help message.
Quoted 45 lines · Yonghong Song
Quoted 28 lines · Andrii Nakryiko
Work-around what appears to be a bug in rst2man convertion tool, used to create man pages out of reStructureText-formatted documents. If text line starts with dot, rst2man will put it in resulting man file verbatim. This seems to cause man tool to interpret it as a directive/command (e.g.,
.bs), and subsequently not render entire line because it's unrecognized one.Enclose '.xxx' words in extra formatting to work around.
Fixes cb21ac588546 ("bpftool: Add gen subcommand manpage")Reported-by Alexei Starovoitov <[email protected]>Signed-off-by Andrii Nakryiko <[email protected]>--- tools/bpf/bpftool/Documentation/bpftool-gen.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)tools/bpf/bpftool/Documentation/bpftool-gen.rst +0
-5@@ -112,13 +112,14 @@ DESCRIPTION If BPF object has global variables, corresponding structs with memory layout corresponding to global data data section - layout will be created. Currently supported ones are: .data, - .bss, .rodata, and .extern structs/data sections. These - data sections/structs can be used to set up initial values of - variables, if set before **example__load**. Afterwards, if - target kernel supports memory-mapped BPF arrays, sametools/bpf/bpftool/Documentation/bpftool-gen.rst DESCRIPTION · line 122
Quoted 10 lines
tools/bpf/bpftool/Documentation/bpftool-gen.rst +8
-2- structs can be used to fetch and update (non-read-only) - data from userspace, with same simplicity as for BPF side. + layout will be created. Currently supported ones are: *.data*, + *.bss*, *.rodata*, and *.kconfig* structs/data sections. + These data sections/structs can be used to set up initial + values of variables, if set before **example__load**. + Afterwards, if target kernel supports memory-mapped BPF + arrays, same structs can be used to fetch and update + (non-read-only) data from userspace, with same simplicity + as for BPF side.Still does not look right.
Quoted 9 lines
After build, I did
man ./bpftool-gen.8, and I got the following,sponding to global data data section layout will be
created. Currently supported ones
are: .data, data sections/structs can be used to set
up initial values of variables,.bss, .rodata .kconfig etc. are missing. I am using:
looks like stale man page, can you please try re-building? Double checked on my side, it looks good here.
Quoted 7 lines
-bash-4.4$ man --version
man 2.6.3Quoted 4 lines
tools/bpf/bpftool/Documentation/bpftool-gen.rst +0
-0**bpftool gen help** Print short help message.
Yonghong Song
Acked-byQuoted 9 lines · Yonghong Song
Quoted 6 lines · Andrii Nakryiko
Work-around what appears to be a bug in rst2man convertion tool, used to create man pages out of reStructureText-formatted documents. If text line starts with dot, rst2man will put it in resulting man file verbatim. This seems to cause man tool to interpret it as a directive/command (e.g.,
.bs), and subsequently not render entire line because it's unrecognized one.
Quoted 5 lines
Quoted 5 lines
Enclose '.xxx' words in extra formatting to work around.
Fixes cb21ac588546 ("bpftool: Add gen subcommand manpage")Reported-by Alexei Starovoitov <[email protected]>Signed-off-by Andrii Nakryiko <[email protected]>
[...]
Quoted 17 lines
tools/bpf/bpftool/Documentation/bpftool-gen.rst DESCRIPTION · line 122
Quoted 7 lines
tools/bpf/bpftool/Documentation/bpftool-gen.rst +7
-0+ *.bss*, *.rodata*, and *.kconfig* structs/data sections. + These data sections/structs can be used to set up initial + values of variables, if set before **example__load**. + Afterwards, if target kernel supports memory-mapped BPF + arrays, same structs can be used to fetch and update + (non-read-only) data from userspace, with same simplicity + as for BPF side.Still does not look right.
After build, I did
man ./bpftool-gen.8, and I got the following,sponding to global data data section layout will be
created. Currently supported ones
are: .data, data sections/structs can be used to set
up initial values of variables,
Quoted 4 lines
.bss, .rodata .kconfig etc. are missing. I am using:
-bash-4.4$ man --version
man 2.6.3
Sorry. Actually this patch works. I applied the previous patch "bpftool: simplify format string to not use positional args" and got the above result.
Alexei Starovoitov
AppliedQuoted 13 lines · Yonghong Song
Quoted 9 lines · Yonghong Song
Quoted 6 lines · Andrii Nakryiko
Work-around what appears to be a bug in rst2man convertion tool, used to create man pages out of reStructureText-formatted documents. If text line starts with dot, rst2man will put it in resulting man file verbatim. This seems to cause man tool to interpret it as a directive/command (e.g.,
.bs), and subsequently not render entire line because it's unrecognized one.
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Enclose '.xxx' words in extra formatting to work around.
Fixes cb21ac588546 ("bpftool: Add gen subcommand manpage")Reported-by Alexei Starovoitov <[email protected]>Signed-off-by Andrii Nakryiko <[email protected]>Acked-by Yonghong Song <[email protected]
Applied. Thanks