Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2931970iog; Mon, 20 Jun 2022 07:45:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vLphmeEngEdaegaYesz6fa6jr0/DUjF4DZZvqEZPLGiRLtunCjBsG5Ysfm/df3V7T3vbGD X-Received: by 2002:a17:902:ce88:b0:163:dbd5:9797 with SMTP id f8-20020a170902ce8800b00163dbd59797mr23914978plg.82.1655736314622; Mon, 20 Jun 2022 07:45:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655736314; cv=none; d=google.com; s=arc-20160816; b=wZAXjShUZeaEL3Y4FfHH0L12dnKokMyvJte+MGbbT2QMpRegxCtdSQ+aGndT+i5vq6 ezafOQH97zG3TtfA9+8UJaImpGlWBC0MuZ6p2gaSeAjEI64Jyl2yKMsmOLJ6cUhg9E0u S0gNsvcRiIqq1lOaY/1i872zSkLppzK7t5CXkfXeWO3uun1yvekOxnv7jHZkZNNWlFgn FHSs+JZEaB3E6wggTihAqeGKEmHy7UWeob93HUsYQPQX0n6PSXf9llh3QZPGRCLD1h8z 2Qk8+2ToCF9uMnVbYADApc9Gh0f5u22WdGWgpULUa4jtja04kieDyyhS2USV0yLTT0Ed HKIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=Ipg2T+kwI6HMTw92WH0ubns1Kd2qXT/hxfcGpub/kNE=; b=twyaAR457vK+dSgzsPh0j7dYdZbLo/lxq13/KiXFkh+qNi6phbBpfKFqA9vzRlxSrW qnBfNrmiI6fJqigp/5oE78oz6DCpRTdNpNuD5G78WWoKLHicBstNP94rzQTgbcDid5eD rPE9Iu92MyW0MUu9AVDBEghaiGvPkRNDz720zIfgNLcOlUrFPOjmeckhaB2n+B5tWPxP Scm/4+BIw3JxmUJL/fOD89KE1TL6tWEhYxocIPTEZh8T8GxnSZ6GhAMMr6XVzBneUjUJ ou9CdAYsAhYuw+O8sqILKPeb/VLWQoqBp0RrPeaZ7Cloc4MyZhP21CqCJ97GsT21vxb8 0xZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h19-20020a635753000000b003fddd12eb2asi16682132pgm.766.2022.06.20.07.45.02; Mon, 20 Jun 2022 07:45:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241645AbiFTMvY (ORCPT + 99 others); Mon, 20 Jun 2022 08:51:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240792AbiFTMvW (ORCPT ); Mon, 20 Jun 2022 08:51:22 -0400 Received: from www62.your-server.de (www62.your-server.de [213.133.104.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F19C717A9D; Mon, 20 Jun 2022 05:51:17 -0700 (PDT) Received: from sslproxy04.your-server.de ([78.46.152.42]) by www62.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1o3Gs4-0005hk-A0; Mon, 20 Jun 2022 14:51:12 +0200 Received: from [2a02:168:f656:0:d16a:7287:ccf0:4fff] (helo=localhost.localdomain) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o3Gs3-000Luv-UF; Mon, 20 Jun 2022 14:51:11 +0200 Subject: Re: [PATCH] libbpf: Remove kprobe_event on failed kprobe_open_legacy To: chuang , Jiri Olsa Cc: John Fastabend , Jingren Zhou , Alexei Starovoitov , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Masami Hiramatsu References: <20220614084930.43276-1-nashuiliang@gmail.com> <62ad50fa9d42d_24b34208d6@john.notmuch> From: Daniel Borkmann Message-ID: <1b813650-baac-a93e-97b0-11967080fdfe@iogearbox.net> Date: Mon, 20 Jun 2022 14:51:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.103.6/26578/Mon Jun 20 10:06:11 2022) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/19/22 3:56 AM, chuang wrote: > On Sun, Jun 19, 2022 at 5:17 AM Jiri Olsa wrote: >> >> just curious.. is that because of ipmodify flag on ftrace_ops? >> AFAICS that be a poblem just for kretprobes, cc-ing Masami > > Yes, the core reason is caused by ipmodify flag (not only for kretprobes). > Before commit 0bc11ed5ab60 ("kprobes: Allow kprobes coexist with > livepatch"), it's very easy to trigger this problem. > The kprobe has other problems and is communicating with Masami. > > With this fix, whenever an error is returned after > add_kprobe_event_legacy(), this guarantees cleanup of the kprobe > event. The details from this follow-up conversation should definitely be part of the commit description, please add them to a v2 as otherwise context is missing if we look at the commit again in say few months from now. Also, would be good if Masami could provide ack given 0bc11ed5ab60. Thanks, Daniel