From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.180 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796446218; b=or8YOUmNe2626Q+4xm3aY1Vd+z4QmrLy/U2HFCUjRrMj29x8qmQvtITmZiI2wiw0Cl+Z M7MdZqA8QBvzOvTRs2m9bJmyzQXeyLextNtM6WVvjhB+sx8uuWA4KSJqfQQoM3HZdq1hU eCRazwCigJoalJ7hHm/Iq/oyAOPN7BIrVi2slS5zbh1huJUuGge7vRX9U5qOXayrp0pfg UTVFdRWvmKoszkvlB6fMLEAaWHvzwsCRg4yv1q0SzVk86u9IjJcKFymGbANnietuePTmM kxvwviQv3QC56y7EQRaIKMZt8p+lFLeazHtsszfBO7ROFZvZMcFnbSyGog7a6lwsDuA== 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=IRBa8oUKHtGd1POKnGUBMPZDZzlUBHuGG4ApH4D8KfZhBRGXJhhFfghyHQT3f6PjGY83 8UiDfQG90JwgyLSLNA3zV9gRb6Miwtq2xbI6ugi2ywx39cDU+bITmxx6knT5VRTN6qdJK I6ZC+gm/ANF5NwMepVN77vUZUYn5HaMYTrINjBfSjWNIvkLUuwfs+csSmgR7ah2i0b5om sMkehlQTuFtLSte1kqU/VOkm7VKjvRE9p6nxT0RxUHg/JorI+s9DmEeLhjRkns6eeuERl HT21ikuZXa1KGNRgTjNP9oDOmMhL1s+6ubwp9a9KznlWKcBuOUrqGRqJeVTD3v+VR0w== 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.180 Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) (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 C6431606A334 for ; Sat, 5 Dec 2026 04:50:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C6431606A334 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-f180.google.com with SMTP id 41be03b00d2f7-ce13249fff8so165313a12.0 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=UxUQbf1JhYH3neG9kcqtxGEma3f04mE1ed/JZ9caEVsxJrG+vU3P83MBhwcpVlG77D 0DHV8vtvTZ3h05V99NPJMQCNvm1X2dIt8tyQ+TXiXbABpxpcOaYqcZOS18XLw3jLTiqO F6pkPV6w6jvwXHsEl7e0mKP5MSOPmbqMaXs4UXxe8bclCfOOdT3D4Cyd15WfVihN+7aW pqFT16+4wpBj5WNEZ8CweHctx0m+1LvrAeB6cKmZ36MP+r/M5racS4XjcpUJdS5LP3oH 68QGCkzCUCjuUwugFGf9y0ZQaBphSUx6ayFgFAw/SkCaJrU5OoOAKJGcY20Yy82THQE+ p41Q== X-Forwarded-Encrypted: i=1; AL+hErFiIjb/VQivio7T+AXPoF150RjrZr3TsQ43M7Zy5xosreOKWJcFClHUNKvXRT2gyhFcSStBz3ldOGMsehA=@vger.kernel.org X-Gm-Message-State: APuU4Z96CzX+kFgDna/8MOPhM9mT7bml0cuX31U8a4S9sDHcih4Jlevz u+CHMcErrVRzUUBKP+DC9jGpsj+dPg6M3AmET33ous9+erPL1qbcX5VS X-Gm-Gg: AZFdTZen5Js9sVFqwJhArvugMvu4/qsTwVN8Yq3cQyflp8IIogEw30/7ANNdy0LLa6S mMX7ExHbFuckPDXkGOvOL3FIldmj1zE8Q3Nt4ruAs0uvZbw5uGa1HLWGgGpMjJB9sJGnM+F+yNx pMrpxZ9nOPn0vPIOIveu86t7JAlNeaAc+Jd86kSeSITZaL/8Pq5aMY/InCC/gzKHQczbMAZoR6g YZSa+G0T5OoI4Oq/pRgrTEZgSnA2x3RPHPUn0PKk9IYpgHA2H8zjJvFV99RGQZnRqLjFIe4HydK gO0qczXVPxxYZfqgvk2sHZxbD0hkKGAKTQXnrJr4ppCTphUia01K6YFdKtdSIo94KksvsKbeYnb UhlPUd7upRspPsnaZAIaAL6OqE3VieoV8RsQj5tVNMEN/7WGJbDX4JqsXBxvuh3tkhN5VyjROcN tfG7nJVi7ZDF8rr7zvzFqgvi5B0nI8LfbcaZIQqWklyj2Qa8u1U9zwWk/h9eAw2eZ9vdhWW+SF+ yh2Sml0s3SoveY9tnSd6+SIx+C4iqh3mK9jFwG/nisueWtNeERpp2EoSxpGi2ZdZjM+xlIZx1+e 6Kh3Iot59DfdD3H4TVvfg+KayU3N9mTocxwc77zUyzB6ttBxmnEuXm0mKW7FBTnbBWbrynOLK6V ipaxPYIrQfJv7xCvv4YVvdnQnkv5Wd8wH8WI= 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-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.