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.129.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 1958C7CF18 for ; Tue, 9 Jul 2024 21:33:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720560810; cv=none; b=DXjg1RpfHuC03pmoX/JH0WQ3DyZO8soI7o/vPUOKXs7WOUnb4gSZua7eLMAaMLAhg/SPR87tqIKLG02465Hf1Oxe0sCpQ1DwYYtMvjJTEP9P5q+EyxcfGyYIpN+y8yPl+/w3ozLHt2yapJ6J+V1IaX8AgtGuBDY68NYhDVQFJpY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720560810; c=relaxed/simple; bh=NhqgCMPXWxlvbk1mFCgpxvPZzmPnVSOZnFqFzWoQ/k4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IA4Ees46cEIvQrHfP9Cb6I50147MaV0sfAhkD21a5fiNL9bKeK31wGXA54THLYLiwF3YU0M9jBV+nXq2SUkZzWXFpJpCDmRnJ5SfbKSD4aW0lt1G66Xl9oGgSCO30Vat5m/pjcyZgwQRtvDJMZ5oJdeWQQJBZxbh5Yal2guHzLg= 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=EdlQ6PyS; arc=none smtp.client-ip=170.10.129.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="EdlQ6PyS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720560808; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NhqgCMPXWxlvbk1mFCgpxvPZzmPnVSOZnFqFzWoQ/k4=; b=EdlQ6PySSDPRqnFuXh2iVishxL7N20/G7cGScctZLvGYfGtwPqJxfoKYbYiPd81V+5lIMj HsoEIOm6a2iCa7lD+jEvYgfTP4D8qhAuQ1Kb419mTiQ3iDuCjk70Xzs5T8xGEJfc6s3txn Gal6vsyLN2NjavEJPP7MlHEFzzMvj8E= Received: from mx-prod-mc-03.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-547-Vg5wCabsOAyyQk7Pn_0LcA-1; Tue, 09 Jul 2024 17:33:21 -0400 X-MC-Unique: Vg5wCabsOAyyQk7Pn_0LcA-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0812E195420F; Tue, 9 Jul 2024 21:33:20 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.6]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id D5D7019560AE; Tue, 9 Jul 2024 21:33:15 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Tue, 9 Jul 2024 23:31:42 +0200 (CEST) Date: Tue, 9 Jul 2024 23:31:37 +0200 From: Oleg Nesterov To: Andrii Nakryiko Cc: Andrii Nakryiko , linux-trace-kernel@vger.kernel.org, rostedt@goodmis.org, mhiramat@kernel.org, peterz@infradead.org, mingo@redhat.com, bpf@vger.kernel.org, jolsa@kernel.org, paulmck@kernel.org, clm@meta.com Subject: Re: [PATCH v2 04/12] uprobes: revamp uprobe refcounting and lifetime management Message-ID: <20240709211642.GA6162@redhat.com> References: <20240701223935.3783951-1-andrii@kernel.org> <20240701223935.3783951-5-andrii@kernel.org> <20240705153705.GA18551@redhat.com> <20240707144653.GB11914@redhat.com> <20240709184754.GA3892@redhat.com> Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 On 07/09, Andrii Nakryiko wrote: > > On Tue, Jul 9, 2024 at 11:49 AM Oleg Nesterov wrote: > > > > > Yep, that would be unfortunate (just like SIGILL sent when uretprobe > > > detects "improper" stack pointer progression, for example), > > > > In this case we a) assume that user-space tries to fool the kernel and > > Well, it's a bad assumption. User space might just be using fibers and > managing its own stack. Do you mean something like the "go" language? Yes, not supported. And from the kernel perspective it still looks as if user-space tries to fool the kernel. I mean, if you insert a ret-probe, the kernel assumes that it "owns" the stack, if nothing else the kernel has to change the ret-address on stack. I agree, this is not good. But again, what else the kernel can do in this case? > > Not really expected, and that is why the "TODO" comment in _unregister() > > was never implemented. Although the real reason is that we are lazy ;) > > Worked fine for 10+ years, which says something ;) Or may be it doesn't but we do not know because this code doesn't do uprobe_warn() ;) Oleg.