From: "Arnd Bergmann" <arnd@arndb.de>
To: "A. Sverdlin" <alexander.sverdlin@siemens.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Christophe Leroy" <christophe.leroy@csgroup.eu>
Cc: "Hui Wang" <hui.wang@canonical.com>,
"Michael Walle" <mwalle@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"florent.trinh-thai@cs-soprasteria.com"
<florent.trinh-thai@cs-soprasteria.com>
Subject: Re: [PATCH] eeprom: at25: convert to spi-mem API
Date: Fri, 07 Nov 2025 14:08:15 +0100 [thread overview]
Message-ID: <3e265b9e-c0f4-452d-b1da-3c708517e30a@app.fastmail.com> (raw)
In-Reply-To: <e0037dc532f3aecb101c78e7d91b66430b15d541.camel@siemens.com>
On Fri, Nov 7, 2025, at 12:49, Sverdlin, Alexander wrote:
> Christophe, while I'm trying to get my hands on a PPC32 HW similar to
> yours, would
> you be able to test with CONFIG_DMA_API_DEBUG=y? The fact the KASAN
> doesn't detect
> anything after the fix to spi-fsl-cpm you've mentioned makes me think
> the corruption
> is external to CPU core? Will you post you fix to fsl-cpm code?
I had a look over the patch and don't didn't see anything extra
suspicious, but I wonder if this is possibly a problem with a DMA
to stack, as Christophe mentioned this showing up on a system with
VMAP_STACK=y.
If for some reason the original driver used to bounce the data while
the current version attempts a DMA, that may lead to arbitrary
data corruption from the invalid virt_to_phys(vmalloc_pointer)
conversion.
The opposite might be true as well: if the 'val' pointer passed
into the read/write functions was previously detected as
needing a bounce buffer down the stack (spi core or spi
master driver) but now the added 'bounce' allocation gets
passed directly into a dma engine, that may also fail if the
GFP_KERNEL allocation is not sufficient for the range or
alignment requirements of the DMA master.
Christophe, do you know the CPM DMA has any restrictions
there, e.g. needing a GFP_DMA allocation?
Arnd
next prev parent reply other threads:[~2025-11-07 13:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 22:28 A. Sverdlin
2025-07-04 10:09 ` Arnd Bergmann
2025-11-03 16:33 ` Christophe Leroy
2025-11-03 19:12 ` Sverdlin, Alexander
2025-11-03 21:46 ` Christophe Leroy
2025-11-03 22:29 ` Sverdlin, Alexander
2025-11-03 22:36 ` Christophe Leroy
2025-11-04 13:13 ` Sverdlin, Alexander
2025-11-04 13:24 ` Christophe Leroy
2025-11-04 23:15 ` Greg Kroah-Hartman
2025-11-05 7:20 ` Sverdlin, Alexander
2025-11-07 11:49 ` Sverdlin, Alexander
2025-11-07 13:08 ` Arnd Bergmann [this message]
2025-11-07 13:44 ` Sverdlin, Alexander
2025-11-08 10:05 ` Christophe Leroy
2025-11-08 11:14 ` Christophe Leroy
2025-11-08 11:41 ` Sverdlin, Alexander
2025-11-08 16:24 ` Christophe Leroy
2025-11-10 15:09 ` Sverdlin, Alexander
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=3e265b9e-c0f4-452d-b1da-3c708517e30a@app.fastmail.com \
--to=arnd@arndb.de \
--cc=alexander.sverdlin@siemens.com \
--cc=christophe.leroy@csgroup.eu \
--cc=florent.trinh-thai@cs-soprasteria.com \
--cc=gregkh@linuxfoundation.org \
--cc=hui.wang@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mwalle@kernel.org \
/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
all inboxes | Powered by JetHome®