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 41DA12FD7A0 for ; Thu, 4 Sep 2025 11:24:53 +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=1756985096; cv=none; b=gOwQHJbox2QxGGjb5sDwUluDw8yNBk3+zxjVytQJBL44bgOErGHwQ6U4cOlr1+pabC7wy7y8foWWYJfzGjKZrgGRnr42jcNx9cSbcZw8/KRNpR+awrxG5Rmc28nBUzbbx0MPWv096ay/Qlwa5K0trqJQR+MFpBG9pzpqATgcTro= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756985096; c=relaxed/simple; bh=kf+9HDiVeFZDHfJthh5dLpO1I207zVKh8nvH272oWPo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ofb6MG5RmDPj8MNKAEPuqm4dUPiE1u/eptoDfvkjmsWLwymfwtxZj8SjYl/9k+o+8veBULgPMlXVhePrGw5n/oa7sdEgjkq3NRJlCrerIvkO0lEatxviRoddUI12ZzqAuhQ8SuG1am7AqpSkGu+c1LIAH3i3J8j9yCNbbbEw7To= 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=UiqGOBRw; arc=none smtp.client-ip=170.10.129.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="UiqGOBRw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756985093; 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=NNlSWipseSmsVlx3oPXi/Dm4sWLczG9la9f/1OIiTnU=; b=UiqGOBRwKRnAZSyB4rd50GX7E8QG/F5ZzdVkVtnq2p2inbFqmkG62MkzHG5t5ZF61hFGd9 FuHs48pT269gb8RK4sFmD1+ohLc2Qd/hljG0eBuhRIc49KaOqVpyiIUKtRVLVW2zWWo35x UE2QdYzSEKv5vI3DD0WHGx72TSwPPF8= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-455-nqnVc4rAM9WkkRaS95Gtzw-1; Thu, 04 Sep 2025 07:24:49 -0400 X-MC-Unique: nqnVc4rAM9WkkRaS95Gtzw-1 X-Mimecast-MFC-AGG-ID: nqnVc4rAM9WkkRaS95Gtzw_1756985088 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9E0D91800378; Thu, 4 Sep 2025 11:24:47 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.226.52]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 481FE3002D26; Thu, 4 Sep 2025 11:24:40 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 4 Sep 2025 13:23:25 +0200 (CEST) Date: Thu, 4 Sep 2025 13:23:17 +0200 From: Oleg Nesterov To: Jiri Olsa Cc: Masami Hiramatsu , Peter Zijlstra , Andrii Nakryiko , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, x86@kernel.org, Song Liu , Yonghong Song , John Fastabend , Hao Luo , Steven Rostedt , Ingo Molnar Subject: Re: [PATCH perf/core 02/11] uprobes: Skip emulate/sstep on unique uprobe when ip is changed Message-ID: <20250904112317.GD27255@redhat.com> References: <20250902143504.1224726-1-jolsa@kernel.org> <20250902143504.1224726-3-jolsa@kernel.org> <20250903112648.GC18799@redhat.com> <20250904084949.GB27255@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=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 On 09/04, Jiri Olsa wrote: > > On Thu, Sep 04, 2025 at 10:49:50AM +0200, Oleg Nesterov wrote: > > On 09/03, Jiri Olsa wrote: > > > > > > On Wed, Sep 03, 2025 at 01:26:48PM +0200, Oleg Nesterov wrote: > > > > On 09/02, Jiri Olsa wrote: > > > > > > > > > > If user decided to take execution elsewhere, it makes little sense > > > > > to execute the original instruction, so let's skip it. > > > > > > > > Exactly. > > > > > > > > So why do we need all these "is_unique" complications? Only a single > > > > is_unique/exclusive consumer can change regs->ip, so I guess handle_swbp() > > > > can just do > > > > > > > > handler_chain(uprobe, regs); > > > > if (instruction_pointer(regs) != bp_vaddr) > > > > goto out; > > > > > > hum, that's what I did in rfc [1] but I thought you did not like that [2] > > > > > > [1] https://lore.kernel.org/bpf/20250801210238.2207429-2-jolsa@kernel.org/ > > > [2] https://lore.kernel.org/bpf/20250802103426.GC31711@redhat.com/ > > > > > > I guess I misunderstood your reply [2], I'd be happy to drop the > > > unique/exclusive flag > > > > Well, but that rfc didn't introduce the exclusive consumers, and I think > > we agree that even with these changes the non-exclusive consumers must > > never change regs->ip? > > ok, got excited too soon.. so you meant getting rid of is_unique > check only for this patch and have just change below.. but keep > the unique/exclusive flag from patch#1 Yes, this is what I meant, > IIUC Andrii would remove the unique flag completely? Lets wait for Andrii... Oleg.