Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp910313ybz; Wed, 22 Apr 2020 10:04:54 -0700 (PDT) X-Google-Smtp-Source: APiQypKQ9nSPTYtKIOpOE4MI7DV1zt7zchjSAbjVnKxVqdcxKBfezU3ULlJqHlmh/XZHUo7tlMb7 X-Received: by 2002:a17:906:809:: with SMTP id e9mr26106576ejd.81.1587575094820; Wed, 22 Apr 2020 10:04:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587575094; cv=none; d=google.com; s=arc-20160816; b=pCF7Ih2w9GlaBE+F3RwkVraQXPcfzdmNALL5jkTbEzhEmRfX/Wuqneb7JUGUOE9ZBJ dLzwRgw2wd4rpLHU3mP5okcCP/KloSJQcm9f40Ceo+6Uylcf5rxwH88GlGSpNdlBrlfj sc6+Bw7Q9xdxX/1BwrfapE/yKZMTZlQ4aAixfU16Swq+SkyOHmDCsUp9OZYfBT1DHv8t jXo+9RkE6CVqzfRuIf8db8GOdh696URkwqXdzwPgFa4z4SlGEE5bNsnKvVhWw82GyTKp cEn7j2OJkERI4vb62MStAQUDBiQkyNntbwPseezvkNBS0W915OVNc9P1B5GNgfqe69Im zLng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date; bh=a4ot37YIHDghYSRZHi1J9gfV5u/oDxS70GbzwxEEe2Q=; b=SWCuur57lR1oAjwlFPojb1xEx3fJOQ9Bj7jGYCWo9g1+Rkvm11byjt7HdpOVxtt/cd 3/oDuAAt9cazHvRpLsGU6+eL0bCdAOALnOuocEpWooYeSW5UxVfnSe0vvbq6lwmPVrzX yfwRAU3uE4gnr3VY/S4vtq/gM4vymxxth1TBRbovbGiSZwJ3uXL/72xIz3HeyEDkodLy UGDI3Duf/pQxXqOV8vjT5E7y6UmmCWdMXqSDTSRKn4TLuhq4zLzJruo4swQqkNZB3ncr fJ/uzi+OCPK2QqRDjS1EAifU5O5LGqRTl+CPz8+QwVlLG++/GR69BWpu/WOuq6HyaUXM oCgA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s15si3790450edi.410.2020.04.22.10.04.23; Wed, 22 Apr 2020 10:04:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726520AbgDVRAt (ORCPT + 99 others); Wed, 22 Apr 2020 13:00:49 -0400 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:33771 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726381AbgDVRAt (ORCPT ); Wed, 22 Apr 2020 13:00:49 -0400 Received: from sc9-mailhost2.vmware.com (10.113.161.72) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Wed, 22 Apr 2020 10:00:45 -0700 Received: from localhost (unknown [10.129.220.242]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 82C10B24B6; Wed, 22 Apr 2020 13:00:48 -0400 (EDT) Date: Wed, 22 Apr 2020 10:00:48 -0700 From: Matt Helsley To: Ingo Molnar CC: Peter Zijlstra , , Josh Poimboeuf , Sami Tolvanen , Borislav Petkov , Linus Torvalds , Thomas Gleixner Subject: Re: [PATCH 2/3] objtool: Rename elf_read() to elf_open_read() Message-ID: <20200422170048.GA9040@rlwimi.vmware.com> Mail-Followup-To: Matt Helsley , Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org, Josh Poimboeuf , Sami Tolvanen , Borislav Petkov , Linus Torvalds , Thomas Gleixner References: <20200422103205.61900-1-mingo@kernel.org> <20200422103205.61900-3-mingo@kernel.org> <20200422114342.GD20730@hirez.programming.kicks-ass.net> <20200422142235.GA2840@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200422142235.GA2840@gmail.com> Received-SPF: None (EX13-EDG-OU-002.vmware.com: mhelsley@vmware.com does not designate permitted sender hosts) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 22, 2020 at 04:22:35PM +0200, Ingo Molnar wrote: > > * Peter Zijlstra 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