From: Petr Mladek <pmladek@suse.com>
To: Lukas Hruska <lhruska@suse.cz>
Cc: Miroslav Benes <mbenes@suse.cz>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Joe Lawrence <joe.lawrence@redhat.com>,
live-patching@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kbuild@vger.kernel.org,
Marcos Paulo de Souza <mpdesouza@suse.com>,
Josh Poimboeuf <jpoimboe@redhat.com>
Subject: Re: [PATCH v1 2/5] livepatch: Add klp-convert tool
Date: Fri, 5 Jan 2024 16:01:48 +0100 [thread overview]
Message-ID: <ZZgZ3LYSZARBjYqo@alley> (raw)
In-Reply-To: <20231106162513.17556-3-lhruska@suse.cz>
On Mon 2023-11-06 17:25:10, Lukas Hruska wrote:
> Livepatches need to access external symbols which can't be handled
> by the normal relocation mechanism. It is needed for two types
> of symbols:
>
> --- /dev/null
> +++ b/scripts/livepatch/klp-convert.c
> @@ -0,0 +1,283 @@
[...]
> +/*
> + * Formats name of klp rela symbol based on another given section (@oldsec)
> + * and object (@obj_name) name, then returns it
> + */
> +static char *alloc_klp_rela_name(struct section *oldsec,
> + char *target_objname, struct elf *klp_elf)
> +{
Nit: Please, use @lp_obj_name instead of @target_objname.
It would make it consistent with the caller:
klp_rela_name = alloc_klp_rela_name(oldsec, lp_obj_name, klp_elf);
and also with
#define KLP_RELOC_SYMBOL_POS(LP_OBJ_NAME, SYM_OBJ_NAME, SYM_NAME, SYM_POS)
> + char *klp_rela_name;
> + unsigned int length;
> + int err;
Just for record. The name "lp_obj_name" came from a discussion between
me and Lukas about the KLP_RELOC_SYMBOL_POS() parameter names.
The macro has two object name parameters. And LP_OBJ_NAME aka
LivePatched_OBJ_NAME looked better than TARGET_OBJ_NAME.
The name "TARGET" is too ambiguous to me.
Best Regards,
Petr
next prev parent reply other threads:[~2024-01-05 15:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 16:25 [PATCH v1 0/5] livepatch: klp-convert tool - Minimal version Lukas Hruska
2023-11-06 16:25 ` [PATCH v1 1/5] livepatch: Create and include UAPI headers Lukas Hruska
2024-01-05 10:15 ` Petr Mladek
2024-01-10 13:38 ` Marcos Paulo de Souza
2023-11-06 16:25 ` [PATCH v1 2/5] livepatch: Add klp-convert tool Lukas Hruska
2024-01-05 13:29 ` Petr Mladek
2024-01-10 19:03 ` Marcos Paulo de Souza
2024-01-05 15:01 ` Petr Mladek [this message]
2023-11-06 16:25 ` [PATCH v1 3/5] kbuild/modpost: integrate klp-convert Lukas Hruska
2024-01-05 14:03 ` Petr Mladek
2024-01-10 19:37 ` Marcos Paulo de Souza
2024-01-25 9:44 ` Lukas Hruska
2023-11-06 16:25 ` [PATCH v1 4/5] livepatch: Add sample livepatch module Lukas Hruska
2024-01-05 14:14 ` Petr Mladek
2023-11-06 16:25 ` [PATCH v1 5/5] documentation: Update on livepatch elf format Lukas Hruska
2024-01-05 14:16 ` Petr Mladek
2024-01-10 19:54 ` Marcos Paulo de Souza
2024-04-10 15:32 ` [PATCH v1 0/5] livepatch: klp-convert tool - Minimal version Marcos Paulo de Souza
2024-04-11 6:27 ` Miroslav Benes
2024-04-11 13:58 ` Lukas Hruska
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZZgZ3LYSZARBjYqo@alley \
--to=pmladek@suse.com \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=jpoimboe@redhat.com \
--cc=lhruska@suse.cz \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=mpdesouza@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox