Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp645736ybz; Wed, 22 Apr 2020 05:24:36 -0700 (PDT) X-Google-Smtp-Source: APiQypIo5MtvTb9NtBNeJ+O/Zwy0uhlNp1EbRMzbvxkU+rA2mvUXTWojpqsLMfrTzAJ/NuuEIQv8 X-Received: by 2002:a17:906:160a:: with SMTP id m10mr24972901ejd.8.1587558276156; Wed, 22 Apr 2020 05:24:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587558276; cv=none; d=google.com; s=arc-20160816; b=zpdPRzXlykwVmr5oyyQlMKSHiSEtXBgxT/DYl1wA0mbKnDGzTdN5IIuWCvsv3/QO7I ekZnU23GkvNQeFwphnTyc2EBxwnIVUzMjsom8QB+gUvH/SBpVbJscRZih/AStt0OoxEb uiNGKExcDNxgb/ktj0fB3MSbbpLlY2shey1RN9S7kvAhcqj1mb3TveahfOh4AxgbyZZa r4UG5rusVzRsV+sf6lAEuV32tF9CgoidlUHEOCWFCiVXIu9wSVbCwi6B153/n92KCyxa 5ODESNsxt9SGAuRtMsDYcbYkI7DziUd+kWU2rxPfHxxZlu0irMZRXg4uonG6TiILF62G 14PA== 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:message-id:subject:cc:to:from:date :dkim-signature; bh=ZDGlgFET5eq2bzJ0hxZIFrGXsu9vX9N5rM5mY+1mMY0=; b=1JoDsc8PAcLxQbMKb0xFHMPtppWmlPtLSZdSmRsEAhA6a6zkS31POQIYzyjLNMqqih qO++2sFhx65tP2lwjtaOgkWFkesgNedeiatwmMNEduIWgU8uRa4ime718/dRKJFM225r jmM5kSZZxMkt16SjFsNKwypE+8gMZOi1AsuTso6fmkbCqHBpSenyTff6gVN0HJ+9556/ 15mIEVYh211Pc7tbkwNZheLssq8nRLMjtLBPhpdxkwS6AO3JH+viJujGpm8zhGBk3U3K WsenVBXUUO1cV13YHYNQA94kq4vyfjQKFePx8OsCOgMTJ7U1nSuIjVsfLWjkrwhGqdTx WokA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Vw9oy8mD; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q18si3287357edw.260.2020.04.22.05.24.13; Wed, 22 Apr 2020 05:24:36 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Vw9oy8mD; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726978AbgDVLoI (ORCPT + 99 others); Wed, 22 Apr 2020 07:44:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726426AbgDVLoI (ORCPT ); Wed, 22 Apr 2020 07:44:08 -0400 Received: from merlin.infradead.org (unknown [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEA70C03C1A8 for ; Wed, 22 Apr 2020 04:44:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ZDGlgFET5eq2bzJ0hxZIFrGXsu9vX9N5rM5mY+1mMY0=; b=Vw9oy8mDnKoXj7EmlZlLUyh4Le wwFvVWj0P7cHX7N2uENnCa4K8i51m6evPUk1Rx2Ur0rd8R+i96Qp0nPkTkArpSmLdYW3DTBdUqfnf DDYCZwSifat17sQOtMjWb4YX2hYBKdNZpQ+md7xEP12Ooyw8K9FrqhY3XGxEOkm5E3kFbTcW6C93t bo7qRpF/uzduGKtl9nsMw5wyqFdT39OeEbbDerMhtTV7rregTsOm7gGcR4MgzSDw7vuXNQZA2dSqz DZ0piQs3ghKM5VAGZ+5jlYWmJqhk897wILTfVeBQ004AA1WVPtD8vj9ULI2XYfJzr1fNe8X/hDA/U 20Rn4MEg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRDn6-00078f-2m; Wed, 22 Apr 2020 11:43:44 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id D9594304CFD; Wed, 22 Apr 2020 13:43:42 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id BDEEE203AA838; Wed, 22 Apr 2020 13:43:42 +0200 (CEST) Date: Wed, 22 Apr 2020 13:43:42 +0200 From: Peter Zijlstra To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, 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: <20200422114342.GD20730@hirez.programming.kicks-ass.net> References: <20200422103205.61900-1-mingo@kernel.org> <20200422103205.61900-3-mingo@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200422103205.61900-3-mingo@kernel.org> 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 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.