linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] docs: livepatch: move text out of code block
@ 2025-02-27 16:39 Vincenzo MEZZELA
  2025-02-28  2:04 ` Bagas Sanjaya
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vincenzo MEZZELA @ 2025-02-27 16:39 UTC (permalink / raw)
  To: live-patching, linux-doc, linux-kernel
  Cc: jpoimboe, jikos, mbenes, pmladek, joe.lawrence, corbet,
	Vincenzo MEZZELA

Part of the documentation text is included in the readelf output code
block. Hence, split the code block and move the affected text outside.

Signed-off-by: Vincenzo MEZZELA <vincenzo.mezzela@suse.com>
---
Changes in v2:
- Fixed usage of "::" in literal blocks

 Documentation/livepatch/module-elf-format.rst | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/Documentation/livepatch/module-elf-format.rst b/Documentation/livepatch/module-elf-format.rst
index a03ed02ec57e..5d48778d4dfc 100644
--- a/Documentation/livepatch/module-elf-format.rst
+++ b/Documentation/livepatch/module-elf-format.rst
@@ -217,16 +217,19 @@ livepatch relocation section refer to their respective symbols with their symbol
 indices, and the original symbol indices (and thus the symtab ordering) must be
 preserved in order for apply_relocate_add() to find the right symbol.
 
-For example, take this particular rela from a livepatch module:::
+For example, take this particular rela from a livepatch module::
 
   Relocation section '.klp.rela.btrfs.text.btrfs_feature_attr_show' at offset 0x2ba0 contains 4 entries:
       Offset             Info             Type               Symbol's Value  Symbol's Name + Addend
   000000000000001f  0000005e00000002 R_X86_64_PC32          0000000000000000 .klp.sym.vmlinux.printk,0 - 4
 
-  This rela refers to the symbol '.klp.sym.vmlinux.printk,0', and the symbol index is encoded
-  in 'Info'. Here its symbol index is 0x5e, which is 94 in decimal, which refers to the
-  symbol index 94.
-  And in this patch module's corresponding symbol table, symbol index 94 refers to that very symbol:
+This rela refers to the symbol '.klp.sym.vmlinux.printk,0', and the symbol
+index is encoded in 'Info'. Here its symbol index is 0x5e, which is 94 in
+decimal, which refers to the symbol index 94.
+
+And in this patch module's corresponding symbol table, symbol index 94 refers
+to that very symbol::
+
   [ snip ]
   94: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT OS [0xff20] .klp.sym.vmlinux.printk,0
   [ snip ]
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] docs: livepatch: move text out of code block
  2025-02-27 16:39 [PATCH v2] docs: livepatch: move text out of code block Vincenzo MEZZELA
@ 2025-02-28  2:04 ` Bagas Sanjaya
  2025-02-28 14:12 ` Miroslav Benes
  2025-03-04 15:51 ` Petr Mladek
  2 siblings, 0 replies; 4+ messages in thread
From: Bagas Sanjaya @ 2025-02-28  2:04 UTC (permalink / raw)
  To: Vincenzo MEZZELA, live-patching, linux-doc, linux-kernel
  Cc: jpoimboe, jikos, mbenes, pmladek, joe.lawrence, corbet

[-- Attachment #1: Type: text/plain, Size: 1971 bytes --]

On Thu, Feb 27, 2025 at 05:39:29PM +0100, Vincenzo MEZZELA wrote:
> diff --git a/Documentation/livepatch/module-elf-format.rst b/Documentation/livepatch/module-elf-format.rst
> index a03ed02ec57e..5d48778d4dfc 100644
> --- a/Documentation/livepatch/module-elf-format.rst
> +++ b/Documentation/livepatch/module-elf-format.rst
> @@ -217,16 +217,19 @@ livepatch relocation section refer to their respective symbols with their symbol
>  indices, and the original symbol indices (and thus the symtab ordering) must be
>  preserved in order for apply_relocate_add() to find the right symbol.
>  
> -For example, take this particular rela from a livepatch module:::
> +For example, take this particular rela from a livepatch module::
>  
>    Relocation section '.klp.rela.btrfs.text.btrfs_feature_attr_show' at offset 0x2ba0 contains 4 entries:
>        Offset             Info             Type               Symbol's Value  Symbol's Name + Addend
>    000000000000001f  0000005e00000002 R_X86_64_PC32          0000000000000000 .klp.sym.vmlinux.printk,0 - 4
>  
> -  This rela refers to the symbol '.klp.sym.vmlinux.printk,0', and the symbol index is encoded
> -  in 'Info'. Here its symbol index is 0x5e, which is 94 in decimal, which refers to the
> -  symbol index 94.
> -  And in this patch module's corresponding symbol table, symbol index 94 refers to that very symbol:
> +This rela refers to the symbol '.klp.sym.vmlinux.printk,0', and the symbol
> +index is encoded in 'Info'. Here its symbol index is 0x5e, which is 94 in
> +decimal, which refers to the symbol index 94.
> +
> +And in this patch module's corresponding symbol table, symbol index 94 refers
> +to that very symbol::
> +
>    [ snip ]
>    94: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT OS [0xff20] .klp.sym.vmlinux.printk,0
>    [ snip ]

LGTM, thanks!

Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] docs: livepatch: move text out of code block
  2025-02-27 16:39 [PATCH v2] docs: livepatch: move text out of code block Vincenzo MEZZELA
  2025-02-28  2:04 ` Bagas Sanjaya
@ 2025-02-28 14:12 ` Miroslav Benes
  2025-03-04 15:51 ` Petr Mladek
  2 siblings, 0 replies; 4+ messages in thread
From: Miroslav Benes @ 2025-02-28 14:12 UTC (permalink / raw)
  To: Vincenzo MEZZELA
  Cc: live-patching, linux-doc, linux-kernel, jpoimboe, jikos, pmladek,
	joe.lawrence, corbet

On Thu, 27 Feb 2025, Vincenzo MEZZELA wrote:

> Part of the documentation text is included in the readelf output code
> block. Hence, split the code block and move the affected text outside.
> 
> Signed-off-by: Vincenzo MEZZELA <vincenzo.mezzela@suse.com>

Acked-by: Miroslav Benes <mbenes@suse.cz>

M

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] docs: livepatch: move text out of code block
  2025-02-27 16:39 [PATCH v2] docs: livepatch: move text out of code block Vincenzo MEZZELA
  2025-02-28  2:04 ` Bagas Sanjaya
  2025-02-28 14:12 ` Miroslav Benes
@ 2025-03-04 15:51 ` Petr Mladek
  2 siblings, 0 replies; 4+ messages in thread
From: Petr Mladek @ 2025-03-04 15:51 UTC (permalink / raw)
  To: Vincenzo MEZZELA
  Cc: live-patching, linux-doc, linux-kernel, jpoimboe, jikos, mbenes,
	joe.lawrence, corbet

On Thu 2025-02-27 17:39:29, Vincenzo MEZZELA wrote:
> Part of the documentation text is included in the readelf output code
> block. Hence, split the code block and move the affected text outside.
> 
> Signed-off-by: Vincenzo MEZZELA <vincenzo.mezzela@suse.com>

JFYI, the patch has been comitted into livepatching.git,
branch for-6.15/trivial.

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-03-04 15:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-27 16:39 [PATCH v2] docs: livepatch: move text out of code block Vincenzo MEZZELA
2025-02-28  2:04 ` Bagas Sanjaya
2025-02-28 14:12 ` Miroslav Benes
2025-03-04 15:51 ` Petr Mladek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).