public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: "Alexandre Courbot" <gnurou@gmail.com>
To: "kernel test robot" <lkp@intel.com>, "Gary Guo" <gary@garyguo.net>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Alistair Popple" <apopple@nvidia.com>,
	<oe-kbuild-all@lists.linux.dev>,
	"John Hubbard" <jhubbard@nvidia.com>,
	"Joel Fernandes" <joelagnelf@nvidia.com>,
	"Timur Tabi" <ttabi@nvidia.com>, "Zhi Wang" <zhiw@nvidia.com>,
	"Eliot Courtney" <ecourtney@nvidia.com>,
	<rust-for-linux@vger.kernel.org>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] gpu: nova-core: gsp: fix undefined behavior in command queue code
Date: Mon, 30 Mar 2026 20:15:55 +0900	[thread overview]
Message-ID: <DHG2ODK6STM0.25M7U46EBUSZB@gmail.com> (raw)
In-Reply-To: <202603281331.1ESuqgfz-lkp@intel.com>

On Sat Mar 28, 2026 at 2:53 PM JST, kernel test robot wrote:
> Hi Alexandre,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on dff8302ca1d0e773c90dbeeb05e759f995c95482]
>
> url:    https://github.com/intel-lab-lkp/linux/commits/Alexandre-Courbot/gpu-nova-core-gsp-fix-undefined-behavior-in-command-queue-code/20260327-003216
> base:   dff8302ca1d0e773c90dbeeb05e759f995c95482
> patch link:    https://lore.kernel.org/r/20260326-cmdq-ub-fix-v3-1-96af2148ca5c%40nvidia.com
> patch subject: [PATCH v3] gpu: nova-core: gsp: fix undefined behavior in command queue code
> config: x86_64-randconfig-102-20260327 (https://download.01.org/0day-ci/archive/20260328/202603281331.1ESuqgfz-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260328/202603281331.1ESuqgfz-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202603281331.1ESuqgfz-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
>>> ld.lld: error: undefined symbol: rust_build_error
>    >>> referenced by build_assert.rs:28 (rust/kernel/build_assert.rs:28)
>    >>>               vmlinux.o:(<nova_core::gsp::cmdq::DmaGspMem>::allocate_command)

Been able to reproduce this, but only if I use the 0day compiler (i.e.
just taking the `.config` is not enough).

Bisected all the pointer projections, and the one that triggers this
failure is this line of `driver_write_area`:

    ptr::project!(mut data, [tx..rx - 1]),

... more precisely, the `rx - 1` bit (no problem if I just use `rx`).

This really shouldn't happen because the conditional block we are in has
already determined that `rx != 0 ` and `tx > rx`, so the expression
should be perfectly safe.

I'll keep turning the knobs until I find something that works.

      reply	other threads:[~2026-03-30 11:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26  5:43 [PATCH v3] gpu: nova-core: gsp: fix undefined behavior in command queue code Alexandre Courbot
2026-03-27  6:56 ` Alexandre Courbot
2026-03-27 12:23 ` Gary Guo
2026-03-27 14:34 ` Danilo Krummrich
2026-03-27 20:03 ` kernel test robot
2026-03-28  5:53 ` kernel test robot
2026-03-30 11:15   ` Alexandre Courbot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DHG2ODK6STM0.25M7U46EBUSZB@gmail.com \
    --to=gnurou@gmail.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=apopple@nvidia.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ecourtney@nvidia.com \
    --cc=gary@garyguo.net \
    --cc=jhubbard@nvidia.com \
    --cc=joelagnelf@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=ttabi@nvidia.com \
    --cc=zhiw@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox