All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Louis Sautier <louis.sautier@ovhcloud.com>
Cc: linux-i3c@lists.infradead.org
Subject: Re: Error while loading dw-i3c-master: UBSAN: shift-out-of-bounds in drivers/i3c/master/dw-i3c-master.c:885:12
Date: Tue, 9 Dec 2025 13:48:54 +0100	[thread overview]
Message-ID: <202512091248543fcf4c83@mail.local> (raw)
In-Reply-To: <b9b568e8-8e21-49ac-b3dd-ab750fc329aa@ovhcloud.com>



On 09/12/2025 12:37:12+0100, Louis Sautier wrote:
> On 12/8/25 21:58, Alexandre Belloni wrote:
> > Hello Louis,
> > 
> > On 02/12/2025 21:17:31+0100, Louis Sautier wrote:
> > > Hello,
> > > 
> > > I'm running into a bug when loading the dw-i3c-master module on kernel 6.18
> > > on one specific server. I suspect it has to do with the large number of
> > > CPUs on the machine (768 threads, from 2 AMD EPYC 9965 processors) but I am
> > > not sure.
> > > 
> > > The system is on Ubuntu 25.10 and a 6.18 kernel with https://gist.githubusercontent.com/sbraz/a6f37fafbcf9354bbe4eace9e9eb48cb/raw/115da594dc9d7ea99b06754847571e6fd76d9da5/config
> > > (basically Ubuntu's).
> > Just to be sure, does this also happen with v6.17?
> > 
> > The only change is the shutdown handling so I would guess yes.
> > 
> Hello,
> 
> It does happen with 6.17. I initially discovered this while running Ubuntu
> 25.10's stock kernel (6.17.0).
> 
> > What is the behavior when you build the dw-i3c-master as a static driver?
> I'll try CONFIG_DW_I3C_MASTER=y and report back.
> 
> Someone also suggested (they didn't reply to the list though) that I add a
> printk to see what the value of maxdevs is. I'll provide the log as soon as
> I have rebuilt with:
> 
> --- linux-6.18.orig/drivers/i3c/master/dw-i3c-master.c	2025-11-30 22:42:10.000000000 +0000
> +++ linux-6.18/drivers/i3c/master/dw-i3c-master.c	2025-12-08 18:17:33.151567225 +0000
> @@ -1588,6 +1588,7 @@
>  	ret = readl(master->regs + DEVICE_ADDR_TABLE_POINTER);
>  	master->datstartaddr = ret;
>  	master->maxdevs = ret >> 16;
> +	printk("maxdevs: %d\n",  master->maxdevs);
>  	master->free_pos = GENMASK(master->maxdevs - 1, 0);
>  	master->quirks = (unsigned long)device_get_match_data(&pdev->dev);
> 

Yes, that was going to be my suggestion.

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

  reply	other threads:[~2025-12-09 12:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02 20:17 Error while loading dw-i3c-master: UBSAN: shift-out-of-bounds in drivers/i3c/master/dw-i3c-master.c:885:12 Louis Sautier
2025-12-08 18:54 ` Manikanta Guntupalli
2025-12-08 20:58 ` Alexandre Belloni
2025-12-09 11:37   ` Louis Sautier
2025-12-09 12:48     ` Alexandre Belloni [this message]
2025-12-09 15:36       ` Louis Sautier
2025-12-09 17:24         ` Frank Li
2025-12-09 19:52           ` Louis Sautier
2025-12-10 15:20             ` Frank Li
2025-12-10 19:50               ` Louis Sautier
2025-12-11 16:52                 ` Frank Li
2025-12-12 19:44                   ` Louis Sautier
2025-12-15 16:25                     ` Frank Li
2025-12-30  1:30                       ` Louis Sautier
2026-02-23 17:10                       ` Boqun Feng

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=202512091248543fcf4c83@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=louis.sautier@ovhcloud.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.