Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1825898imd; Fri, 2 Nov 2018 00:59:15 -0700 (PDT) X-Google-Smtp-Source: AJdET5eKmw98dIqFjPox8pfoH++XtcGSyaVIRY8yhsi3uGGxsVDxTwX5IZmaq4TV/OSf3G6qKqc6 X-Received: by 2002:a62:5a47:: with SMTP id o68-v6mr10925329pfb.31.1541145555278; Fri, 02 Nov 2018 00:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541145555; cv=none; d=google.com; s=arc-20160816; b=UKaVtbuVhOp6oCuilNVEWS/fQPpViMa8fYgFYkk6mKVzD2Qye22FHsZfiPzLiHXS+o I3IFRKolpi28E7tC+2Zmr8hqpvy7StozxyOlmVmVBj1eeqNbxymPRiMei/ORgokN18VP jzL65RAgnWQHw1KriDmhM/QiF/x7JhPq7Fj+WKyOWce2xIWSaX5rAlCuIlGyldy8eaXQ rj2mcFFyXTAzgiWi0mX9qoZavvjS4zLdwNyz6Zx6i2RkCu9TkZP0YLM09Gjvhi9Z6guM NDwG31vskAcUKrNBuNDnuvfJGXNkHSHLykrMAgP+tJ7F/6or5yyXbY9eHfsiFHBbfXCc KSkw== 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; bh=2k9uBVDmZwDzj6J2Avdm9q3ad6EzTx+qp/x8SKs9tSs=; b=VvAhrShDYiy7w0+TYyDHiksQxuKq9rvbHeJOYL9kjLU29dTYlEVYAqCv7kjFAFjaJu K56nwiophs0kW1GsuzjXUmYkZTtVEG8ZHn3wS4AejgC56iYtavWuyX9tcb63DC3tYVNX xyToqBXQGQ//yjCoGFxde3ol4P+t5ZYSxoOjBcZMskqk/p/vU61vlGtwUxdzdBw/Mwep 1/L2eeicJKyc4QU4fMqR+WFcr//brPV07Yk+JcojivkhWirHShZ5TVInyA+wiFquJAdS I/vOxBQKJAiVCyMMivz40KCDcD6uKZD2xykpSrmUtxu1Ea563hPaEW4aH/pvuD3hHn6o wIHA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11-v6si16879049pfx.102.2018.11.02.00.59.00; Fri, 02 Nov 2018 00:59:15 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728483AbeKBRE4 (ORCPT + 99 others); Fri, 2 Nov 2018 13:04:56 -0400 Received: from mx1.mailbox.org ([80.241.60.212]:11326 "EHLO mx1.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727387AbeKBRE4 (ORCPT ); Fri, 2 Nov 2018 13:04:56 -0400 Received: from smtp2.mailbox.org (unknown [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 100A543409; Fri, 2 Nov 2018 08:58:37 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id mW1eQMjYusdU; Fri, 2 Nov 2018 08:58:32 +0100 (CET) Date: Fri, 2 Nov 2018 18:58:18 +1100 From: Aleksa Sarai To: Steven Rostedt Cc: "Naveen N. Rao" , Anil S Keshavamurthy , "David S. Miller" , Masami Hiramatsu , Jonathan Corbet , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Shuah Khan , Alexei Starovoitov , Daniel Borkmann , Brendan Gregg , Christian Brauner , Aleksa Sarai , netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Josh Poimboeuf Subject: Re: [PATCH v3 1/2] kretprobe: produce sane stack traces Message-ID: <20181102075818.fk55mxb3snqj5rjt@yavin> References: <20181101083551.3805-1-cyphar@cyphar.com> <20181101083551.3805-2-cyphar@cyphar.com> <20181101204720.6ed3fe37@vmware.local.home> <20181102050509.tw3dhvj5urudvtjl@yavin> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ohgwqw7to7laxvft" Content-Disposition: inline In-Reply-To: <20181102050509.tw3dhvj5urudvtjl@yavin> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ohgwqw7to7laxvft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2018-11-02, Aleksa Sarai wrote: > Unfortunately, I'm having a lot of trouble understanding how the current > ftrace hooking works -- ORC has a couple of ftrace hooks that seem > reasonable on the surface but I don't understand (for instance) how > HAVE_FUNCTION_GRAPH_RET_ADDR_PTR *actually* works. Though your comment > appears to indicate that it doesn't work for stack traces? Sorry, I just figured out how it works! (To make sure I actually understand -- retp is a pointer to the place in the stack where the return address is stored, so it uniquely specifies what each trampoline actually points to -- this trick could also be used for kretprobes). --=20 Aleksa Sarai Senior Software Engineer (Containers) SUSE Linux GmbH --ohgwqw7to7laxvft Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEb6Gz4/mhjNy+aiz1Snvnv3Dem58FAlvcA5cACgkQSnvnv3De m5/Fbg//cNaNafzuvOJBuDYI+bTOXGARp3LQ1DyqUSj7Qmak6e5vxtjF6AQgkhs0 HH9bGvIXRfUaWU5bRSCMOkXsRVs3vsuQK7RkDjOx9n3AOtu5+eXay6k/opldFjcG qRXfiiplsB8ijwF6o1shm95v/g9hsr0hRuP7mxFGdqmbH17i7pJ0VEYFjAIS0+b0 130oOQvP119GVM3wRaOWN88N4DqVjCW5WWURfdWVzH31c9VQzSYy6p7Y/t0ZLkiW gOOi3/7JrE9dqj2Qp/+dSRa2MEzgD3mHCrcVTDwalR5NScuoDrJQEXHSkrRnborJ vZ8vDuwuVVNidRys7bH/EE4DSevswoExpNN1OtYKm6f7h3C35DMEyws6MgitHGXI F4yy07AUFoBUkMZKaFI51Y8gCQZEUv2MvLK+i+Pf0gW1nZNnORUOx4/WnVxO4XTZ IXoT/Exq8RMVnmEzOQHn6wWSgVLXQvel/TzwoDfbbZb4EJYbs9EevNx9QYcRhPYq Inte2hnvEW8MWufrxhJKHwE2lbMV90OX6bM4O+4TDZn1F8/Z5BdNI0xQ3K/zi4K/ dWeXvFhkiCPoLsORSzqeby5bUp6c8gjzPNaWQC8BrWwZuSSzX85Dtcs3qIMOrzIj smbXYhS0nE1FdEIqeZ6RWNPHLHGRyDCHAvZ8mz55H+4+ZIxtqv8= =kzT1 -----END PGP SIGNATURE----- --ohgwqw7to7laxvft--