Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp965262pxj; Thu, 17 Jun 2021 18:46:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOxHqgm8uK8d2aul84w8wkIc2NME7qrhXUNGVtFgWBQLxvkheHPq6W+dAiW6dIakHd/pXS X-Received: by 2002:a05:6e02:1a08:: with SMTP id s8mr5655692ild.5.1623980781956; Thu, 17 Jun 2021 18:46:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623980781; cv=none; d=google.com; s=arc-20160816; b=L08X2cgF8EgdA3JZuSeAGP5VnoasItQmU0WF23VLQH4H1TP02AlsZGkVlw4su82WwM B7PYCKdHb9lpt3XKRTQviItw6fR0BDA9TgCi1KVvR+TCOADHK2Ji9eXhwdSFrqJJ4HXy e3J/DFrqYPvNBIZfCX8wVN6OU3ZlBmHm/655YMZ/DK5JxtE2QylqOR2HKyqkq+W502Pf vwisEaNI7J4ht5k7GFuk7JH4dP793tlJf/usp/uPQKLawDT323eVj4P2m/+YCqAs9e/M aa2DDSPAoYJTFtP054SoxX4rriaT+TOEA6mSdvLli6XTBifnphzB94Fshj2cDmdBU2cE 8+Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=EHjhxQva9EqItRDnboJPSeBtoksB4yVp/cB0goEaX5s=; b=x4ybj8j4XJ/pjIxXIk5WRjwoST8XyJcDMqF0HtX2Rj8SXuqGSTN3MRFrxm59gVFdA1 3nyDM8e2HE8drejRDApEJ+MB5lzXeM044Q+XNT9wkaMZLPWKMTA6RIi6F7uDrW4+4QOK givOyxxoYymNaM0qzbiyLYyw73cm0nhGMH2blnKUJyKHX5R4wua56FgarmnfMa1X3BlU C+F2Ypa5jHUC3bEXGZWJHnPoOJhE/u3MpsIrkfR64Evr+XreIldkOzgeDZSMG/0y4Qdt VKd0nsYnTChcEWPtKh0v7CZUcIrNpMF0YgNl9zeHjFyoCSXKHCZoeYvegJGKIlvo9DwZ sXvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XamLhBaI; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q13si7470791iog.27.2021.06.17.18.45.42; Thu, 17 Jun 2021 18:46:21 -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=@gmail.com header.s=20161025 header.b=XamLhBaI; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232198AbhFQTsn (ORCPT + 99 others); Thu, 17 Jun 2021 15:48:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232094AbhFQTsk (ORCPT ); Thu, 17 Jun 2021 15:48:40 -0400 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5ED2C061574; Thu, 17 Jun 2021 12:46:30 -0700 (PDT) Received: by mail-qk1-x72e.google.com with SMTP id f70so5051982qke.13; Thu, 17 Jun 2021 12:46:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EHjhxQva9EqItRDnboJPSeBtoksB4yVp/cB0goEaX5s=; b=XamLhBaI1GSZ2+vrW/wyH0bL2nwlnwZAVwC3AWu7ot3as3odzo2hb7SQUDeKRjAmWH /UJyzlLnW1T13BGwTRNlyuJ3rFZscMsqsRXVKgTF0L0yGC2j8ux1oFuooO5MP/uKM27T Ox0R0jTY6guZIGAVJNqVo0MKVfvud5ukECGVrNEQVF4bqxE6bTILpBeQffgUbigHAKSY pF4quAMPijMQHO4PQOeL1nbVJbM45MPhz62huMfxruyoSsGwqYS9pmvl3LxzENRNGs1I F+ltt7K4+gR9fXEiF/DCs1mLkiuRJm0z3BTqbbocsMIzzGV9zSi8KCbabj8Hzttb+PF8 5hoA== 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=EHjhxQva9EqItRDnboJPSeBtoksB4yVp/cB0goEaX5s=; b=NwQEjaLP4HhvqtjceeLB3KwPuoUfuIU50fKt6Rj5ZwkJU+AuEMGJoaafo37X67UIix I4GKhuLUkH5S+w9gvBZlN8DgniiLZcSZL7YbeYvY0u2rTasC8s04Ipp053TJ7MYWlwpy ieglxwInW5NNHde/2ekhE/X6tUFZ8RZLQqXnBrZRnZWHX0DDCPk8TdV78Fuy0QcK8gyF xfM24OQW7LvPLHRe+oHp+Ij8IbBEo9dUe9mQOW1X69OKqSPxiNojMKEXE7GlnBJ5huZq pNmli3DhNXaMXilBTkS+Nv3RIvukaISeZsHCVy94xeI4q9KuohqYl1XAmgZGhwtDMFll sOmA== X-Gm-Message-State: AOAM532JlVLyDXYCP6cvtwdaqI4wKYdTJC+mL5o2JL8hgHS42brA5B85 Pe3QYTtWKYqv+6UH2hY1LPhKFIJFYIkDkH8tLMA= X-Received: by 2002:a25:870b:: with SMTP id a11mr828411ybl.260.1623959190021; Thu, 17 Jun 2021 12:46:30 -0700 (PDT) MIME-Version: 1.0 References: <162209754288.436794.3904335049560916855.stgit@devnote2> <162209762943.436794.874947392889792501.stgit@devnote2> <20210617043909.fgu2lhnkxflmy5mk@treble> <20210617044032.txng4enhiduacvt6@treble> <20210617234001.54cd2ff60410ff82a39a2020@kernel.org> <20210618000239.f95de17418beae6d84ce783d@kernel.org> <20210617182159.ka227nkmhe4yu2de@treble> <20210617192608.4nt6sdass6gw5ehl@treble> In-Reply-To: <20210617192608.4nt6sdass6gw5ehl@treble> From: Andrii Nakryiko Date: Thu, 17 Jun 2021 12:46:19 -0700 Message-ID: Subject: Re: [PATCH -tip v7 09/13] kprobes: Setup instruction pointer in __kretprobe_trampoline_handler To: Josh Poimboeuf Cc: Masami Hiramatsu , Steven Rostedt , Ingo Molnar , X86 ML , Daniel Xu , open list , bpf , Jakub Kicinski , Ingo Molnar , Alexei Starovoitov , Thomas Gleixner , Kernel Team , Yonghong Song , linux-ia64@vger.kernel.org, Abhishek Sagar Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 17, 2021 at 12:26 PM Josh Poimboeuf wrote: > > On Thu, Jun 17, 2021 at 11:31:03AM -0700, Andrii Nakryiko wrote: > > On Thu, Jun 17, 2021 at 11:22 AM Josh Poimboeuf wrote: > > > > > > On Thu, Jun 17, 2021 at 10:45:41AM -0700, Andrii Nakryiko wrote: > > > > > > > > I know I suggested this patch, but I believe it would only be useful in > > > > > > > > combination with the use of UNWIND_HINT_REGS in SAVE_REGS_STRING. But I > > > > > > > > think that would be tricky to pull off correctly. Instead, we have > > > > > > > > UNWIND_HINT_FUNC, which is working fine. > > > > > > > > > > > > > > > > So I'd suggest dropping this patch, as the unwinder isn't actually > > > > > > > > reading regs->ip after all. > > > > > > > > > > > > > > ... and I guess this means patches 6-8 are no longer necessary. > > > > > > > > > > > > OK, I also confirmed that dropping those patche does not make any change > > > > > > on the stacktrace. > > > > > > Let me update the series without those. > > > > > > > > > > Oops, Andrii, can you also test the kernel without this patch? > > > > > (you don't need to drop patch 6-8) > > > > > > > > Hi Masami, > > > > > > > > Dropping this patch and leaving all the other in place breaks stack > > > > traces from kretprobes for BPF. I double checked with and without this > > > > patch. Without this patch we are back to having broken stack traces. I > > > > see either > > > > > > > > kretprobe_trampoline+0x0 > > > > > > > > or > > > > > > > > ftrace_trampoline+0xc8 > > > > kretprobe_trampoline+0x0 > > Do the stack traces end there? Or do they continue normally after that? That's the entire stack trace. > > -- > Josh >