Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp11179512rwr; Fri, 12 May 2023 21:32:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4MouSOUpNtZoDq41mg1NAxQxwu/SkCT99832I1xNrgmUJA+avfImysXgSCfzg0rHuuOZyK X-Received: by 2002:a17:903:2289:b0:1a6:6d9f:2fc9 with SMTP id b9-20020a170903228900b001a66d9f2fc9mr33236599plh.30.1683952370870; Fri, 12 May 2023 21:32:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683952370; cv=none; d=google.com; s=arc-20160816; b=JaYBuGcM50/bFYVzFfWZgkvUIb+NXxBVevDT+2xLXB+OfI3buBG4gg4OKr6j2mZQqT w53xjGEmebCnmoIH+YUcrd6ux688Pw3kCYbcqmi+ov00m3o2P1vG6VV4sgPAfwyUEhjV sdEDzxk958eUrrliqMo2s9fX5+XQWpvdxs0T5qHNkcImsOXoS+MYYx9Exz9+pXttkUbs EwUxy+MEAbl4d2Y9IJcSR5Csey5S3i+/xF+dxsoqPWAlpchTF6jbwn+uxaDtOqZoguWW ZX5Al9OOZ97nr+lQFVsdC5rPRR3OhWbc2WgkYI6InQjXdva59/9HDMNAfM4pjf1zl8L/ i/9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=226KvKH/HSeeDqIGOdfiPTn15MxhO+YeYsVpsmh9ZWA=; b=TfiYMqzyrPBVYRbAYZkr8VQxgazvbtzgcZIZaSz38OA5kC9iWuj3v9E3gbu+9OL9Nc Do6kSDDtWrZg8dz3qma1YOA8sc/L8F3QpoMXFNLO5Hh0gYaQYRNgWYID5axI6wSIsEOl 4afo7WtTd+H7mLbUQzxjhSqOF6RpgN3BjJogUJ1pHOJGSN383HR6Dai6nySOnQ5nDj9d 9AeMzyR/Tte4IXjq9tDsFMJk4zt4ZzmXSGCxP8IkFTs5jwY8PkWRP8z8ogT8xu+tyynf NPnYgXb7CpmRlbm3OX1LrAZFzBdDKGjigUIufLPXQ0OiSZR+ZA95JaNtFq38zbJqZYzl crMw== 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 b3-20020a170902d30300b001ab147e4543si10708942plc.418.2023.05.12.21.32.36; Fri, 12 May 2023 21:32:50 -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 S229882AbjEMESD (ORCPT + 99 others); Sat, 13 May 2023 00:18:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjEMESC (ORCPT ); Sat, 13 May 2023 00:18:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F4CA3C1E; Fri, 12 May 2023 21:18:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A9EA860BEA; Sat, 13 May 2023 04:18:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97846C433EF; Sat, 13 May 2023 04:17:59 +0000 (UTC) Date: Sat, 13 May 2023 00:17:57 -0400 From: Steven Rostedt To: Yonghong Song Cc: Ze Gao , Jiri Olsa , Song Liu , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Masami Hiramatsu , Ze Gao , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: Re: [PATCH] bpf: reject blacklisted symbols in kprobe_multi to avoid recursive trap Message-ID: <20230513001757.75ae0d1b@rorschach.local.home> In-Reply-To: References: <20230510122045.2259-1-zegao@tencent.com> <6308b8e0-8a54-e574-a312-0a97cfbf810c@meta.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,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 Fri, 12 May 2023 07:29:02 -0700 Yonghong Song wrote: > A fprobe_blacklist might make sense indeed as fprobe and kprobe are > quite different... Thanks for working on this. Hmm, I think I see the problem: fprobe_kprobe_handler() { kprobe_busy_begin() { preempt_disable() { preempt_count_add() { <-- trace fprobe_kprobe_handler() { [ wash, rinse, repeat, CRASH!!! ] Either the kprobe_busy_begin() needs to use preempt_disable_notrace() versions, or fprobe_kprobe_handle() needs a ftrace_test_recursion_trylock() call. -- Steve