Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1041117ybz; Wed, 22 Apr 2020 12:25:41 -0700 (PDT) X-Google-Smtp-Source: APiQypKHb3bVHpUO+Gj/251Whk4X4tttaTjOSVOrPQWPvaiaV+8IIeg/68d3nfXpGh+8SDBaKlwF X-Received: by 2002:a50:d78a:: with SMTP id w10mr142918edi.356.1587583541070; Wed, 22 Apr 2020 12:25:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587583541; cv=none; d=google.com; s=arc-20160816; b=xm5ivZqS6gAxTMZvIx/aHYVXoyjtdXCwlLztrwI9qzpyVSVvw8pYnJnzzvMZ5viHZ0 pgN2eT0SpnrbdOJN9Fqi7+PuKyjDfnNIt2vwVdiqwr7lJZa25Rc/sxNEq5cCOBwlfDR2 MLgfP6ZutVyut66sdTp62yU4mW0Nbkcw5dN7vgNn1fHcBrSmBLIbH7/NSLEEuTc2PkS0 m6m9jBzsddyAP8C9fyZEXaHsNjyMJ0e/G9vCY/7TFIq+5T1cB3lMzJdgpS+weG3988QQ 8IVojBagM9DrAi2qLglfuNHFCyn9N4xilcveVCpkj0vsixm/yOHk8d24Lym+w7Bl5VAz m+9A== 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:to :from:date:dkim-signature; bh=Ggd3OIjBv3dR5xy/lEmsuN9469kzc86BjkEQ6GMIu9o=; b=a2A4xK4sQK9RAFOe4o4hpW2eMWpmhG7uLTOhX3LX6M1xCZc6i/8Mob6l2tmLqe9Fjw 9cK9CZIrg86noS2uIeAdVzbIhNcXjQK7F4pn41gU/2+TLF+XAkEtXzNRMfiSYP/meZcq L1A3QSHaS+imGsK1DtbCnhYopz82dZg6MdZpPGF30yLfyjElcDjLjH0StG2cOcIayYpv r6SzXTfcNHSfrNEHkeDNiVgFefiE53cQlB+PX+iX6HXma3/o4AQPey14fC6y9TwF2qwz VVIE6f1zDj/3p+jM+T/tJDu6/k+k4WqGDk1pW4HMLY3mtFh6gJWPCTuQ97u1RDTUZOdc ugCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=i18Pfsg3; 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 bo10si31080edb.19.2020.04.22.12.25.17; Wed, 22 Apr 2020 12:25:41 -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=i18Pfsg3; 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 S1726102AbgDVTWk (ORCPT + 99 others); Wed, 22 Apr 2020 15:22:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725961AbgDVTWj (ORCPT ); Wed, 22 Apr 2020 15:22:39 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEF25C03C1A9 for ; Wed, 22 Apr 2020 12:22:38 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id g12so3819968wmh.3 for ; Wed, 22 Apr 2020 12:22:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Ggd3OIjBv3dR5xy/lEmsuN9469kzc86BjkEQ6GMIu9o=; b=i18Pfsg3/DO5uj5DUYW8ByxiX2qR0HCoQ6oi2b93yaDWT4RH7BY71fn3diHXqLuuLt r58fhj6BAJRu+2Daa/ydBbT45hm4aEyNUi8Z/WFW9Wo4fEjDxDWISjhuoeUa8LACT0cT p8d5yfoJBFn+Sdt1f/l8h1I4tnCZx8INam0430mUgHdwQ0/XtF0Cv3zgXvKoF5i1M3jd Lt4taitDNHhqZISPWpulJIQFjnAl+JD9dMnGwHUXZYjK/3InyNg8pd0rFLCTORO1HGEy lnbshhuBvq+kAVbUHMe+Ys0XMkFitcfU+xJEwnS9HGTHgST0MH40uZOpFpJXAi0MKF6C Bkkw== 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:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Ggd3OIjBv3dR5xy/lEmsuN9469kzc86BjkEQ6GMIu9o=; b=BGZkOfkhW6HnuIvq1pXz0L+ZfY8+oSMZFqlpdGSBtGusogvCzzCIhbFeAqs357tIwu emwROoL5sl+LTPcwrPzzigxEZEuvMIY+FQ/0fTVVQli4416emuAV72ZMI3CcjOzZjZQF /xktbGUkkY8nL1zOsyW0HMTrqvzWHidjf7yt7osSogjxdNHXWSjTc64fsyaB9/4ifiR4 Vz1dDZFXW4i68Ox/mEQCSYZuCVFjvI6yLoGLBWkVSkztfKqHZnCN7t4LAqaMTRN4vwpP 1c+zsL38jjzFMdnIWolp5n4GujKVtDPzxrr8omqvEQsNpDGHnRoyAwH+jjvX8Bpb/bOB e65g== X-Gm-Message-State: AGi0PubB3VhTDP7d+2pPNPIGZRmuSMIxKXQZR1a8SU5q8AwSq4s+hckp SFiT/Te15tCCB8OPtZQMjCnk2vZ0 X-Received: by 2002:a1c:bc05:: with SMTP id m5mr11379018wmf.143.1587583357728; Wed, 22 Apr 2020 12:22:37 -0700 (PDT) Received: from gmail.com (54033286.catv.pool.telekom.hu. [84.3.50.134]) by smtp.gmail.com with ESMTPSA id y5sm255394wru.15.2020.04.22.12.22.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 12:22:37 -0700 (PDT) Date: Wed, 22 Apr 2020 21:22:35 +0200 From: Ingo Molnar To: Matt Helsley , Peter Zijlstra , 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: <20200422192235.GA14331@gmail.com> References: <20200422103205.61900-1-mingo@kernel.org> <20200422103205.61900-3-mingo@kernel.org> <20200422114342.GD20730@hirez.programming.kicks-ass.net> <20200422142235.GA2840@gmail.com> <20200422170048.GA9040@rlwimi.vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200422170048.GA9040@rlwimi.vmware.com> 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 * Matt Helsley wrote: > 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. Indeed, that's a good point - I'll move back to elf_open_read()! :-) Thanks, Ingo