All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: Eva Kurchatova <eva.kurchatova@virtuozzo.com>,
	khorenko@virtuozzo.com, vladimir.riabchun@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2 12/17] ms/objtool: Move mark_rodata() to elf.c
Date: Tue, 24 Nov 2026 05:13:45 +0000	[thread overview]
Message-ID: <010701a20bf96b81-9a19b4e0-e6f5-4afe-b943-e5e307b5e978-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261124050655.1853940-13-eva.kurchatova@virtuozzo.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] objtool: rodata name-matching comment left in check.c, none in
  elf.c
--

commit 5aa51a6bbc60594018d39f706683432ad65d44a3
Author: Josh Poimboeuf <jpoimboe@kernel.org>

ms/objtool: Move mark_rodata() to elf.c

The patch moves the per-section rodata marking from check.c into elf.c, so sec->rodata is set while the ELF file is read. It adds an is_rodata_sec() helper, and the check.c mark_rodata() now only sets file->rodata.

> diff --git a/tools/objtool/check.c b/tools/objtool/check.c
> index dc24ceed3c7d9..f9539dae294f9 100644
> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -2524,7 +2524,6 @@ static int classify_symbols(struct objtool_file *file)
>  static void mark_rodata(struct objtool_file *file)
>  {
>  	struct section *sec;
> -	bool found = false;
>  
>  	/*
>  	 * Search for the following rodata sections, each of which can
> @@ -2537,15 +2536,11 @@ static void mark_rodata(struct objtool_file *file)
>  	 * .rodata.str1.* sections are ignored; they don't contain jump tables.
>  	 */
>  	for_each_sec(file->elf, sec) {
> -		if ((!strncmp(sec->name, ".rodata", 7) &&
> -		     !strstr(sec->name, ".str1.")) ||
> -		    !strncmp(sec->name, ".data.rel.ro", 12)) {
> -			sec->rodata = true;
> -			found = true;
> +		if (is_rodata_sec(sec)) {
> +			file->rodata = true;
> +			return;
>  		}
>  	}
> -
>  	}

[Severity: Low]
This isn't a bug, but the block comment listing the rodata section name patterns and the .str1. exclusion now sits in a function that no longer matches any names. Should it move to the new mark_rodata() in elf.c, which holds the matching logic and has no comment? Having two static functions named mark_rodata(), in different files and doing different jobs, is also a bit confusing. Renaming the check.c one might help, for example to something that says it only records whether the file has any rodata section.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261124050655.1853940-1-eva.kurchatova@virtuozzo.com?part=12

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-11-24  5:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  5:00 [Devel] [PATCH hci-8.2 00/17] ms/objtool: fix silently wrong livepatches by klp-build Eva Kurchatova
2026-11-24  5:00 ` [Devel] [PATCH hci-8.2 01/17] ms/objtool/klp: Fix detection of corrupt static branch/call entries Eva Kurchatova
2026-11-24  5:11   ` no-reply
2026-11-24  5:00 ` [Devel] [PATCH hci-8.2 02/17] ms/objtool/klp: Disable unsupported pr_debug() usage Eva Kurchatova
2026-11-24  5:10   ` no-reply
2026-11-24  5:00 ` [Devel] [PATCH hci-8.2 03/17] ms/objtool: Fix data alignment in elf_add_data() Eva Kurchatova
2026-11-24  5:11   ` no-reply
2026-11-24  5:00 ` [Devel] [PATCH hci-8.2 04/17] ms/objtool/klp: fix data alignment in __clone_symbol() Eva Kurchatova
2026-11-24  5:11   ` no-reply
2026-11-24  5:00 ` [Devel] [PATCH hci-8.2 05/17] ms/objtool/klp: Fix .data..once static local non-correlation Eva Kurchatova
2026-11-24  5:11   ` no-reply
2026-11-24  5:00 ` [Devel] [PATCH hci-8.2 06/17] ms/objtool/klp: Fix create_fake_symbols() skipping entsize-based sections Eva Kurchatova
2026-11-24  5:11   ` no-reply
2026-11-24  5:00 ` [Devel] [PATCH hci-8.2 07/17] ms/objtool/klp: Fix handling of zero-length .altinstr_replacement sections Eva Kurchatova
2026-11-24  5:12   ` no-reply
2026-11-24  5:00 ` [Devel] [PATCH hci-8.2 08/17] ms/objtool/klp: Fix cloning of zero-length section symbols Eva Kurchatova
2026-11-24  5:12   ` no-reply
2026-11-24  5:00 ` [Devel] [PATCH hci-8.2 09/17] ms/objtool/klp: Fix relocation conversion failures for R_X86_64_NONE Eva Kurchatova
2026-11-24  5:12   ` no-reply
2026-11-24  5:00 ` [Devel] [PATCH hci-8.2 10/17] ms/objtool/klp: Fix reloc corruption in convert_reloc_sym_to_secsym() Eva Kurchatova
2026-11-24  5:12   ` no-reply
2026-11-24  5:01 ` [Devel] [PATCH hci-8.2 11/17] ms/objtool/klp: Simplify reloc symbol conversion Eva Kurchatova
2026-11-24  5:13   ` no-reply
2026-11-24  5:01 ` [Devel] [PATCH hci-8.2 12/17] ms/objtool: Move mark_rodata() to elf.c Eva Kurchatova
2026-11-24  5:13   ` no-reply [this message]
2026-11-24  5:01 ` [Devel] [PATCH hci-8.2 13/17] ms/objtool/klp: Fix pointer comparisons for rodata objects Eva Kurchatova
2026-11-24 12:20   ` Konstantin Khorenko
2026-11-24  5:01 ` [Devel] [PATCH hci-8.2 14/17] ms/objtool/klp: Fix module name normalization for paths with dots Eva Kurchatova
2026-11-24  5:01 ` [Devel] [PATCH hci-8.2 15/17] ms/objtool/klp: Normalize Module.symvers paths to module names Eva Kurchatova
2026-11-24  5:01 ` [Devel] [PATCH hci-8.2 16/17] ms/objtool/klp: Fix cross-module klp relocation section naming Eva Kurchatova
2026-11-24  5:01 ` [Devel] [PATCH hci-8.2 17/17] ms/objtool/klp: Don't match local symbols against exports Eva Kurchatova
2026-11-24 12:20 ` [Devel] [PATCH hci-8.2 00/17] ms/objtool: fix silently wrong livepatches by klp-build Konstantin Khorenko

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=010701a20bf96b81-9a19b4e0-e6f5-4afe-b943-e5e307b5e978-000000@eu-central-1.amazonses.com \
    --to=no-reply@sashiko.virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=eva.kurchatova@virtuozzo.com \
    --cc=khorenko@virtuozzo.com \
    --cc=vladimir.riabchun@virtuozzo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.