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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241128010034.u3b7gkh4wqgb7d2s@jpoimboe>
Date: Wed, 27 Nov 2024 17:00:34 -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,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 06/10] objtool: Handle unsorted table offset of rodata

On Wed, Nov 27, 2024 at 04:16:29PM -0800, Josh Poimboeuf wrote:
> On Wed, Nov 27, 2024 at 04:10:18PM -0800, Josh Poimboeuf wrote:
> > On Wed, Nov 27, 2024 at 03:01:33PM +0800, Tiezhu Yang wrote:
> > > 
> > > 
> > > On 11/27/2024 09:20 AM, Josh Poimboeuf wrote:
> > > > On Tue, Nov 26, 2024 at 09:28:19PM +0800, Tiezhu Yang wrote:
> > > > > > +		/* Handle the special cases compiled with Clang on LoongArch */
> > > > > > +		if (file->elf->ehdr.e_machine == EM_LOONGARCH &&
> > > > > > +		    reloc->sym->type == STT_SECTION && reloc != table &&
> > > > > > +		    reloc_offset(reloc) == reloc_offset(table) + rodata_table_size)
> > > > > > +			break;
> > > > > 
> > > > > I think it can be generic, like this:
> > > > > 
> > > > >                 /* Check for the end of the table: */
> > > > >                 if (reloc != table && reloc == next_table)
> > > > >                         break;
> > > > > 
> > > > >                 if (reloc != table &&
> > > > >                     reloc_offset(reloc) == reloc_offset(table) +
> > > > > rodata_table_size)
> > > > >                         break;
> > > > > 
> > > > > What do you think?
> > > > 
> > > > I'm not sure, this patch is hard to review because it uses
> > > > insn->table_size which doesn't get set until the next patch.
> > > > 
> > > > Maybe this patch should come after patches 7 & 8, or maybe they should
> > > > be squashed?
> > > 
> > > OK, I will squash the changes into patch #7.
> > 
> > I remembered Ard already solved a similar problem when he prototyped x86
> > jump table annotation.  Can you pull this patch into your series:
> > 
> > https://lore.kernel.org/20241011170847.334429-12-ardb+git@google.com
> 
> Actually, I think I'm going to merge patches 2-5 from Ard's series as
> they're a nice cleanup.  Let me do that and then you can base your next
> version off tip/objtool/core once it gets updated with Ard's and Peter's
> patches.

Still talking to myself here, I think we'll only merge the above patch,
since we don't know what the generic annotations are going to look like
yet.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ