Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp45245ybh; Mon, 20 Jul 2020 09:55:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnDgyewbb+i6GgOrR3FcI3igpCl9tcpKRWaTSlv5E25J3/jl0JIQPzZ/T7oD5wuP8UCuUR X-Received: by 2002:aa7:d693:: with SMTP id d19mr23260065edr.317.1595264122838; Mon, 20 Jul 2020 09:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595264122; cv=none; d=google.com; s=arc-20160816; b=Dg3+76yM9QqVFCuzUleYc4YVigtyDrfQ9meMLAxz02N2N7KR3WWA5aLlT2IQwF2kYU AyfFyH0y1P319rgjQZoY85mbPL+WPbVuWHAT7BG2trrX1cjReNLYSq7Te+QdVGx/PIIH BpMd2xUS5i9YnOHEkSg1g17B91Z4/KLxPnKJB4HQUkpB8GNvZPuiqjjQRQT46sIygFM/ Z79AnCp63bzObNQRS9LoxLFwWOdHjFSAAW7lvU2mLeCTZcOJHKPj1cYlLKRl+k1AzLhI EwIMxA6YocDMwVhrEo1Y/BfcyykeurZQIOTn78dQEE3F9TZZgeHqBl7ooShPqkKbOUFa pb6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=WjwIKDNMRO86HLiza3ekP7Z4qpEbwmULQ/L4/V4YUtE=; b=lSdJ+q1J82H0+0AL9CHLdtg6ewRWQ0pzZ8Z2JbI8jrueZa4K0ld1Tkdx4gFXqKIrIz O5abRg0tL/ejMuqgE7+POn2i5EIeWjEShcd9GFQ0uAwrKbQIJ9vedFKQkJXWNCZ10J4O rUCMtGxk3E0FjEq2ZSLsGsIi66rF9jrtTUUCVRdKSQ7cZ1gn/sG10NEHOBW46/2zRPDt evNw/WM6TEVDncw2V4+n6zNKGlgp/umYUI/dYb4JZke4n1KFX4ZhEUkYS9FliMkL3eDx BCh0qOflE9V99sJlX6uWKk4NCf6osh6EnM0IQXJai/I60w6he+OI1Uw4+sgFkvoZ+oPf SjwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=aKi09317; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m16si10959602eji.77.2020.07.20.09.54.59; Mon, 20 Jul 2020 09:55:22 -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=pass header.i=@google.com header.s=20161025 header.b=aKi09317; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728898AbgGTQww (ORCPT + 99 others); Mon, 20 Jul 2020 12:52:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728894AbgGTQwu (ORCPT ); Mon, 20 Jul 2020 12:52:50 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1AEBC0619D2 for ; Mon, 20 Jul 2020 09:52:49 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id o18so18781400eje.7 for ; Mon, 20 Jul 2020 09:52:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WjwIKDNMRO86HLiza3ekP7Z4qpEbwmULQ/L4/V4YUtE=; b=aKi09317EgbufEHdPz6ybPx9SBQ3iXd5Qr1oxjOv5QrJguwLfk+bp9TvU+POgEqNC8 E9WJUEpjgUVnd4A6HMqkPY1IIekaq1PzTfjnSMhOysWqSQHFxU2VpsbyaAfBSvi55tCf OsQMetqysDIjWPonv8j8aSyT8PHbE2MY4MEap62x4hEwJiTGeKO4UE/AqW6CYkuqHJFK +jNk4cgc5ueo3XySM27EJlzHTQmL7o1dFCUGkubIzjmwWtHygQSqOr7J4KrirT0N5ii5 6jmz3r9OZwZaSF0lhj6qB061kySusc6q4saf79ctFwnqDim1fh9xHMNQHSN4aeXTLI+e WmFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WjwIKDNMRO86HLiza3ekP7Z4qpEbwmULQ/L4/V4YUtE=; b=cKa9gojqSQRWUf7gOYZ3VGbjxsE4jJf5ONCfS4WhzfBplQ3FwUHigQp02a249GBC6E qNn5YDygaZNY4RZ5ySpLrmPAliS5G+TwJZrA+gEoYq5motpwAi3kGg3nBegpy93/rxet RDcTJwXT9Wmtp6NjOB4fT37zI2xD3+eL/2BBbgL8ecC/C9azbfp/DmHXnrRTIPJVweXZ MakB49Ii4mfAsgBURbODRjXAXqifs8q/aopRbQOEFcWmXSX2fvjgzBaPRCIodbVmlK0g 44YgskfUuF1/duhfYtygroT8hU3EFQZOUwSe8aVX5sqkaOlRvGorAJp1LkAQCUOxd9gS K+kQ== X-Gm-Message-State: AOAM530ykf5G3Bg7NKsqQ13PU0om/SQTBtTEU5LD546h0Wak8ARENqgB ia4z4FY04dvtMz27KVsTH6GZqU6f4Zy0nLnxLwOFIA== X-Received: by 2002:a17:906:6959:: with SMTP id c25mr21009671ejs.375.1595263968366; Mon, 20 Jul 2020 09:52:48 -0700 (PDT) MIME-Version: 1.0 References: <20200624203200.78870-1-samitolvanen@google.com> <20200624203200.78870-5-samitolvanen@google.com> <20200624212737.GV4817@hirez.programming.kicks-ass.net> <20200624214530.GA120457@google.com> <20200625074530.GW4817@hirez.programming.kicks-ass.net> <20200625161503.GB173089@google.com> <20200625200235.GQ4781@hirez.programming.kicks-ass.net> <20200625224042.GA169781@google.com> <20200626112931.GF4817@hirez.programming.kicks-ass.net> <20200717133645.7816c0b6@oasis.local.home> <20200717140545.6f008208@oasis.local.home> In-Reply-To: <20200717140545.6f008208@oasis.local.home> From: Sami Tolvanen Date: Mon, 20 Jul 2020 09:52:37 -0700 Message-ID: Subject: Re: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool To: Steven Rostedt Cc: Peter Zijlstra , Masahiro Yamada , Will Deacon , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux , Kernel Hardening , linux-arch , linux-arm-kernel , linux-kbuild , LKML , linux-pci@vger.kernel.org, X86 ML , Josh Poimboeuf , Matt Helsley Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 17, 2020 at 11:05 AM Steven Rostedt wrote: > > On Fri, 17 Jul 2020 10:47:51 -0700 > Sami Tolvanen wrote: > > > > Someone just submitted a patch for arm64 for this: > > > > > > https://lore.kernel.org/r/20200717143338.19302-1-gregory.herrero@oracle.com > > > > > > Is that what you want? > > > > That looks like the same issue, but we need to fix this on x86 instead. > > Does x86 have a way to differentiate between the two that record mcount > can check? I'm not sure if looking at the relocation alone is sufficient on x86, we might also have to decode the instruction, which is what objtool does. Did you have any thoughts on Peter's patch, or my initial suggestion, which adds a __nomcount attribute to affected functions? Sami