From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E41B283CB8 for ; Mon, 15 Sep 2025 21:29:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757971784; cv=none; b=pVnA6EfLs+dsRyKFqyzeE9aRbZ+EFN/0jH6pFHrTIH8/hV/pxRH2S5sYhtBMGvsgbfFe3As2eji04eA+uDWrzf2nFCrs0RJIxYDXbRck5IMFxnLD5EB/rHgCeZQ1fvuMcykc6i9Pv7HG4AP/t80IyA35anP7LxBuyfhP4GPutuI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757971784; c=relaxed/simple; bh=RUVduxfW+q1+xIpDUx9oew7SFp3YP2RX1oljyANBXE4=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hh40zyBjEACGU51XkaxgauSWY5yyK9dFkYXuZ2xbesOhAqupmbeIqQlSVuQyOAbDTEwi/T6oRZ5OeCZJJgKCnr+Gu8wgXSBhJvGijWIf6uv0fYjkeD1MSGkPuwtpM6iQHCl6a6M0cofiAgys/5KYPmJWne0RDwrQSEUof7ObXeY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=VPFp6fa4; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VPFp6fa4" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-afcb7ae31caso841022566b.3 for ; Mon, 15 Sep 2025 14:29:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757971781; x=1758576581; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:date:from:from:to :cc:subject:date:message-id:reply-to; bh=QUas9F/ATYTJ0SX50S151v/GKp7Qx1ja4tfTxLpr0QY=; b=VPFp6fa4lWuSnwBXuKEYb3/PH/ONtdheIf70Hf+TUw1LE6MaQoRXxtJhoBV5Ch9nXt RZSGOFLeYwMLBne2M2oR7XAmP3nbV9ffl1CmYRCa/fEVww2Pj5Jt4NnTaVr7Vr4uwKvb 35A4bplk5pJ+q4r1lgo+vJjZI1L9m7mnrQvLL0hpbT9dbab3nleNog+3J4DaimlZ/COJ z7brMKn594e5NgRfpndVXaq15IsEUCClHzl0ttPUHf6Mx+j23pUomUTj0QRlkKdbqA90 ci8GvEgEDyCp1q9wRqZsZ1cJxv9B7J2fpL5dxek5uMWHREkQTwFdTY0JYlUx96vD1ijX sS5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757971781; x=1758576581; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QUas9F/ATYTJ0SX50S151v/GKp7Qx1ja4tfTxLpr0QY=; b=tePtHYDtUylJSRc7w5AyuG1z6i/Oi2gn2HKe06YmuHNReUqMB5BuwF6LR9Y+tnrwFf lT27PIPpfBvMuiJNGOaDIOtiteKwC+Co/D2OuEAeX+Z0tI7gECJjWQPg9VgNH9QbsDS+ mKS0etbmjVWwuqSShf6rEuGsyTR8w036AD3Y9VdQ8F8xSzJdlzr5SBu1rHpizNeptbwr GtOVXAyftX0gXhtzk7G3TBQF9YhfJh0TDGrMY+uDdAnFRJfP8hZ5Y2iDhlT36VLhUHdN N70IlshTZNEH8wCd5KobeiyNmvmiBnioRoZlzKzx5vR7KDeMpgPRKcbSj5mJ9tejmxUI f9Mg== X-Forwarded-Encrypted: i=1; AJvYcCVeAb0LZmYOeaDTs2k14tbxQf6O1mru2dFlvkAo9PmscHhUuDclK+p5lD4iQC8bl41G6lLsAwrRP4pkqnM=@vger.kernel.org X-Gm-Message-State: AOJu0Yzn3fIl0QjTEb0Tu2getPvwzjQKwTFu/KE72JFYiBpoeLJns5MN 6rb2ZGOaW5ohvKYHl8SFqEsKMpXCv/96TGeMyj63hwUxGmVCvBty8lP7 X-Gm-Gg: ASbGncv1xRk1L1DB7oDWFxqWWDf52VoRnWlWldCaKJjRWcy7g/VvcxOjHzMlV38RBT0 tm9Z10l4hRtfLxHeQOuVil39vEHxOoMWBb/Fqhyjap+RdrocQ2vKZ0uXdID3T4qIsbkF1sEMcjs D8VyDiRIveB1BNKCSDloPzohGVMuoKH92lGyKUhMfOXkrd/sqVwI9tBT/GzxPdCnOkPfYLj9iIc 5gAERJt/K0iAGvVJzt+lAQFTB3D7YLg1o8+jG5CNYiVIDNbaAEMLS2tzuT2GkUUeKS1lco5oXMD g+Wjg/HShQnXPiE8B5BL5M6sHpxWqf0NGLhkSb4tVsK4Qy/e4lnN3R7bJvqWjyGtZwD/Igv2Cpd mfnadVv9sSejbbPILXHAaKqL7RtWZ/sxkHXjwWyo8JWxBFdMPKA== X-Google-Smtp-Source: AGHT+IG5wmhrzfoQv6frcbayV8TWGbdyF5my/3S+PId8ITD1HBtsuQZQe3hHDZN00pZEVUVkM/1bmw== X-Received: by 2002:a17:907:7e9a:b0:afe:ea93:ddbb with SMTP id a640c23a62f3a-b07c38673ccmr1371195966b.45.1757971780425; Mon, 15 Sep 2025 14:29:40 -0700 (PDT) Received: from krava (89-40-234-69.wdsl.neomedia.it. [89.40.234.69]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b09fea706afsm550131766b.91.2025.09.15.14.29.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Sep 2025 14:29:40 -0700 (PDT) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Mon, 15 Sep 2025 23:29:37 +0200 To: Andrii Nakryiko Cc: Jiri Olsa , Ihor Solodrai , Oleg Nesterov , 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: [PATCHv3 perf/core 0/6] uprobe,bpf: Allow to change app registers from uprobe registers Message-ID: References: <20250909123857.315599-1-jolsa@kernel.org> <7f591ac9-d3e0-4404-987c-40eceaf51fbb@linux.dev> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Sep 15, 2025 at 01:10:33PM -0700, Andrii Nakryiko wrote: > On Fri, Sep 12, 2025 at 1:55 PM Jiri Olsa wrote: > > > > On Fri, Sep 12, 2025 at 01:28:55PM -0700, Ihor Solodrai wrote: > > > On 9/9/25 9:41 AM, Andrii Nakryiko wrote: > > > > On Tue, Sep 9, 2025 at 8:39 AM Jiri Olsa wrote: > > > > > > > > > > hi, > > > > > we recently had several requests for tetragon to be able to change > > > > > user application function return value or divert its execution through > > > > > instruction pointer change. > > > > > > > > > > This patchset adds support for uprobe program to change app's registers > > > > > including instruction pointer. > > > > > > > > > > v3 changes: > > > > > - deny attach of kprobe,multi with kprobe_write_ctx set [Alexei] > > > > > - added more tests for denied kprobe attachment > > > > > > > > > > thanks, > > > > > jirka > > > > > > > > > > > > > > > --- > > > > > Jiri Olsa (6): > > > > > bpf: Allow uprobe program to change context registers > > > > > uprobe: Do not emulate/sstep original instruction when ip is changed > > > > > selftests/bpf: Add uprobe context registers changes test > > > > > selftests/bpf: Add uprobe context ip register change test > > > > > selftests/bpf: Add kprobe write ctx attach test > > > > > selftests/bpf: Add kprobe multi write ctx attach test > > > > > > > > > > > > > For the series: > > > > > > > > Acked-by: Andrii Nakryiko > > > > > > > > Question is which tree will this go through? Most changes are in BPF, > > > > so probably bpf-next, right? > > > > > > Hi Jiri. > > > > > > This series does not apply to current bpf-next, see below. > > > > > > Could you please respin it with bpf-next tag? > > > E.g. "[PATCH v4 bpf-next 0/6] ..." > > > > > > > hi, > > the uprobe change it needs to be on top of the optimized uprobes (tip/perf/core) > > Is this what you happened to base it on (and thus diff context has > that arch_uprobe_optimize), or those changes are needed for correct > functioning? yes > > It seems like some conflict is inevitable, but on uprobe side it's two > lines of code that would need to be put after arch_uprobe_optimize > (instead of handler_chain), while on BPF side it's a bit more > invasive. > > So unless tip/perf/core changes are mandatory for correct functioning, > I'd say let's rebase on top of bpf-next and handle that trivial merge > conflict during merge window? ok, sounds good, will rebase/resend thanks, jirka