Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp770681pxj; Thu, 17 Jun 2021 13:30:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynSU/ohYVdAzcRZ8cxFuZ9ybZtSi2IKhAmT/LWu8XZ4fvrQVHiZVuFowHV/RIhSFz25fi7 X-Received: by 2002:a17:907:9c2:: with SMTP id bx2mr7238868ejc.322.1623961855870; Thu, 17 Jun 2021 13:30:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623961855; cv=none; d=google.com; s=arc-20160816; b=lSNWCtQJ/KhhhOMLaCOfhrFmGGlPsgvbJnDOdbB910JVGrD1GeZ1UB8iJazhuXo6EO Ont0V21Pqp/H3xwpStZntT5ZCeesGeh01SBSG7i+f/KWt4M8r+boWAgXNejNMxmm5zak E/LL5CMKoCWaqVtVVWPDFMWcjZcqnOA2wJEVILHm18OrSTPqGjswR0oMTCjcHWMezW+s Z/Gh58TSMC5umfvWpSfrl30ULyRFGd21GU/Dia1+TmMF/ZtROR4YvAanlnliE7xfT96v xPS3PGk0e7WrHSk8+nYcFXYVzffjDPQ1xRXhg1Z6XGQQKkx9RChDqpqExQS/ICjrU6tv rIDA== 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=mdN3+P74lXshSmLwmq8jXVTzzottgAs9RSBNmB7e3EA=; b=KgkrVeHjmwYdLmW1gUmQcBE7Fy1889VhSbCEyr+4K0IUI3r++eMmkumMQ0aUj+KstH 72BMo+zS8vsy5dz+n9a/N9ZN/aV26U/wLwvyHcgdI8VKvvLCzDXLOqVSdV7dyRGE+ihF mZylQVtkTSvERm3aC2+fXixxFIRGWvDRFREwbg43TYJzMBnVErbe7xd/rXfrsgRE56oG GFBEdhGYdmlTaYSnraN9ocZn8RzUzdGlAoVqbUWD1qf+xMBdLMFtvshSVoxj7EFRL1yq EnB81kJ5hpGiwNZxEuLWaDfqSnZKxeMXT5pvtXxhPqe7yCBhz5c1vsnZfUhjbe7HgcaE l+Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u2I9VloR; 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 de6si23668ejc.483.2021.06.17.13.30.32; Thu, 17 Jun 2021 13:30:55 -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=u2I9VloR; 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 S232935AbhFQSdY (ORCPT + 99 others); Thu, 17 Jun 2021 14:33:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231602AbhFQSdX (ORCPT ); Thu, 17 Jun 2021 14:33:23 -0400 Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D702C061574; Thu, 17 Jun 2021 11:31:15 -0700 (PDT) Received: by mail-qk1-x734.google.com with SMTP id j184so4543657qkd.6; Thu, 17 Jun 2021 11:31:15 -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=mdN3+P74lXshSmLwmq8jXVTzzottgAs9RSBNmB7e3EA=; b=u2I9VloRjp4sirTz6YED7fjPAlghS++A6VFWyEPCzv+f84jWGjOASSFHQ0bMqZdiOK 0cqNeehvUaMB8xr59Lx30f256fE6+pEPcvRco2ZO6bffKwFc0QICXscXhrx30D/zZS1e s4HpekyBUj4K+pXvm1M4FopfZUF4/I5NyQUw9ak2XwW4eqGHNs+CI7vm0RNiCUxA6Jba uJ7TloSlxBB4zIAIjeXORVNBfOQ6/TmzooZFvRlWjxsVDZtUPfjjZI/xrEZrnAON+6n/ 41vBO9htiyFGuENRGm9xeAPN2AHtdzIMGd3/hai66A8/rovi0coXMrqFAyOffDt04HTq g9eA== 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=mdN3+P74lXshSmLwmq8jXVTzzottgAs9RSBNmB7e3EA=; b=eJ7i9ywtwwyBpY+rH9rL9Qcbbocqstz7rOT5huwcv0lA2GMZJmD2UaOwri5CnD0CjS 15jmDQHvfz6n9MhMLh/a3pTMiPQeOksGZrYZmAii9zh3WtvC10F/ZtFO7qmbkk91kTqQ SCbRg22bGsf39pjmmjc6mpqflZFj2+2EhRAkrTBWxgqddUI/riFiUMSM5+sOgRNqJohn vY08xvHfxPllc1TevsGlwyJlI2mseQeTezbNWAJ4/0VvkZXE8jsvHteVbIoPDRy4ne3q Ssx3v+1W2HzLqpPZJlIXGn9c7KG0LxxYz1DEghwK+SWyzpzHd34IEqwQIy7o8t+Wan7D W84A== X-Gm-Message-State: AOAM532QSuq0kedwSxzt+TW468vvEGNbIm3hP/EGLsuxZ2IwmGipmWT+ EtxDPqSn35+sPNJqMabx9jsZoP3a7+4t5MGqA+o= X-Received: by 2002:a25:6612:: with SMTP id a18mr8397287ybc.347.1623954674508; Thu, 17 Jun 2021 11:31:14 -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> In-Reply-To: <20210617182159.ka227nkmhe4yu2de@treble> From: Andrii Nakryiko Date: Thu, 17 Jun 2021 11:31:03 -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 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 > > > > Is there any problem if you leave this patch as is? > > Hm, I must be missing something then. The patch is probably fine to > keep, we just may need to improve the commit log so that it makes sense > to me. > > Which unwinder are you using (CONFIG_UNWINDER_*)? > $ rg UNWINDER ~/linux-build/default/.config 5585:CONFIG_UNWINDER_ORC=y 5586:# CONFIG_UNWINDER_FRAME_POINTER is not set 5587:# CONFIG_UNWINDER_GUESS is not set > -- > Josh >