[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <176397549865.498.7720547858368907601.tip-bot2@tip-bot2>
Date: Mon, 24 Nov 2025 09:11:38 -0000
From: "tip-bot2 for Alexandre Chartre" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Alexandre Chartre <alexandre.chartre@...cle.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Josh Poimboeuf <jpoimboe@...nel.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: objtool/core] objtool: Provide access to feature and flags of
group alternatives
The following commit has been merged into the objtool/core branch of tip:
Commit-ID: be5ee60ac554c6189cda963e886c4b97d2cb978c
Gitweb: https://git.kernel.org/tip/be5ee60ac554c6189cda963e886c4b97d2cb978c
Author: Alexandre Chartre <alexandre.chartre@...cle.com>
AuthorDate: Fri, 21 Nov 2025 10:53:35 +01:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Fri, 21 Nov 2025 15:30:14 +01:00
objtool: Provide access to feature and flags of group alternatives
Each alternative of a group alternative depends on a specific
feature and flags. Provide access to the feature/flags for each
alternative as an attribute (feature) in struct alt_group.
Signed-off-by: Alexandre Chartre <alexandre.chartre@...cle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Acked-by: Josh Poimboeuf <jpoimboe@...nel.org>
Link: https://patch.msgid.link/20251121095340.464045-26-alexandre.chartre@oracle.com
---
tools/objtool/check.c | 2 ++
tools/objtool/include/objtool/check.h | 1 +
tools/objtool/include/objtool/special.h | 2 +-
tools/objtool/special.c | 2 ++
4 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index f75364f..9ec0e07 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1751,6 +1751,7 @@ static int handle_group_alt(struct objtool_file *file,
orig_alt_group->last_insn = last_orig_insn;
orig_alt_group->nop = NULL;
orig_alt_group->ignore = orig_insn->ignore_alts;
+ orig_alt_group->feature = 0;
} else {
if (orig_alt_group->last_insn->offset + orig_alt_group->last_insn->len -
orig_alt_group->first_insn->offset != special_alt->orig_len) {
@@ -1855,6 +1856,7 @@ end:
new_alt_group->nop = nop;
new_alt_group->ignore = (*new_insn)->ignore_alts;
new_alt_group->cfi = orig_alt_group->cfi;
+ new_alt_group->feature = special_alt->feature;
return 0;
}
diff --git a/tools/objtool/include/objtool/check.h b/tools/objtool/include/objtool/check.h
index cbf4af5..2e1346a 100644
--- a/tools/objtool/include/objtool/check.h
+++ b/tools/objtool/include/objtool/check.h
@@ -36,6 +36,7 @@ struct alt_group {
struct cfi_state **cfi;
bool ignore;
+ unsigned int feature;
};
enum alternative_type {
diff --git a/tools/objtool/include/objtool/special.h b/tools/objtool/include/objtool/special.h
index 72d09c0..b224107 100644
--- a/tools/objtool/include/objtool/special.h
+++ b/tools/objtool/include/objtool/special.h
@@ -25,7 +25,7 @@ struct special_alt {
struct section *new_sec;
unsigned long new_off;
- unsigned int orig_len, new_len; /* group only */
+ unsigned int orig_len, new_len, feature; /* group only */
};
int special_get_alts(struct elf *elf, struct list_head *alts);
diff --git a/tools/objtool/special.c b/tools/objtool/special.c
index e262af9..2a533af 100644
--- a/tools/objtool/special.c
+++ b/tools/objtool/special.c
@@ -81,6 +81,8 @@ static int get_alt_entry(struct elf *elf, const struct special_entry *entry,
entry->orig_len);
alt->new_len = *(unsigned char *)(sec->data->d_buf + offset +
entry->new_len);
+ alt->feature = *(unsigned int *)(sec->data->d_buf + offset +
+ entry->feature);
}
orig_reloc = find_reloc_by_dest(elf, sec, offset + entry->orig);
Powered by blists - more mailing lists