From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA85C2119 for ; Sun, 25 Aug 2024 17:14:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724606078; cv=none; b=TDRVTHk+oHcMSH/b7/h/vz6ZTcbKBkUq9fh8S1nnnw8S9ftlLMarxroDew98LZmxDw3L0HdjXDynXc3+P+xzPNEkv+QjxSyVl6pWfjXGx9d8NS3guGFAo7yFmrWqCnXEn7ZwraCa4mjISzDnzv7z8UsRfEXudZncYTsAuAVGjSo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724606078; c=relaxed/simple; bh=AMSOCCJyqzA8QFEQQ/0JphwdxnqDaSyz7otrZX0MojA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PpdHZt5co/kNIkmBHqNC3NiY+h//BPBlL+4nhbyZzacfugiGwsfJ5Sspxx+s7uxcWGIFwebTyJmFXKQydKja9fUNaFZ2xJ0SIi7ui5NVVtCciYysfjyOWVs5mt20KkCevkWGUQlDo51A9Bu8qfDUJmV1hifyV46NH8Q3/o7fiRg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=KjTxEX8i; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KjTxEX8i" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724606075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AMSOCCJyqzA8QFEQQ/0JphwdxnqDaSyz7otrZX0MojA=; b=KjTxEX8iP8MdCqA7kl7y1LfbB5MjKr8ffXjS0TFJPbWcdJW+u64aVuxxENP0m95kXSAXoQ TcZ/vEWZn2uUA/EuzNnF914pAIElyp7M20CntK7khQqMMUMkOqW1cftqZVPpq2TW2kE59H dVRFgiUiWLh0kWUmhf1GAfWNcCO9sHU= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-474-L-Z8QlHHOziXoRR8Rs-LLw-1; Sun, 25 Aug 2024 13:14:32 -0400 X-MC-Unique: L-Z8QlHHOziXoRR8Rs-LLw-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E55C3195608A; Sun, 25 Aug 2024 17:14:29 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.12]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id EDFBB1955DD6; Sun, 25 Aug 2024 17:14:25 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Sun, 25 Aug 2024 19:14:23 +0200 (CEST) Date: Sun, 25 Aug 2024 19:14:17 +0200 From: Oleg Nesterov To: Tianyi Liu Cc: andrii.nakryiko@gmail.com, mhiramat@kernel.org, ajor@meta.com, albancrequy@linux.microsoft.com, bpf@vger.kernel.org, flaniel@linux.microsoft.com, jolsa@kernel.org, linux-trace-kernel@vger.kernel.org, linux@jordanrome.com, mathieu.desnoyers@efficios.com Subject: Re: [PATCH v2] tracing/uprobe: Add missing PID filter for uretprobe Message-ID: <20240825171417.GB3906@redhat.com> References: Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 On 08/24, Tianyi Liu wrote: > > A key trigger here is that the two tracer instances (either `bpftrace` or > `perf record`) must be running *simultaneously*. One of them should use > PID1 as filter, while the other uses PID2. Yes. > Agreed, the implementation of uretprobe should be almost the same as > uprobe, but it seems uretprobe was ignored in previous modifications. I forgot EVERYTHING about the code in kernel/trace/trace_uprobe.c, but at first glance I am not sure that your patch is what we need... At least I certainly disagree with "Fixes: c1ae5c75e103" ;) uretprobe_perf_func/etc was designed for perf, and afaics this code still works fine even if you run 2 perf-record's with -p PID1/PID2 at the same time. BPF hacks/hooks were added later, so perhaps this should be fixed in the bpf code, but I have no idea what bpftrace does... Oleg.