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]
Date:   Mon, 18 May 2020 17:27:54 -0500
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     Matt Helsley <mhelsley@...are.com>
Cc:     linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Julien Thierry <jthierry@...hat.com>,
        Miroslav Benes <mbenes@...e.cz>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [RFC][PATCH 4/5] objtool: Enable compilation of objtool for all
 architectures

On Mon, May 18, 2020 at 12:50:45PM -0700, Matt Helsley wrote:
> > Why were these moved to arch.h?  They're not necessarily arch-specific,
> > but rather "check"-specific, so I think they still belong in check.h, if
> > possible.
> 
> Ah, found it. They are arch specific due to struct orc_entry, which is
> presently not defined for any archs besides x86.
> 
> Prior to the patch (-> means "includes"):
> 	check.h -> asm/orc_types.h (defines struct orc_entry)
> 	orc_gen.c -> check,h
> 
> After patch:
> 	check.c -> asm/orc_types.h
> 	orc_gen.c -> asm/orc_types.h
> 	orc_gen.c -> check.h
> 	orc_gen.c -> arch.h
> 	{ now weak.c } -> check.h
> 
> So this prevents the headers, which help us keep the weak definitions
> consistent with the strong definitions, from breaking compiles on archs
> that lack struct orc_entry.
> 
> I'm not sure what the best way to remove this dependency is without
> a nasty void * for the orc entry, or some #ifdef games related to
> checking for cpp defines from asm/orc_types.h. This approach neatly
> avoids conditional preprocessor games and type casting though I do
> agree it's surprising.
> 
> Do you have any advice here?

Would it work if we just move the check() and orc_dump() prototypes to
objtool.h?  Then weak.c can just include objtool.h.  And check.h and
orc.h would only need to be included for arches which implement them.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ