The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Sven Schnelle <svens@linux.ibm.com>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org,
	Alexander Gordeev <agordeev@linux.ibm.com>
Subject: Re: [PATCH] objtool: Add missing endianess conversion when checking annations
Date: Wed, 02 Jul 2025 10:30:51 +0200	[thread overview]
Message-ID: <yt9d1pqz6ll0.fsf@linux.ibm.com> (raw)
In-Reply-To: <20250514133515.1829691-1-svens@linux.ibm.com> (Sven Schnelle's message of "Wed, 14 May 2025 15:35:15 +0200")

Sven Schnelle <svens@linux.ibm.com> writes:

> cross-compiling a kernel for x86 on s390 produces the following warning:
>
> drivers/mfd/mc13xxx-core.o: warning: objtool: mc13xxx_reg_rmw+0xc: Unknown annotation type: 50331648
>
> Fix this by adding the required endianess conversion.
>
> Fixes: 2116b349e29a ("objtool: Generic annotation infrastructure")
> Reported-by: Alexander Gordeev <agordeev@linux.ibm.com>
> Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
> ---
>  tools/objtool/check.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/objtool/check.c b/tools/objtool/check.c
> index b21b12ec88d9..35fb871b2c62 100644
> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -2316,7 +2316,7 @@ static int read_annotate(struct objtool_file *file,
>  	}
>  
>  	for_each_reloc(sec->rsec, reloc) {
> -		type = *(u32 *)(sec->data->d_buf + (reloc_idx(reloc) * sec->sh.sh_entsize) + 4);
> +		type = bswap_if_needed(file->elf, *(u32 *)(sec->data->d_buf + (reloc_idx(reloc) * sec->sh.sh_entsize) + 4));
>  
>  		offset = reloc->sym->offset + reloc_addend(reloc);
>  		insn = find_insn(file, reloc->sym->sec, offset);

Gentle ping?

  parent reply	other threads:[~2025-07-02  8:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-14 13:35 [PATCH] objtool: Add missing endianess conversion when checking annations Sven Schnelle
2025-05-14 16:13 ` Alexander Gordeev
2025-07-02  8:30 ` Sven Schnelle [this message]
2025-07-02  8:38   ` Peter Zijlstra
2025-07-02 10:03     ` Sven Schnelle

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=yt9d1pqz6ll0.fsf@linux.ibm.com \
    --to=svens@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    /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