Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1781362imd; Fri, 2 Nov 2018 00:00:29 -0700 (PDT) X-Google-Smtp-Source: AJdET5dSY6y4TsCBcZr/Sd0+Ra7lKfiGiB0L/+SZaGH3c08/EBXD3Kpp24RLPO3O+rxEhGkq3fap X-Received: by 2002:a63:7219:: with SMTP id n25mr7295513pgc.324.1541142029884; Fri, 02 Nov 2018 00:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541142029; cv=none; d=google.com; s=arc-20160816; b=jSj2oAM6egTbNxm2TOzg2ZXTTXc4otdnmTC4zHA67TugJyi5BCtnF0DZotYuYP3MHs 6WOTQgHKqzZRB9Fv+VVHkyTh4HW5ZMBrUHuDf9mE25yYUNw2ipiLolfpX/4DuHMWtMVL XDA3vPAaDeaKVr8CIKHQFE3tQUHCeF64yAR3RGSUcF4ofjAve1ZewPtKpvtV9xkgYLT+ 0wLlbwbhGC6YCYbLRJzBZa45UBRVfB7K0MGlD5BN3/x+2nGZ5wjC+1lbqN90U4+2t5tU vLGvUfo1xBstzzMrdyrdqrAvRzmyr9+MdCzswBpfo34pkW8WBwa/VCKGZGnFlGCfE0Kn rfCA== 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=oGKqVzBLFi3yK2P0HA1Ykm89tRWCYN0ReIoLW4wKvkA=; b=PrBryTGzOtLEgWuVGCQqoMVMEcGS8fNTXJBWnlPEr5mLzyQAodcC2KOUCNTvf+KHBw Pci0q4WjrtsbQRm7UJzJTx1niu0kSRwihOcp0wq7yCccS+cTm3b/z/pCYW6vLqrTqyKX sjrvThbfAMQn6luDcW0lRvcSLfWuaGyIqKiXrRvZdqQSu29GZAUZjqwJhe43zvSz2x+8 mYQI19y33EPusRe0ElbMmkpRhZHblEAqXem7cnDcmkcrb9oJjAKavzggkd/x3og9+06c 0tZ6mGoX4jTX59zIg6SiVM5XaykPRPRLOSZTxX+NDroptjWVx59reE/utqS5DW6cr78x t/Gg== 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 o22-v6si22868193pfk.50.2018.11.02.00.00.15; Fri, 02 Nov 2018 00:00:29 -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 S1728451AbeKBQGB (ORCPT + 99 others); Fri, 2 Nov 2018 12:06:01 -0400 Received: from mx1.mailbox.org ([80.241.60.212]:50852 "EHLO mx1.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727551AbeKBQGA (ORCPT ); Fri, 2 Nov 2018 12:06:00 -0400 Received: from smtp1.mailbox.org (unknown [IPv6:2001:67c:2050:105:465:1:1: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 9F72B4B39A; Fri, 2 Nov 2018 07:59:49 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id N6g6TMfkTEix; Fri, 2 Nov 2018 07:59:47 +0100 (CET) Date: Fri, 2 Nov 2018 17:59:32 +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: <20181102065932.bdt4pubbrkvql4mp@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="3kv2w2345ipyd7tq" 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 --3kv2w2345ipyd7tq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2018-11-02, Aleksa Sarai wrote: > For kretprobes I think it would be fairly easy to reconstruct what > landed you into a kretprobe_trampoline by walking the set of > kretprobe_instances (since all new ones are added to the head, you can > get the real return address in-order). >=20 > But I still have to figure out what is actually stopping the > save_stack_trace() unwinder that isn't stopping the show_stacks() > unwinder (though the show_stacks() code is more ... liberal with the > degree of certainty it has about the unwind). As an aside, I just tested with the frame unwinder and it isn't thrown off-course by kretprobe_trampoline (though obviously the stack is still wrong). So I think we just need to hook into the ORC unwinder to get it to continue skipping up the stack, as well as add the rewriting code for the stack traces (for all unwinders I guess -- though ideally we should do this without having to add the same code to every architecture). --=20 Aleksa Sarai Senior Software Engineer (Containers) SUSE Linux GmbH --3kv2w2345ipyd7tq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEb6Gz4/mhjNy+aiz1Snvnv3Dem58FAlvb9dEACgkQSnvnv3De m58HVQ/9GjCMyDH7P29NqoKKhHNNyeyu64COmyciYvp58xSTJH+37yiVdMsL5evE FgRwPYWxVY0pFe8i8yfxeaiFsWN4KJDelldTKY5o2yD91tuD/g1s8zWqri8UOVYW 0+sdchSV15VcAwt21fnoFkGTFIYYJ6DtKI6mG3bxdVeNF/A7tPgZQ7mYJKlNWWKS jioKf6i/AkojePH5LVofA+6wwvGQe/pyV1mHIx17AN71P9fAvn5tEW6I8e97W0my FArFkLbYhpkk3p2rOxOKFLPqaxyQQ8lyCpSRnI/kGIYBHP7sUrplddVO9gHpLo9i 8OOj4/AyEzcK8Af9FweN8e57j/bUeEjR8Sdth8MH4ie6EC/N7129lWoCloUF3erJ XBrDtGog68p6r+L/s2k8AId8/eUnnjIaK/hoGw1NtPN6HBDunm899ufEnn8ADXJI hbKqMGhyUvItay/V8iZgufNfcJ8ZfaidkfvHLvRGz9lrjA27jR0OWwSjmPnvyA8i inNkW6rdLVO5EVjg5LolS2YKOXBTya/6ViCnA39HV+8b4oagTblJJBkw4sVoyaKQ IEbBAx9x3OFPK4Cnw1IG5wtoFp9RMCBO+XdKOkO3cKmlXSuD8D24HIzRWJD6M0ni 8iz59eUZrbB42sgen64CzJvPROtxQvdB1tvrsZ6vn/NeSsWfBs4= =+Zfh -----END PGP SIGNATURE----- --3kv2w2345ipyd7tq--