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 6859B3016F5 for ; Sun, 23 Aug 2026 19:41:45 +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=1787514106; cv=none; b=YPcBVdAWNy75pLW8QiUSs8q2aNynf6QO58DGLbNU2nLPZhHy1a0iIFtStBGfiqT79tQpwusjDTECYCIBtV0FpSeo2OffglY3F1JqHzSD3nVHOxCIMfk6lummmewgV6wX6/ZeNjW3/J1nNf1SGfmBAwlZKneajrU9knIfArREa4g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787514106; c=relaxed/simple; bh=sz0V2ZRk4ZCw1/+YsI06kjy62c2A7WZUFmknYSZ1RoU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YbgXIFbdIJHfA9t6MFUlzY5X7cAoH1FXmU5lij0RhzzyQmgty8yv++CyZgF8xZ83qxV3LeNCZt8CogYTB2tKpQ0adpFhOgdGBtkug0fTyZPvMWR2zwoq7FhBhexrpvgAB7S7q6F8/JA8gA53wq4xD7W/R3r9e9yUZVlPOjuSiEo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=VAHqiTb/; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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="VAHqiTb/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1787514099; 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=6jP9FYcrTlMrM2Opp8ZZKtUNy4FHbJ1LealZ0XwT6nI=; b=VAHqiTb/uhQrOOVBCncl1Ti0UEdYpbdJgGmWzyDgz3+zK3SNWCZ53hgaBttiYydz1Ns1wK ni9fHhYsRCYfFjvDLm/5pZ8L+T4bJMaALLTScdGhujrMvjJwIkQ4p2HwA4Px3gbom/BN5v BN0y8Y4cAO5EmoltSStUsG4Lg1ndfh8= 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-640-Y7EVpKeFMtayFHZ8eHTXTA-1; Sun, 23 Aug 2026 15:41:37 -0400 X-MC-Unique: Y7EVpKeFMtayFHZ8eHTXTA-1 X-Mimecast-MFC-AGG-ID: Y7EVpKeFMtayFHZ8eHTXTA_1787514096 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 72A771954122; Sun, 23 Aug 2026 19:41:35 +0000 (UTC) Received: from fedora (unknown [10.44.32.9]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 870F41800348; Sun, 23 Aug 2026 19:41:31 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Sun, 23 Aug 2026 21:41:35 +0200 (CEST) Date: Sun, 23 Aug 2026 21:41:30 +0200 From: Oleg Nesterov To: Keke Ming Cc: Andrii Nakryiko , Jiri Olsa , Masami Hiramatsu , Peter Zijlstra , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH] uprobes: Free utask on dup_return_instance() failure Message-ID: References: <20260822054620.452262-1-ming.jvle@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@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: X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 On 08/24, Keke Ming wrote: > > > Note that uprobe_copy_process() warns but returns "void", too late > > to abort copy_process(). > > You are right that freeing the partial utask is not enough. Hmm. It is not that I think "it is not enough", I think this is pointless whatever we do. Please see below. But you know what? I am afraid I am totally confused again, this happens more and more often. So please correct me. > Would it make sense to keep the cleanup But again, why do you think it makes any sense to keep the cleanup you propose? > and additionally send > SIGKILL to the new child when the uprobe state copy fails? Or SIGILL like the rest of uprobes.c does... Yes, this is what I meant. But this is only the first step to cleanup this logic. I'll try to write another email tomorrow. Lets suppose we change uprobe_copy_process() to kill the child. Then why do we need to call uprobe_free_utask() in dup_utask() or do anything else in copy_process() paths? The child won't return to userspace, it will exit and call uprobe_free_utask() itself. > Also, should the existing "dup xol area" failure path be handled > the same way? Yes sure. But perhaps needs another discussion. Oleg.