From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.171 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796446218; b=GGl/X2KowSseD8BGYXxuTbLeU4+78+cw1sBHlxVwTA7RujgYxy3lFrsGSgpKhUatNISi S7cBATl3xshT640YMfOdgIYS0rfvthbBs06iOVnJRycZyYisXacXVUKrpNKq9rAmlRij8 g0PqMc4X1Ik+VB4PtS+PAtPk4o76NllYXJjFyCAyhlm1YC9SD61tzdGbi6RBLLtVrW06d C9o3CuBNtFB53aFTR0gGYjVEkXWDVloyGPZXbqj3XQqbfa4PQc5DV01Ixgw7sng8g3UrD wBUwQNTloogcz27dDbQu+Pe6nMAhj/SNb0pM7xvhyVbVIlA6ted5+iYjbzBvrC2/hKA== 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=2YRYjovLVCH+rua8mRi4GUosS2Pvn6keGiLZn8PmaO+XonH17DEK+p4ZGv1XnWm9lNe/ 5wjN/it0cK+n9Tw8UZIbPwg8fDYCxH0AmUmURZ0iJFjAYws1AzVgUwv1Vxm2coxsuxc0L 0jfOEl6Ldv9eEbVtCG4zz24vBc//vpEMA3bwHjXQ4CvelWZIPaTweyfJsrMm6a0T7CvCZ CGjhhj5vELA/kzxME0QqDMK0/CIreBABMlG4VViH8zLmALheOjCQSAj7vWR+DUZ+/X4Ft 5/2rsVgLjq+jY91sDz9YLjzQziCpK378ML4moEjgbyGhBPNA1Q5WPqCrDkROIyzbeFw== 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.171 Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (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 CD0D9606A336 for ; Sat, 5 Dec 2026 04:50:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CD0D9606A336 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-f171.google.com with SMTP id 41be03b00d2f7-cde4b4e936fso1454651a12.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=UIG4DqaACRdeuxXJ1vMSEDTwvx3wvsNNblyKI3WgkznBvddiHcc5S7/qt6W3YrFuK4 vp+aMEGNGN/wnvxZ2WPxo3N2Cv8UQj9PsnREqMX9IhciBoAxo+IpI6d3EXvgAonWheRv Sv8VUSF74ftRdHjXlqpWPhcaQfR9f3VtI2xeNVjBiusVGWR3g4yYtkCJh37zLu5K1mcs L04kFeZ/VNgjnQ0FUsq+jZuYKBoGT0NeYLd16ExuH/RligfKghFF8dXFNPTVbO235nEF I0fQVcrqiUzHHnPtKhS11rPAO3QHdr/24gA5BsKtMXVbBFm7/FHjoXClEjqwyrw8bYQa jpHQ== X-Forwarded-Encrypted: i=1; AL+hErEKtE+O6mVN8B46H11db+AtYzKlae+c4gVrr0JovRcwoIKWpgY+CkZzOn27PWBqMwJgqnoXanURGxPglJWgAHE5dwk=@vger.kernel.org X-Gm-Message-State: APuU4Z9OEDIpHjJrcVUztFEca4FmSEF2kQ4+qewMPNoG0Uks1lKJjh6P zH5iaF3GSPWvLMMZhsf/DW3jAntlkKYzMZph6OTutWwkIYFCG9GBNN9C X-Gm-Gg: AZFdTZcsbrYT9cYnxzgMEyLBLpndb3SyyVElvQC2cVGhGmb4680mBbontShs+ZMnPbS m86ikmu1n54/PA43YS6Mb/DJnqRcQcvu/91PcspCMsxAeYto0gx/oAuPVgzvG1nFHtlqI2yKPFW xfAHE1+JTaGE2IZXORPcwXFLo4jcLPleNbemet0ghRAtj0691k03UIPiK/5yWZxjUmCgzYtKPBM VYFkYnmGd6EWhh+C2BPfnjrETE3K20nHiXb6sOSYTNnLeQwg9mfwg1UOodQwvcQNUThmH2/BNuk VwP68dg3TGTX9bGIUVEh1ImlVg+QM3JNxR5r/zSG+oRLVcdm9B5aj0QxrsOQxNVFXuh4bY29kkv qxZtbk78VW/cEMU6cZdS495BnGw+OvCpW2HPVKxV2OcXFPcpg87SEm9CkGlYtWDaiPNUm0bm4VD GR+9j2SXt0/MD29Ky0YJd3i6niq4a3QCJ2/HEYXd/2iCZZ31yWlDwy527bTFPdQ7IxJGJLSzipD aP/JP4f9We/rQmCdORTqfKhG4avr4VjoVHseZcOK7lq4S6v1Z2EG7Koi2DaRg9SF0Qc3jxHtMkk RVdOQsceTQT+oCNU9D117j87R1E+7hB/sjH4cE5IsppWKwAkLgkzAOkrTzCjzIDbzeiT5tokwLV lE4G/xFEYgkfsBufor4IDtwwcHD0N/o2jNg8= 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: linux-trace-kernel@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.