Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp755279ybz; Wed, 22 Apr 2020 07:26:48 -0700 (PDT) X-Google-Smtp-Source: APiQypKMR8Zy0zFacRAuUOYcV1da9LEZLnWoeY9HvbnQhry1QOKbyvin6MCNO1DIdy2fTBYUeHR0 X-Received: by 2002:a17:906:c839:: with SMTP id dd25mr25801452ejb.164.1587565608455; Wed, 22 Apr 2020 07:26:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587565608; cv=none; d=google.com; s=arc-20160816; b=Fa3XaJYJGVnFlmZ3XQ64x7LSQ/E2cQO1CoU7Hb2HRyci7JJfv0pOae1BV5DpmNmO2j k/Ig3mkjdMZmrCZHrMxcis2VJ+KRQ4Vu+3UYB8aYiHkzd+cbuag+Mac0mkRkNMHhajC5 YJch0yPX0hBGMdoRauQvuwQLtp3H/L0kHMNEAsU+vAB09uglh8syF+Wt7SItvqg7pIRv HF6yGMc+fqSz0tzIeUTU6Pu0alfF++f18YeWT19N+NqsIw7DyjYcsK8ylbselreZOfN2 aJSVIc77KXQ+X1N15uLk0ra/LcqZCJ3miV3Ob1ZwpP1TLyV4PEHY5iiGJ5yQ/tQHdkiq BHZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ufnee/q97CC1CGBkoV1pipCbIwuaBK73Df12DK7GmQM=; b=nwHPq7mXVOLmqyia9NAP05OEHOTJV+QY6Ml9++jBtu2TprJk2MxYYgRCxyO42/qTBw A0eQBjua9cIsvRo3g3cdEOtO+EDMgurFMjUMmd/IBE/wQCbbNDP6OUiWScm2C1pvJSKV Z/FuYRkJgVebj2oO3qLWXehaKLrMl7qJpaNuCx8yx5wReba9p0/trbC8BtsO2/8dSYFB oV8LTZ/+MtoQU15xjYsXqkNXChi6KficU1mNxq6b1wRg6G6vZM3j3JjrKtQdFbhZsQ2v K7xrrzlfBLZjNaHOXZ+JID8dbT4G5bVezDeLhCHCNzf0NyesZ+dE+zKnGh8YFGwGKOAg IGaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="G/q6n0qY"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id aq18si3564706ejc.201.2020.04.22.07.26.23; Wed, 22 Apr 2020 07:26:48 -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=@gmail.com header.s=20161025 header.b="G/q6n0qY"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727101AbgDVOWk (ORCPT + 99 others); Wed, 22 Apr 2020 10:22:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726720AbgDVOWj (ORCPT ); Wed, 22 Apr 2020 10:22:39 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0473AC03C1A9 for ; Wed, 22 Apr 2020 07:22:39 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id g13so2607696wrb.8 for ; Wed, 22 Apr 2020 07:22:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ufnee/q97CC1CGBkoV1pipCbIwuaBK73Df12DK7GmQM=; b=G/q6n0qYA2Zalko2hOs1fOAoBG23c4arPJ4/nR/mgJ9jIpO6v9X61ryrLtTzpQQA6M +lH71mW+Kg7emKULTYSSiElVHDq9SnlUfgpRkmingJxKtgeO9jkIDkvnfe8Vo15Z9F/W JB/Y0biRf6LaEP6sU/CRAHP8FZmgXkAkMaoSebj0zqEhSuXchgKhNm1WvWmIWKmMf67E DAUUSYEZNHkM4tfVpWxMjEUJV6jV4TLlme9exaNphU7HZfM792GczQTrvn/0h6J5mU7H O8a4LiUqKwHRhbkk4sA/VQxLm4FyFtPzBdoGrdDYCp1ZYqX79Bhhw/F4dAHIRN1hLfUT KMwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=ufnee/q97CC1CGBkoV1pipCbIwuaBK73Df12DK7GmQM=; b=Mvho7DNamEuIup3+zdYJAUu+DPBz/wNXtjoCQIZxYQcuSX91VzDlSXqB38E/DR246W l6vf8CDAaz5q7H8JPtOcVOjRORwJ6lowW0DXcyoNzoIwcnjsyRpb03AlA4il2ux73e/X hKXXTiygGIWJdkxMkbkqV4aKxlUT/p3YlBlBzdP955hHAQUK2ILEnGOdfLmyZDAlfHAr GBK/1Y0pQAocfXZrhS5DRfNvpAOaaCyEEaxW8fZh6ZZjudQEnUtDKF5NFmEe1/Ihkx05 WsIPawTkHalo/wvsGaBvn2x1XnrMmWBhJvntP305X6U5OY/7mdFpGsEIFQKehYEygkp0 aVUw== X-Gm-Message-State: AGi0Puaaaz0naoIte+uPg2dY8n+tvAWggmFmeCJKRx1uZ4ucyVQEX3AU NDQYi8pn5jU3flp0mTFKizE= X-Received: by 2002:a5d:4b04:: with SMTP id v4mr31729231wrq.358.1587565357795; Wed, 22 Apr 2020 07:22:37 -0700 (PDT) Received: from gmail.com (54033286.catv.pool.telekom.hu. [84.3.50.134]) by smtp.gmail.com with ESMTPSA id b12sm9092431wro.18.2020.04.22.07.22.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 07:22:37 -0700 (PDT) Date: Wed, 22 Apr 2020 16:22:35 +0200 From: Ingo Molnar To: Peter Zijlstra 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: <20200422142235.GA2840@gmail.com> References: <20200422103205.61900-1-mingo@kernel.org> <20200422103205.61900-3-mingo@kernel.org> <20200422114342.GD20730@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200422114342.GD20730@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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! Thanks, Ingo