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: <20200422170048.GA9040@rlwimi.vmware.com>
Date:   Wed, 22 Apr 2020 10:00:48 -0700
From:   Matt Helsley <mhelsley@...are.com>
To:     Ingo Molnar <mingo@...nel.org>
CC:     Peter Zijlstra <peterz@...radead.org>,
        <linux-kernel@...r.kernel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Sami Tolvanen <samitolvanen@...gle.com>,
        Borislav Petkov <bp@...en8.de>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 2/3] objtool: Rename elf_read() to elf_open_read()

On Wed, Apr 22, 2020 at 04:22:35PM +0200, Ingo Molnar wrote:
> 
> * Peter Zijlstra <peterz@...radead.org> wrote:
> 
> > On Wed, Apr 22, 2020 at 12:32:04PM +0200, Ingo Molnar wrote:
> > > 'struct elf *' handling is an open/close paradigm, make sure the naming
> > > matches that:
> > > 
> > >    elf_open_read()
> > >    elf_write()
> > >    elf_close()
> > 
> > 
> > > diff --git a/tools/objtool/check.c b/tools/objtool/check.c
> > > index f2a84271e807..12e2aea42bb2 100644
> > > --- a/tools/objtool/check.c
> > > +++ b/tools/objtool/check.c
> > > @@ -2614,7 +2614,7 @@ int check(const char *_objname, bool orc)
> > >  
> > >  	objname = _objname;
> > >  
> > > -	file.elf = elf_read(objname, orc ? O_RDWR : O_RDONLY);
> > > +	file.elf = elf_open_read(objname, orc ? O_RDWR : O_RDONLY);
> > 
> > Note that I have a patch pending that makes that unconditionally O_RDWR,
> > which sort of seems to suggest elf_open() might be the better name.
> 
> Ok, done!

It might be a better name but there could be a problem with it --
see 8e144797f1a67c52e386161863da4614a23ad913
"objtool: Rename elf_open() to prevent conflict with libelf from elftoolchain"

Unless I'm forgetting something I think that'd still be an issue.

Cheers,
	-Matt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ