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: Sat, 4 May 2024 15:24:02 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Kees Cook <keescook@...omium.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
	Youling Tang <tangyouling@...ngson.cn>,
	Jinyang He <hejinyang@...ngson.cn>,
	Huacai Chen <chenhuacai@...nel.org>,
	Tiezhu Yang <yangtiezhu@...ngson.cn>, linux-kernel@...r.kernel.org,
	linux-hardening@...r.kernel.org
Subject: Re: [PATCH] objtool: Provide origin hint for
 elf_init_reloc_text_sym() errors

On Tue, Apr 30, 2024 at 04:51:07PM -0700, Kees Cook wrote:
> @@ -891,8 +892,8 @@ struct reloc *elf_init_reloc_text_sym(struct elf *elf, struct section *sec,
>  	int addend = insn_off;
>  
>  	if (!(insn_sec->sh.sh_flags & SHF_EXECINSTR)) {
> -		WARN("bad call to %s() for data symbol %s",
> -		     __func__, sym->name);
> +		WARN("bad call to %s() for %s symbol %s",
> +		     __func__, origin, sym->name);
>  		return NULL;

Thanks for the patch.

That warning was already phrased pretty awkwardly which was probably
part of the confusion.  It could be rephrased to make it a little
clearer:

Something like:

  .cfi_sites: unexpected reference to non-executable symbol 'execute_location'

And ".cfi_sites" is already in 'sec->name', so you wouldn't need to add
the new 'origin' arg.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ