From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.182 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795915292; b=ozfXPGvZQEP5OX938ZdtWXK9BnWYIFlk0E/9fbxkyGNTQCbhXfp4p0gbQaC7skXh5DhR RtoBb4PNkM4pmwYJiD18xd3OMl44TN3UT2egf7YPv/2fdfVS4vTtmI7bGpnoEs7K+ani0 LXsANKp+531hZihaDYqzQoMxPc9+3muI5wzYivyC0TW/8zC9QJLzAqKcMYnCzLVDCL9Rb MAaouA4Y2RgxvpjVkCu0qkn5xf1FT7GlmA46i2sktOk3zcNFpSga+glbvxiHnI+V3qzeK oREV7hwuYEm/ej5xGMANytEcWe0k2tMqRYVfBl4tPKiKRYaSeVTmbLSNzYEsBkquDJw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795915292; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Mime-Version:Content-Transfer-Encoding:Content-Type:Date:Message-Id: Subject:From:To:X-Mailer:References:In-Reply-To; bh=++eOVSKpoH/EVLG+d7jwu8UVfJw71SPS47uQyWrIGC4=; b=Qv9YeWA6lejLQj6c40kRm6VmYWJA9iilP1+6GQrX6rmD0TUoMCcECSwgGL1dqP8+0tLf zFXQshF3X/iIXi06EyHptKd4HtZynAD1/lz/lNuvJvJaX9OeGZAkhXRxbv5HmAh/aUHpk AEWxAuqtlBy3+71uIO4Js4uYCSYSSZIdbhBeujlhIhTiSaybShrxpDGi8ctVGxXPlDgvj lVKOiwRKctNHtQYksfc3jTvwCemuAYL7Q92vSiqO8ftX1ubkUNgKrR2VMM0xk3BshqsE7 yp6/jFjdQ1TElaLDHZrkPpthbnf2cu8MsR3u8cwKtwZM0xqO7Z2Z2yapL8Im+wu70RA== 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=JSLGVnfE; arc=none smtp.remote-ip=209.85.215.182 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (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 8FFA2606A31C for ; Sun, 29 Nov 2026 01:21:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8FFA2606A31C 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=JSLGVnfE Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-ccca948203aso6192048a12.3 for ; Sat, 28 Nov 2026 17:21:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795915291; x=1796520091; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:message-id:date:content-type :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to:content-type; bh=++eOVSKpoH/EVLG+d7jwu8UVfJw71SPS47uQyWrIGC4=; b=JSLGVnfExyS7vwPZGLu+anssy0CMTIsQx/Jcbwfr3cXGVjSIiZ1MQ2IygUauKjfZE7 NS5g8lceJV+JwmwPCcF2W3AUxEuwBnbaJts03gPiWzo5h8BLKrcz63c/zdlTxt3QUguq 3qFVOp6cx88ObCT0JrTmw1blCqz7gc/YLnYqlm0p4FmukLmHgf2jQ5tHVBb8jrjta7Ep VKiRm06mmulaZXDcRdDhY9r3HLP32XZZAM9sFvT/qAAspuyxEW+kXORg5YOXflHyYuUo P/BGwQcHkMKp0WQenXCaEzH4ftyYA2/DJX2DbJHRDfyBPyFufasMEwhDYdvX/zK2HRS+ 6nfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795915291; x=1796520091; h=in-reply-to:references:to:from:subject:message-id:date:content-type :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to:content-type; bh=++eOVSKpoH/EVLG+d7jwu8UVfJw71SPS47uQyWrIGC4=; b=ZX8dOHlfQnXj2Qn9lhfPuwbUd42CYxtdXkgdf3BuTS6Uo/fFnffKPtB5/Mc6oK4743 YenUAsgyjU/JnucK/h8blBJB//cuQ5ZdSW2JmtNZ5aL2aWgNX+VpgpYek6QHAK7sk6OE xkqIodoSzxmkICMDQJVxPHR71FTTpv9WMbGPdUy+TEGkX+KoQ7wsIVAYHRHoZJqcl2Xz tzhV0CuS/fopPHsFKlAh8OAeXiF7mLnQSfaN1YULYIibC1e44pC2PwfCjH7rJeOsKf2g eRWGL8Qm3ex/NpjgUApYbsbLiJjXbREXS9uqQPHeAqSpquEBa7NBd4Spqqu78nAcJZdB CxJg== X-Forwarded-Encrypted: i=1; AL+hErEhYua8SYpOy71CdzdUBeNLBFSdnaDQzOYnVnZ1ht+nES2Q2LmpJe/gclSdlBHQFGaxqls=@vger.kernel.org X-Gm-Message-State: APuU4Z/d5xmqQde0c5omlMLIaW2A5QYSdXvz0vU3kWmHtPmdcfVGLMdj b8cwbehCHIKTjuyr/LEHE0Br4ppvqlPQTw/JHfGpdfuxC0TjCs+9vT7+l8gBTA== X-Gm-Gg: AZFdTZdiFPonz8ctxts316SOMmd7qsPQOj1TtU/RjlJat3sbQ2ahA7Djj8glpVWPuPt yhSK0+/ZRywVrPs5oovhC77Qx1ad09GT3mbSu6TBvKtN2n0zevXHJfimMM1HcaNWWcDx/0xZ99L csg2rjKDAWxHlfcHEP90XxvjE4gwLSaoPXnw4RzAzT0LXvpNVn/Hn/wCHYT8jJsLrKMHBeEjo0f w3FXqRg4Ku1Sal+S6Ttp62ozqWuB1jrSKITlsdwCYp5Q3w8C64jy8AYfmUrpp5aU7t7u+awBTIR PBYcUwg9sh8t+ojZ+filHKP6QGiKW/Zij30li/H9TWQda8quuzZ5xVYBgJPBdzSxn5dzeGy4Ylf Pj70Y4RNclIZvQ82Xc3w9TqpN1E9aSsTyZkiMkFp+aqgufbsJBmkjwfL4uNTo+7WPJdJYT/TykQ Iwy7JTu3g9oc1qQuNegPsE3cdPSV7SLM6mZnHF1/SMT5gGDiuuqBMfICgBszZ2W1X9r4CzDdE15 2ThYKG8zFPmPtkRRT+9A5ICuZ3KXJlQcO8rr5wjJmesMP0ZLpx4D8Y3Tgk0DL4GEUqHceEEFuuf 3FBeFPFca1PV4j6sLzQWahJg+vqlXeJWS+8SEg6FfeWRV5q5/I3g6XVep5U5FophWfoChQAHLfD 1aNqtvTgRVyW7D97lNcOAanKRGz6XrYRDVQ== X-Received: by 2002:a17:90b:1644:b0:3b0:ae41:2711 with SMTP id 98e67ed59e1d1-3b41c911824mr28615960a91.24.1795915290728; Sat, 28 Nov 2026 17:21:30 -0800 (PST) Received: from localhost ([153.61.198.246]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b41aab4729sm44962262a91.0.2026.11.28.17.21.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 28 Nov 2026 17:21:30 -0800 (PST) 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sun, 29 Nov 2026 01:21:29 +0000 Message-Id: Subject: Re: [PATCH v1 bpf-next 4/7] selftests/bpf: Test fmod_ret on a declared function that returns a pointer From: "Alexei Starovoitov" To: "Anton Protopopov" , "Alexei Starovoitov" , "Daniel Borkmann" , "Andrii Nakryiko" , "Eduard Zingerman" , "Kumar Kartikeya Dwivedi" , "Alan Maguire" , "John Fastabend" , X-Mailer: aerc 0.20.1-355-gf870624f6c37 References: <20261125102810.699464-1-a.s.protopopov@gmail.com> <20261125102810.699464-5-a.s.protopopov@gmail.com> In-Reply-To: On Wed Nov 25, 2026 at 1:34 PM UTC, Anton Protopopov wrote: > On 26/11/25 10:28AM, Anton Protopopov wrote: >> Add bpf_testmod_modify_return_ptr() to the error injection list. >> Check that a program on it may return an error pointer but not >> another value, and that an extension of a global function of such a >> program loads. > > Once the https://lore.kernel.org/bpf/20261125032938.670542-1-alexei.staro= voitov@gmail.com/ it's in bpf-next now. > series loads this selftest will fail. So I will send v2 later. Just > in case, the new patch is (after removing freplace piece): Applied patches 1,2,3,5. I'm not sure we need this selftest. I feel the numbers of selftest is growi= ng too fast. re: patch 6 and inet_frag_find()... > Its callers check the pointer with IS_ERR() and get the error with PTR_ER= R(). Not for the functions that got the tag by mistake, and that's not the same problem as with integers. Their callers test only for NULL, so any injected error is dereferenced. One injection each on x86-64: inet_frag_find() clang oops xfrm_policy_inexact_alloc_bin() gcc,clang oops __kmem_cache_create_args() clang oops Please fix it in this set instead of a follow-up. Don't count an error that the function itself compares with -MAX_ERRNO before it returns: inet_frag_find: mov $-12, %rbp; ...; cmp $-0xfff, %rbp; mov %rbp, %rax; cmovae %r14, %rax seq_file calls ->stop() after ->start() failed. kernfs_seq_start() returns -ENODEV with of->mutex held, so after a skip kernfs_seq_stop() unlocks a mutex that nobody took. ipmr_vif_seq_start() does the same with RCU and warns. Skip functions that take struct seq_file * and return void *. These have a correct tag, but a skip breaks the caller. Add them to excluded_by_name(): vfs_mkdir() error path unlocks the parent hang lock_two_directories() -EXDEV drops s_vfs_rename_mutex hang btrfs_lookup_csum() caller uses path after -ENOENT oops ipc_obtain_object_idr() do_shmat() doesn't check 2nd lookup oops Add them to denylist.