From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92202C8CE for ; Sat, 21 Mar 2026 22:19:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774131571; cv=none; b=Pym2CWAKJYitUKXtgbWRmYuXb+F9x1EMXvLgCujfvq0p16xBygfghN13HVqtUUDxKBVPo0qp0xrwrfgJDJohUxVsZyqfRFz6Zl5no7MBhvx9v7icuYtOo/5EBunsWK6hUYO2jbzFiAuNLKCI9KJiQrAxiiMbu85HWYzv6rs8g/Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774131571; c=relaxed/simple; bh=untriQDrI9JrqqAryq328gYRFIcFVTEGJLTS8OVKAsk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ES8+NWOj2ZzeAJg1HnQYUS43IBCc/oyB2SrskIbY6n/tfzN77UucccBNQ/rHP2Y8VQhxSFBsCVgfGgpc5tJHeNTbJLo+BeMs2AMqXLRxfP8Bxvy1XRGempEhvlYi0pesuiqJZwuMOv6BxyNYCQK4O0uTIoWXJPaxXgg3GppVy0Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IZJ92URr; arc=none smtp.client-ip=209.85.216.41 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.b="IZJ92URr" Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-356337f058aso1703590a91.2 for ; Sat, 21 Mar 2026 15:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1774131569; x=1774736369; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=UH7xGCZswuKf4dKmiZyNPuYLDLgcZOJqX/W8j0hzLfk=; b=IZJ92URrpU0S1UQulvYiS9QTSWsVBbAxsKmZ18B7pWbRwoR6aqGsZDPIVYts38QUPk Zw8MgVg4XvbX0dhgu/xqn1DaqEA7zQ3j66A9jby57p8ssrgDSEGvyrJIf+C9kkQdFVjR 3pTmOwE43mQMZJVzlsK7jFOlbHFhpq2VLye8/jiP4eHCLmPMNbm9hP1b8/MpR8rBD2iV nxjGL9+cNduV8ynqc4e5hCQVDpzpsG6abAUt+QXz3UefQv+gPBuzVKgqZG0DvK2MnNPn 3YF6y1UZreIfO5x1ht/4k1IlqZU30OwishFHyGXaL0MIrhmxM+EoYbUtux01ayJQFWJP 84jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774131569; x=1774736369; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UH7xGCZswuKf4dKmiZyNPuYLDLgcZOJqX/W8j0hzLfk=; b=GrRZd4b7qtNR+erlzO0asWxWrANpO1wXFswMaGKVBgnbkzbVxDJMJYHRfa+rhg4PX3 8FPu1ZaUjuIUhDwoA+QhG+tuAZt0FOSG+f7Flp2/XA0qOAJnoZcGlmI4MPRddfzUaP9H UBKU4hASIJhuHxlL5CztKftVrpgUwr3+kaGe5UnHyCztysBzmiF643QtGyxQ4oBVUboK 5Sgen3rTzLc3ciJLWmyRjkYKYmZY0iB1wxrOcrnmBZJDQb35PuFlKLqGhWOhuAVBIKJ9 9yDtvGmOC+RTsvf1HQFL9mK2mGxmKQTY3u2m7jbey5lZ+4WijAvAgaTxj9uRwkgI3hK3 zRRQ== X-Forwarded-Encrypted: i=1; AJvYcCU0P3xmMODh+pASdj2RTo585U0zVqkWwKJhF0CnB52T/ksnayBnQKuIoTG8oonIeRJSDoRNUdxS9KtBmds=@vger.kernel.org X-Gm-Message-State: AOJu0Yyq6qMcDDJmRb/G2kBv1wtVePvIBw70wwuIjYigIsTka0VbT8SC wZZA1eFiYJ58nrfSF5bqP0kBbtclcJ2RGRXFLQ4IsuR96PSEabnxZnV3 X-Gm-Gg: ATEYQzzBy7jo0Nl/374T9/eNQIY+vXJyYGSBOOvm4IKocPVWSqzTqUedl5J+xwWmFhi pPFqoQykQjdoJs7XoaECt40YzUZwUpAhQV9cTMPm5lx3043srlUL6x6QWamxy3jhHB/tGGCpf8a xMIgW7TDErYwEjMKJWDajNzQfae1G6TG9h9wW5HfvvZ9F+obVLJA8f0LUAHJLUxANctaoJj31yM Fqd/9OVKdBx7LA8TJWewxofPROFxAkFAAEq+4JwNjCV3nmOhmhRsn4G+BLt9FUHrOygWA/PFKFU CRcwvXsFm5BrpLF0obyWBiJcU/YPs0N3Lpf4Wksv7BkgiL+21pLVK0x0llqFwbf/MkpAZf5m/xx x9PlEXfGk03D8GP/9pjDNpuMHkOfjEK/i/Aeu7H4tvwj25OvVVrC/f6vEH7yHKP297+CzUQLsY/ nhKFVN8raJ4DDMaaYtWvde8b5ZkuVwnVUMDGvUzikFtQ== X-Received: by 2002:a17:902:f64a:b0:2b0:9292:60c6 with SMTP id d9443c01a7336-2b09292655amr11579955ad.52.1774131568745; Sat, 21 Mar 2026 15:19:28 -0700 (PDT) Received: from computer ([2a09:bac5:40b2:277d::3ef:49]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b08352ae70sm64241385ad.23.2026.03.21.15.19.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2026 15:19:28 -0700 (PDT) Date: Sun, 22 Mar 2026 03:49:17 +0530 From: Varun R Mallya To: bot+bpf-ci@kernel.org Cc: keisuke.nishimura@inria.fr, ameryhung@gmail.com, andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, eddyz87@gmail.com, haoluo@google.com, john.fastabend@gmail.com, jolsa@kernel.org, kpsingh@kernel.org, linux-kernel@vger.kernel.org, martin.lau@linux.dev, sdf@fomichev.me, song@kernel.org, yonghong.song@linux.dev, martin.lau@kernel.org, clm@meta.com, ihor.solodrai@linux.dev Subject: Re: [PATCH bpf-next] selftests/bpf: Add test for struct_ops __ref argument in any position Message-ID: References: <20260321214038.80479-1-varunrmallya@gmail.com> <923f781f67dc846a8e61ed40f4ce45fc3ae71ba0db3ca3074a02153f33f5c887@mail.kernel.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <923f781f67dc846a8e61ed40f4ce45fc3ae71ba0db3ca3074a02153f33f5c887@mail.kernel.org> On Sat, Mar 21, 2026 at 10:13:45PM +0000, bot+bpf-ci@kernel.org wrote: > > Will this test pass without Keisuke's fix [0] being applied first? No, it needs to be applied first. > The stub function has task__nullable as the second argument and > task__ref as the third. prepare_arg_info() populates the arg_info > array in order, so info[0] corresponds to the __nullable arg > (refcounted = false) and info[1] to the __ref arg (refcounted = true). > > In check_struct_ops_btf_id(), the loop that sets has_refcounted_arg > currently reads: > > for (i = 0; i < st_ops_desc->arg_info[member_idx].cnt; i++) { > if (st_ops_desc->arg_info[member_idx].info->refcounted) { > This always checks info[0].refcounted (the __nullable entry, which is > false), never info[i].refcounted. The __ref argument at info[1] is > never examined, so has_refcounted_arg stays false and the tail call > is permitted. > > Since the test expects __failure, but the program loads successfully > without the fix, the test will always fail when run on a tree that > does not include the companion verifier fix. > > This patch may need to be folded into (or applied after) Keisuke's > fix so the two land together. Yes, that is the intention. > > + /* ctx[2] is used because the refcounted variable is the third argument */ > > + struct task_struct *refcounted_task = (struct task_struct *)ctx[2]; > > + > > + bpf_task_release(refcounted_task); > > + bpf_tail_call(ctx, &prog_array, 0); > > + > > + return 0; > > +} > > [ ... ] > > > --- > AI reviewed your patch. Please fix the bug or email reply why it's not a bug. > See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md > > CI run summary: https://github.com/kernel-patches/bpf/actions/runs/23389590355