From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.170 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796446218; b=i15P0luHWVdJjlRBp/TV9TPqmkH2PPCvUdZdqf9RNQdiEh6q/b0TkWHya04R+nY7pkeo evNwD00HEZ/Bw8R2JVz9jWa6U1VcVNT7OU64pEuoVaWvVlVA8AKjDUs6oePsoJSD4TrEd k9tbL1YU3vKatAFL9h75XfvTuvfrR4sR6NvbgEr4lj8yf/SXcbiA58klDNDykf0WQyGTu lFn3bT+zHWedwdc2Gu+mEyHtszcZoF99XOuGm8O6R59lVle/uME0olYD6yx9z5n4OsP8P EyP/p0/l/B/aqv2qrhB6IrQJi3ACBsUrTfLbveK1cw/m1191kYqhEwlWFaMgQSTAxeA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796446218; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Content-Type:Date:Message-Id:From:To:Cc:Subject:In-Reply-To: References:Content-Transfer-Encoding:MIME-Version; bh=Y5g3AAM28DSYWuzT594qNNCMuY1DZj5WD3M6F2PIFYI=; b=tbAiMxdrITug4uwjuGrA7NToKb9mVAOFyzos3y7B9YDK0TDGnuyBR9CGmkMQKyDcBUqI luOCDCdfqeEbnrxG+aQlh45ifw/ioskfvpwGkteqbGG0a7gXK0QWy4xCiPZHbaOx0t3Bk 32MuxBZ5rfuoGKPvU+mz71bkXGKNFCiWXqK6M8CjqnMxXXKgwGkAl+jyiEy07fLFu4mAf U8YCiDAtg/4kliHC3QGOT+fNcuZprtuAt/0aADQhSGThFfIkk18Ahyx1zxwhGdNx4gNy2 SxOEVYpigZqiEN9B3ES9cWdsldbi7MblqpMQCCMxWV2A7ubrPDFYowiHZ3KAE2URd7A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=C2IBffHJ; arc=none smtp.remote-ip=209.85.215.170 Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CCEE5606A335 for ; Sat, 5 Dec 2026 04:50:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CCEE5606A335 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.a=rsa-sha256 header.s=20260707 header.b=C2IBffHJ Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-cde4b4e936fso1454655a12.1 for ; Fri, 04 Dec 2026 20:50:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796446217; x=1797051017; darn=vger.kernel.org; h=mime-version:content-transfer-encoding:references:in-reply-to :subject:cc:to:from:message-id:date:content-type:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Y5g3AAM28DSYWuzT594qNNCMuY1DZj5WD3M6F2PIFYI=; b=C2IBffHJzM1KlyQo7RNN2rlygzVP4bi0/HsOM4tdFuztpBszsk27ruXMP2YwNKqS3B 3pCoIoD0amGSbi7Y+ShcvM1a5RruCLHvH93Aq8WAZzjzAIC5q7eLC1BtaPdjQ8nC1Syi Md0Tad2z5b7J02LQjVd/oteYaCzk6Wp16LXE6A/Z6wvE75L43NOt0SA3s3PBF68ClIr+ /KQ4N47CiyTrFh4dgvVDrUc4a5Gj3uMe6gv/+8SydLXicG/CfMIQ57GZnjh4oRTB2aN0 F77+CbRzi5MkhmRysOig54f8xoqjgFw6mkD3RrI4Y6Qrk6C6yvI9tg/HRqKkXOCHMpth wKXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796446217; x=1797051017; h=mime-version:content-transfer-encoding:references:in-reply-to :subject:cc:to:from:message-id:date:content-type:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Y5g3AAM28DSYWuzT594qNNCMuY1DZj5WD3M6F2PIFYI=; b=0hxgDKCnFGuct/Y3TdVI1qlOC5Xys126PJuqFO653vJJY7gETHfa6IP8++GoyoWC74 wzturQyPJ0/QzyqvAFZTbcFnpSdUYGqm6cqE9Y0cyMuOe3BHEf0mnsqXPdRlvcZvwo2F QEn1K7oSrBkuGkhjcXitqgC6gHf1U3Bdc6vHhHUfznekVtcubmQn+LoZXkYdGO3VfyHT y3pRX7bl483vOVGyJw44ia8xCOlPqGb8lnrz+UdXsEmFmFiMMSP6Dk8FbMJF0sR7yR1e jLlSyUqTpW4mq+4IyNMFm9M4NOsYEpWMSap5l1XqhJJLEtyNZfhmDrUfVqfyCnTacWIn FJEw== X-Forwarded-Encrypted: i=1; AL+hErFs9Somyg7oI5EXvtEtNoY3COPNyIkyMpGXnIVYkH3ZQeE/RtiqeEgARKwZqbSuxQlQ07I=@vger.kernel.org X-Gm-Message-State: APuU4Z8+Xvj6DsPNdQEgViwz/ooWUe7MLOHIwK3EzMRHkTGkalNamHW5 KWzENaLg6o3ZIDNQtCipwXBG6bArxNat+X9cJsVobG1PHvhn8BDEbFRf X-Gm-Gg: AZFdTZesuNaZUaooU0zXU4hUl/HicK7ryEbIRpPiugWgbzMNU4wfttcXZBBvAATotad FQ7a+lpy7KEjN/j6vBwZzofM12IgwV9pOJpSRaXEszLJLTbHaeMsdWjxmHiPoqehmUovDcqD7h/ PEgtIcwfOEjkPiemYSqL+hKQn/jl0eVVc2LtuO48d3cBWz+oxzjDws/66RQI5kM8BgmFxgM3L+7 cF6gPRJkA0Yh0wKTDaT1KcMQmKvXutChuSySVvoBgN6Mex2XnyBofnICvDb9ThtsgxKSA9+28+W ZZU4vOjoNb3ZCZ5E44aZks8HS4Rgh5k/JVty7gVb31S29ctjtKRDNepAYG6+RCEucluRk1q1/m4 wY4Na7BqjKlR0Cv5J3ceW+5wmLC6qLCbUnIQCXkkL6KnrrT6mmQC36sXuZup8jF9JKIALZCxbJX Fs6RmTBjoEoCCOqqG8t8AXnXsqLcE584ulSogZiqiNWBRyNHLui7OU+YkCTr1OTC6vRqIwdWEsR seKrwyF6XMiZf7tPZ7yPxWNz4uVR0n8wkq/JMGQjlg1IBLBLsCHrdH4eQ386I0K+SogvgZryPXU 0iCKIKpQ7kHzP68LAOCOp4Sdffu0gZKYi1RK/PHZRlOfQ4L6yD/HVzgoV0ALrU6BKbHe6GqZZ/1 ANf8tv/yowhB+f+bd6V2JRwJF0NP+0oDjpRQ= X-Received: by 2002:a05:6a21:3b8c:b0:3e2:8c23:4d6d with SMTP id adf61e73a8af0-413f92b11d1mr5867166637.15.1796446216845; Fri, 04 Dec 2026 20:50:16 -0800 (PST) Received: from localhost ([153.61.198.250]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ce123592ab3sm2418238a12.13.2026.12.04.20.50.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Dec 2026 20:50:16 -0800 (PST) Content-Type: text/plain; charset=UTF-8 Date: Sat, 05 Dec 2026 04:50:16 +0000 Message-Id: From: "Alexei Starovoitov" To: "Jiri Olsa" Cc: "Daniel Borkmann" , "Andrii Nakryiko" , "Masami Hiramatsu" , , , , , "Song Liu" , "Yonghong Song" , "Quentin Monnet" , "Alan Maguire" Subject: Re: [PATCH RFC bpf-next 00/31] bpf: Attach kprobe multi link to inlined functions In-Reply-To: References: <20261202123035.10335-1-jolsa@kernel.org> Content-Transfer-Encoding: 8bit X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 On Thu, Dec 03, 2026 at 06:20 AM Jiri Olsa wrote: > I think we need the skip flag. kprobes refuse some of the inlined > sites (jump label, static call, bug table, NOKPROBE_SYMBOL, noinstr) > and finding those in user space would need vmlinux and a copy of > the kprobe checks, which seems too much > > I changed the bench test to print out the stats: > > inlined instances 20695 > attached 19947 > skipped, notrace function 563 > skipped, refused by kprobes 185 > > it's the worst case, normal attach with just a few functions would > hit much less, but it's still inconvenient, because user space has > to retry the attach for each address the log names I feel all or none is a better default, but flag makes sense. >> Two functions inlined at one address share one cookie. > > I think we can still allow same addresses having their own cookie, > if we keep the cookie in the kprobe struct and pass it through the > run context instead of looking it up by the address > > it's probably needed for the arg specs too, two inline functions > on the same address would otherwise end up with the same spec yep. Even better. bpf_uprobe_multi_cookie() works that way. The prog runs once per entry in addrs[], each time with its own cookie. kprobes don't need the bsearch then.