From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 2BC4D3EB813; Fri, 3 Jul 2026 14:35:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783089315; cv=none; b=DlBiuN22zanKSqoF6gJuil6lU35+dcdPd9Ya2OEakB23uzcSNSbzErShWU3X6bnDiTziPUMhhCa1nk4knz+ukP830/6Twk8/17xw6i7i4BJ/rkX+zO6jF713I1HWiJULflyhs0kMDG1xCs+JZ7jy6ns+5fuFujm7iGoCa2rKsPs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783089315; c=relaxed/simple; bh=hiwG/Wz0OBEatUr5T83ycDkbixiXmZ5+uWNnV+RrZ14=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=AujFSP77nuFMT0CNup1LKd0F9xqOxcuGR+2qpfrstS3op/ezyQqlZoZJ+UQjEwaN6uaJn1OQGWKnf0/cNsEu5+SeygP2TphGEC39cGkjYcVKKCYjDUv+SS6+6gATgQlI4aGWP7owR1niOXcWDPp3+a/uaVyFQ8S9DD1vgsGt4Ng= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=SpMAmiS8; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=rB7zfW04; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="SpMAmiS8"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rB7zfW04" Date: Fri, 03 Jul 2026 14:35:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1783089310; h=from:from:sender:sender:reply-to: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=5FCbRCY2zAT5GlCGbcWMpDYtP+8PIS/1bTicoaDNXgw=; b=SpMAmiS82ynfNutsiQgKX5LGxZxMgCRZxwf69sTUYJAWgmg1bZ0kK1cN/APyLAghvXyRk3 iStoykf0GATCzNzDqj20UiA8C5fya8akaFEr1lq8wz7Wu1nJkByZufLnHTH6S1ki6NyPoH Zli6vnGPplnB+118zPIXtHHGTDTvuBfAUGRovjpIn85p16PzMsMjj0paohZw+M7Ua2oZqV JhNIPpnsnUXpryDSlh++qblWd15hvxw1RVV/Jp7tmHhJn9pyE6DevvyGlKRzCdMXU+VJfj UOIldbVq6fNcMwIGZ8Zw/rc84Yd6IcmQr1tNSBoLdzSC+lOaTLPKdF3GRmKpGQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1783089310; h=from:from:sender:sender:reply-to: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=5FCbRCY2zAT5GlCGbcWMpDYtP+8PIS/1bTicoaDNXgw=; b=rB7zfW04wZqOqt6CehyxJ/blhDhHM28rw8kBrSp5b9hBZrGGSPu0/SBUr94XsVlzt5CiKA j7iqHfoRAzKM48AQ== From: "tip-bot2 for Jiri Olsa" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] libbpf: Change has_nop_combo to work on top of nop10 Cc: Jiri Olsa , "Peter Zijlstra (Intel)" , Jakub Sitnicki , Andrii Nakryiko , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260703114917.238144-7-jolsa@kernel.org> References: <20260703114917.238144-7-jolsa@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178308930864.3843924.6189769470992755436.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the perf/core branch of tip: Commit-ID: c005cd83b07a0ea1ffe3115f321ed3190fb3894b Gitweb: https://git.kernel.org/tip/c005cd83b07a0ea1ffe3115f321ed3190fb= 3894b Author: Jiri Olsa AuthorDate: Fri, 03 Jul 2026 13:49:10 +02:00 Committer: Peter Zijlstra CommitterDate: Fri, 03 Jul 2026 16:30:36 +02:00 libbpf: Change has_nop_combo to work on top of nop10 We now expect nop combo with 10 bytes nop instead of 5 bytes nop, fixing has_nop_combo to reflect that. Fixes: 41a5c7df4466 ("libbpf: Add support to detect nop,nop5 instructions com= bo for usdt probe") Fixes: af734a7ddb4e ("uprobes/x86: Move optimized uprobe from nop5 to nop10") Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Jakub Sitnicki Acked-by: Andrii Nakryiko Link: https://patch.msgid.link/20260703114917.238144-7-jolsa@kernel.org --- tools/lib/bpf/usdt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/lib/bpf/usdt.c b/tools/lib/bpf/usdt.c index 57fb82b..d2ecd3d 100644 --- a/tools/lib/bpf/usdt.c +++ b/tools/lib/bpf/usdt.c @@ -305,7 +305,7 @@ struct usdt_manager *usdt_manager_new(struct bpf_object *= obj) =20 /* * Detect kernel support for uprobe() syscall, it's presence means we can - * take advantage of faster nop5 uprobe handling. + * take advantage of faster nop10 uprobe handling. * Added in: 56101b69c919 ("uprobes/x86: Add uprobe syscall to speed up upr= obe") */ man->has_uprobe_syscall =3D kernel_supports(obj, FEAT_UPROBE_SYSCALL); @@ -604,14 +604,14 @@ static int parse_usdt_spec(struct usdt_spec *spec, cons= t struct usdt_note *note, #if defined(__x86_64__) static bool has_nop_combo(int fd, long off) { - unsigned char nop_combo[6] =3D { - 0x90, 0x0f, 0x1f, 0x44, 0x00, 0x00 /* nop,nop5 */ + unsigned char nop_combo[11] =3D { + 0x90, 0x66, 0x2e, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, }; - unsigned char buf[6]; + unsigned char buf[11]; =20 - if (pread(fd, buf, 6, off) !=3D 6) + if (pread(fd, buf, 11, off) !=3D 11) return false; - return memcmp(buf, nop_combo, 6) =3D=3D 0; + return memcmp(buf, nop_combo, 11) =3D=3D 0; } #else static bool has_nop_combo(int fd, long off) @@ -822,8 +822,8 @@ static int collect_usdt_targets(struct usdt_manager *man,= struct elf_fd *elf_fd, memset(target, 0, sizeof(*target)); =20 /* - * We have uprobe syscall and usdt with nop,nop5 instructions combo, - * so we can place the uprobe directly on nop5 (+1) and get this probe + * We have uprobe syscall and usdt with nop,nop10 instructions combo, + * so we can place the uprobe directly on nop10 (+1) and get this probe * optimized. */ if (man->has_uprobe_syscall && has_nop_combo(elf_fd->fd, usdt_rel_ip)) {