From: Pavel Machek <pavel@ucw.cz>
To: Maxime Ripard <mripard@redhat.com>
Cc: Lucas Stach <dev@lynxeye.de>,
kernel list <linux-kernel@vger.kernel.org>,
Milan Zamazal <mzamazal@redhat.com>,
Christoph Hellwig <hch@lst.de>,
iommu@lists.linux.dev, Will Deacon <will@kernel.org>,
catalin.marinas@arm.com,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Andrey Konovalov <andrey.konovalov.ynk@gmail.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
kieran.bingham@ideasonboard.com,
Hans de Goede <hdegoede@redhat.com>
Subject: Re: Re: Uncached buffers from CMA DMA heap on some Arm devices?
Date: Mon, 29 Jan 2024 19:30:29 +0100 [thread overview]
Message-ID: <ZbfuxUHlY3oblC5f@duo.ucw.cz> (raw)
In-Reply-To: <xd5ofun26gfdgn7hig3gipj5rgojqyuouwmii7xecgrbzyliil@y6rufxtwdmrc>
[-- Attachment #1: Type: text/plain, Size: 985 bytes --]
Hi!
> > Yeah, and it also does not work :-).
> >
> > Userspace gets the buffers, and it is not really equipped to work with
> > them. For example, on pinephone, memcpy() crashes on uncached
> > memory. I'm pretty sure user could have some kind of kernel-crashing
> > fun if he passed the uncached memory to futex or something similar.
>
> Uncached buffers are ubiquitous on arm/arm64 so there must be something
> else going on. And there's nothing to equip for, it's just a memory
> array you can access in any way you want (but very slowly).
Not really. Not on anything modern.
ll/sc will not work, for example, than's on ARM.
https://en.wikipedia.org/wiki/Load-link/store-conditional
Transactional memory will not work, that was on x86. Powerpc has
cacheline clearing instruction.
And that's design, I'm pretty sure there are also numerous CPU errata.
Best regards,
Pavel
--
People of Russia, stop Putin before his war on Ukraine escalates.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
prev parent reply other threads:[~2024-01-29 18:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87bk9ahex7.fsf@redhat.com>
[not found] ` <d2ff8df896d8a167e9abf447ae184ce2f5823852.camel@lynxeye.de>
2024-01-29 10:23 ` Uncached buffers from CMA DMA heap on some Arm devices? Pavel Machek
2024-01-29 10:32 ` Maxime Ripard
2024-01-29 12:07 ` Laurent Pinchart
2024-01-29 13:12 ` Lucas Stach
2024-01-29 18:30 ` Pavel Machek [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=ZbfuxUHlY3oblC5f@duo.ucw.cz \
--to=pavel@ucw.cz \
--cc=andrey.konovalov.ynk@gmail.com \
--cc=bryan.odonoghue@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=dev@lynxeye.de \
--cc=hch@lst.de \
--cc=hdegoede@redhat.com \
--cc=iommu@lists.linux.dev \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@redhat.com \
--cc=mzamazal@redhat.com \
--cc=will@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