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]
Date:   Fri, 20 Oct 2023 18:56:52 +0800
From:   Tiezhu Yang <yangtiezhu@...ngson.cn>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Josh Poimboeuf <jpoimboe@...nel.org>,
        Huacai Chen <chenhuacai@...nel.org>, loongarch@...ts.linux.dev,
        linux-kernel@...r.kernel.org, loongson-kernel@...ts.loongnix.cn
Subject: Re: [PATCH v3 5/8] objtool: Check local label about sibling call



On 10/20/2023 05:30 PM, Peter Zijlstra wrote:
> On Fri, Oct 20, 2023 at 10:26:58AM +0800, Tiezhu Yang wrote:
>
>> +		if (reloc && reloc->sym->type == STT_NOTYPE &&
>> +		    strncmp(reloc->sym->name, ".L", 2) == 0)
>
>> +			if (reloc->sym->type == STT_NOTYPE &&
>> +			    strncmp(reloc->sym->name, ".L", 2) == 0) {
>
> Would not something like the below be better?
>
> diff --git a/tools/objtool/check.c b/tools/objtool/check.c
> index e308d1ba664e..a57d293c834d 100644
> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -2506,6 +2506,9 @@ static int classify_symbols(struct objtool_file *file)
>  	struct symbol *func;
>
>  	for_each_sym(file, func) {
> +		if (func->type == STT_NOTYPE && strstarts(func->name, ".L"))
> +			func->local_label = true;
> +
>  		if (func->bind != STB_GLOBAL)
>  			continue;
>
> diff --git a/tools/objtool/include/objtool/elf.h b/tools/objtool/include/objtool/elf.h
> index 9f71e988eca4..2b8a69de4db8 100644
> --- a/tools/objtool/include/objtool/elf.h
> +++ b/tools/objtool/include/objtool/elf.h
> @@ -67,6 +67,7 @@ struct symbol {
>  	u8 profiling_func    : 1;
>  	u8 warned	     : 1;
>  	u8 embedded_insn     : 1;
> +	u8 local_label       : 1;
>  	struct list_head pv_target;
>  	struct reloc *relocs;
>  };
>

Yes, this looks much better, thank you very much.
I will update the related code of patch #5, #6 and #7.

Thanks,
Tiezhu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ