Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1334008lql; Tue, 12 Mar 2024 14:03:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX6vG6F5/M3O0TP2qTJQB5IQjcuVybPWMSaT81d0Md3AnsYl0Me/PT31Cwcpwpu5f99yoY3bZ0v/xFLgmEm6ZBm5gZCmaOZbf+vdKwyqw== X-Google-Smtp-Source: AGHT+IFnykH4HDXDmg0h4an31mM4qp/8ALvZlnLRYc3LAkLpG4qGF+Xd9ulqJeEgpmogjLCKIXdN X-Received: by 2002:a17:902:7593:b0:1dc:cc64:b3e0 with SMTP id j19-20020a170902759300b001dccc64b3e0mr9065311pll.69.1710277393882; Tue, 12 Mar 2024 14:03:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710277393; cv=pass; d=google.com; s=arc-20160816; b=WfaORsQOBYNW11aF5dfLPG3Sg2TsMonNDMpvpqUsjPGh7YDXA+xXMnWbE96mMJPMdu sYk3Z05tmXsOut3AU+e70JEsTycU9/4XM9JuIA0DdYGQJ45TwcrJEmI1y36rYBgjQ8ZB 72UPN48ohp7TjD03aX+YqhWq1VYroxvUo6hcTHkRZMPPwFszKNsgZWwk4VV8+NdJm7xb rDKShDEB+R2KgdwBjvT22TB5tPGmBRhyZ/P0UyJXLvonVzu2Y+YC4w7IeSnGeWFGd57U fwHiW80FLcNUY0/xdGOR9KtzkIsEAxTHKQeiNLN0ThmAsP1cZyGEkpIIMU1zW4b6TJpE lBsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=D07zNjDV1HO9RN9pvpbCTDMcjJeOgNnduY9GDeejplc=; fh=0qQPKOFUT15UTD0xCmXTEuWjqLr/MXy+4Gonq0/3LSk=; b=DBMiP9rUUGHedIuiW0tkkL/KrHPbnTtTRuxr5mLvF3OQCEdVHjVIt2A4vxIEI6SvPi pdMJuzBqy01L7FysRt3UrdKybBUtJHlyDwycZiEM5w6KmEKUXTnO47As9LSXSER0Joq0 KPThxS3hdLkCL0UmitViHwq0B+ciZf4FE9EGVhXVvkhC3I0YUgHT8oje54HTfH0P2pUH r2V5onR3TKgmpHmK0HIxkmDviGN70fQS1rK027BGlZc0mVYlucEjl4Tfh6zxJVq1fDtL ZaPMb7+juw2KvkZuAAGEyXimiyZOH3be8PruSRYP/PYS7hWNeigP+j0rDhsbIFidt8n0 5oKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ox0nReLD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-100782-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100782-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e11-20020a170902784b00b001d717e60007si7469574pln.397.2024.03.12.14.03.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 14:03:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100782-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ox0nReLD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-100782-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100782-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id CABDCB21F24 for ; Tue, 12 Mar 2024 21:03:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D66E143C41; Tue, 12 Mar 2024 21:02:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ox0nReLD" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4F2F67E10A; Tue, 12 Mar 2024 21:02:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710277361; cv=none; b=WRpWAOcuOA0rvwwsgie1w9sPyE3/yGdwUS9juKk4SU3Nz4JiUdwd0UA/nA9UCY2g149lzb4TjAlMhFX6tm0zr5SOkIRmBJkmP9bQfP0astZb7YOxVUiqQgNPqx67/wZ3MZ7qJUqJNulbtnF4bl9ZSt66pUV5RcNPPK8kYuH2+7w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710277361; c=relaxed/simple; bh=YlNA7A0sYPEuL9IKdifj0rW3/JYLzAH/grxbO4vJ5O0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=VH0uWCfZh8c2SG6cnIGDGNUa8c6qvkbB4iNXs5UDe635BEfUzCIF2lD5bUvltu77lu8wRpfm5t8xUbMf9rYr4WDnjTgxvHFGdU2+7dTJoESSlHF+26BKTkY4BOKK9UfGMz5TkSBCkDBz0e/KfRXXKpzRbihb3884UgB+Fi0GRMw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ox0nReLD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A206AC433F1; Tue, 12 Mar 2024 21:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710277360; bh=YlNA7A0sYPEuL9IKdifj0rW3/JYLzAH/grxbO4vJ5O0=; h=From:To:Cc:Subject:Date:From; b=ox0nReLDeVd3EpvJMY/kz/bsPA3yTNvQ4A3p03uIMcopsoiToYMYhCEiDVdUAVRuv JMKQrpPWO+Z1XLZ5efh9OXHyme8+H1u+dd92AmGS7Z+T85BNwiCa3VVUsYuHM8dsFo j1m/IVuy+3i1g18Knq4VTEMazsZOefqowYwmoUgK6NSA+uOgSo6M+Kjg2viqYMCkgn 87oKz8G7EP43y3m7DBMMFtPM+F6R8Zurdx3C7ktVx6VbMg65djb4GDKWXhiiVcjJvw dJxGwk5ANPksNNexYCD9zxEHpgEZhhb8NrSxIE29vnRorqc2XsMuoWR/8TXTk8eL1s o2Uog59yzlAcg== From: Andrii Nakryiko To: linux-trace-kernel@vger.kernel.org, rostedt@goodmis.org, mhiramat@kernel.org Cc: bpf@vger.kernel.org, mathieu.desnoyers@efficios.com, linux-kernel@vger.kernel.org, oleg@redhat.com, Andrii Nakryiko Subject: [PATCH bpf-next 0/3] uprobes: two common case speed ups Date: Tue, 12 Mar 2024 14:02:30 -0700 Message-ID: <20240312210233.1941599-1-andrii@kernel.org> X-Mailer: git-send-email 2.43.0 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-Transfer-Encoding: 8bit This patch set implements two speed ups for uprobe/uretprobe runtime execution path for some common scenarios: BPF-only uprobes (patches #1 and #2) and system-wide (non-PID-specific) uprobes (patch #3). Please see individual patches for details. Given I haven't worked with uprobe code before, I'm unfamiliar with conventions in this subsystem, including which kernel tree patches should be sent to. For now I based all the changes on top of bpf-next/master, which is where I tested and benchmarked everything anyways. Please advise what should I use as a base for subsequent revision. Thanks. Andrii Nakryiko (3): uprobes: encapsulate preparation of uprobe args buffer uprobes: prepare uprobe args buffer lazily uprobes: add speculative lockless system-wide uprobe filter check kernel/trace/trace_uprobe.c | 103 ++++++++++++++++++++++-------------- 1 file changed, 63 insertions(+), 40 deletions(-) -- 2.43.0