Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5349297ybi; Wed, 12 Jun 2019 00:42:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxP/WbIhWNtylsQIH/COosFQowfleaYME5gbeIF+uxjv90uHgzW0ReiDw+BEB7Zsn8zTPQw X-Received: by 2002:a65:62c7:: with SMTP id m7mr24251986pgv.223.1560325366736; Wed, 12 Jun 2019 00:42:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560325366; cv=none; d=google.com; s=arc-20160816; b=lz+r5ia5z6VZxKxownKxICUKNFawWtOsld1+zKvFQd2Ibk+Dy/LAJ985ZcMHHMVR7u IXIqp31dIcEwjBZbdxbCoINdEsY9xrUo6Jpc8weV7Mcl8vPhN/Q7CVyYEotVwAwZvw88 uJOhgCQTsDUlPQOQHmi3upTFxc9vJpXe3//7zecoJagbjO091ZK1HXzYB4Bi6tI+IXXZ JhJAY8vdr4IhOyxtVQe5PxphzQPJ6kUeQDjCZ1W0H/BKggZiNGmhrtw3snR2Wib4pcVw w15F+YrCKUK2RW4pxQGMLYNvo3pJAA/GpA9we+x/zMCn3nzAExSceWlDkgyOpT5n2yHo SCLQ== 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; bh=Mlmm+dzPC0ewYquh28hWF8jRTZzihUvRv0wki2nr65w=; b=XjkMD6SYroksq+HzuTm5JXKcjHEvSBjMRkRFEgfPXSRuqlAwjWZfiN/8JaUv5OKMOp ZYi6PqZgf+NH4EXx/0JLfW4jnixDOXF23FlO0LX4Kwh1phyzBL7XYD981flXfGWNNmMM 0Qrw2QOqOzQK7oaVhm7n+G54gSkXINpvh/LTxlBhtdVkmXaQuELPODS3fj3cHu4qEPOR l1e8H2PshFQHqtSnCq4L8Lx1A2jImHXfeq3nHZG/NL/DPsMjn5IV3krb0NPA4aQnnEy2 0ovJtP6TtyesIkCipvCjmkKjbkvHOK2/flh5x2PcuFv2HVpKpYz5UBnjrnYJKvd4R80/ YnEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 23si14738295pgc.469.2019.06.12.00.42.27; Wed, 12 Jun 2019 00:42:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436494AbfFLDFT (ORCPT + 99 others); Tue, 11 Jun 2019 23:05:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49286 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404957AbfFLDFT (ORCPT ); Tue, 11 Jun 2019 23:05:19 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 50A2C8553D; Wed, 12 Jun 2019 03:05:08 +0000 (UTC) Received: from treble (ovpn-120-37.rdu2.redhat.com [10.10.120.37]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3AB7D7DFCA; Wed, 12 Jun 2019 03:05:03 +0000 (UTC) Date: Tue, 11 Jun 2019 22:05:01 -0500 From: Josh Poimboeuf To: Peter Zijlstra Cc: Kairui Song , Alexei Starovoitov , Song Liu , lkml , Kernel Team , Alexei Starovoitov , Daniel Borkmann , "bpf@vger.kernel.org" , Steven Rostedt Subject: Re: Getting empty callchain from perf_callchain_kernel() Message-ID: <20190612030501.7tbsjy353g7l74ej@treble> References: <20190522140233.GC16275@worktop.programming.kicks-ass.net> <20190522174517.pbdopvookggen3d7@treble> <20190522234635.a47bettklcf5gt7c@treble> <20190523133253.tad6ywzzexks6hrp@treble> <20190523152413.m2pbnamihu3s2c5s@treble> <20190524085319.GE2589@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190524085319.GE2589@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 12 Jun 2019 03:05:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 24, 2019 at 10:53:19AM +0200, Peter Zijlstra wrote: > > For ORC, I'm thinking we may be able to just require that all generated > > code (BPF and others) always use frame pointers. Then when ORC doesn't > > recognize a code address, it could try using the frame pointer as a > > fallback. > > Yes, this seems like a sensible approach. We'd also have to audit the > ftrace and kprobe trampolines, IIRC they only do framepointer setup for > CONFIG_FRAME_POINTER currently, which should be easy to fix (after the > patches I have to fix the FP generation in the first place: > > https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/log/?h=x86/wip Right now, ftrace has a special hook in the ORC unwinder (orc_ftrace_find). It would be great if we could get rid of that in favor of the "always use frame pointers" approach. I'll hold off on doing the kpatch/kprobe trampoline conversions in my patches since it would conflict with yours. Though, hm, because of pt_regs I guess ORC would need to be able to decode an encoded frame pointer? I was hoping we could leave those encoded frame pointers behind in CONFIG_FRAME_POINTER-land forever... Here are my latest BPF unwinder patches in case anybody wants a sneak peek: https://git.kernel.org/pub/scm/linux/kernel/git/jpoimboe/linux.git/log/?h=bpf-orc-fix -- Josh