lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250210211741.pfxmdj4ssudk3346@jpoimboe>
Date: Mon, 10 Feb 2025 13:17:41 -0800
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc: Huacai Chen <chenhuacai@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>, loongarch@...ts.linux.dev,
	amd-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 4/9] objtool: Handle unreachable entry of rodata

On Tue, Dec 17, 2024 at 09:09:00AM +0800, Tiezhu Yang wrote:
> When compiling with Clang on LoongArch, there exists unreachable entry of
> rodata which points to a position after the function return instruction,
> this is generated by compiler to fill the non-existent switch case, just
> skip the entry when parsing the relocation section of rodata.
> 
> Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
> ---
>  tools/objtool/check.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/objtool/check.c b/tools/objtool/check.c
> index cff7416b207e..654cffcf9512 100644
> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -1986,9 +1986,10 @@ static int add_jump_table(struct objtool_file *file, struct instruction *insn,
>  		if (!dest_insn)
>  			break;
>  
> -		/* Make sure the destination is in the same function: */
> -		if (!insn_func(dest_insn) || insn_func(dest_insn)->pfunc != pfunc)
> -			break;
> +		if (!insn_func(dest_insn) || insn_func(dest_insn)->pfunc != pfunc) {
> +			prev_offset = reloc_offset(reloc);
> +			continue;
> +		}

This patch can be dropped, this is already fixed in the -tip tree:

  3724062ca2b1 ("objtool: Ignore dangling jump table entries")

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ