From: Jens Wiklander <jens.wiklander@linaro.org>
To: Avri Altman <Avri.Altman@wdc.com>
Cc: Manuel Traut <manut@mecka.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"op-tee@lists.trustedfirmware.org"
<op-tee@lists.trustedfirmware.org>,
Shyam Saini <shyamsaini@linux.microsoft.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Linus Walleij <linus.walleij@linaro.org>,
Jerome Forissier <jerome.forissier@linaro.org>,
Sumit Garg <sumit.garg@linaro.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Bart Van Assche <bvanassche@acm.org>,
Randy Dunlap <rdunlap@infradead.org>,
Ard Biesheuvel <ardb@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Tomas Winkler <tomas.winkler@intel.com>,
Alexander Usyskin <alexander.usyskin@intel.com>
Subject: Re: [PATCH v5 2/3] mmc: block: register RPMB partition with the RPMB subsystem
Date: Tue, 7 May 2024 11:21:58 +0200 [thread overview]
Message-ID: <CAHUa44GLGT7F0=LL6fjw1inf0N-OPpVL+D44F84yndUmk-xLhA@mail.gmail.com> (raw)
In-Reply-To: <DM6PR04MB6575AC5DEB3A46D1AE11705FFC1B2@DM6PR04MB6575.namprd04.prod.outlook.com>
On Mon, Apr 29, 2024 at 9:36 PM Avri Altman <Avri.Altman@wdc.com> wrote:
>
> > > > >
> > > > > Is it possible that idata->buf is not DMA capable? Any other ideas?
> > > >
> > > > Thanks for testing. I don't know, the idata->buf is allocated using
> > > > alloc_pages_exact(nr_pages * PAGE_SIZE, GFP_KERNEL | __GFP_ZERO); in
> > > > optee_pool_op_alloc_helper().
> > >
> > > Is this really true for idata->buf or isnt the complete RPMB frame
> > > memory allocated like this and therefore idata->buf not page aligned?
> >
> > You're right.
> Maybe add an assert of PAGE_ALIGNED(idata->buf)?
That might be a bit much. It turned out that there was a 2-byte
alignment causing the trouble. I don't know exactly what's needed, but
the amount used by kmalloc() by default is good.
Cheers,
Jens
>
> Thanks,
> Avri
>
> >
> > >
> > > For RPMB via tee-supplicant the idata->buf is allocated within
> > > memdup_user and therefore page aligned.
> >
> > Yes, that's a difference. Have you tested with page-aligned buffers to see if it
> > helps?
next prev parent reply other threads:[~2024-05-07 9:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-22 9:19 [PATCH v5 0/3] Replay Protected Memory Block (RPMB) subsystem Jens Wiklander
2024-04-22 9:19 ` [PATCH v5 1/3] rpmb: add " Jens Wiklander
2024-04-25 8:37 ` Manuel Traut
2024-04-26 13:08 ` Jens Wiklander
2024-04-22 9:19 ` [PATCH v5 2/3] mmc: block: register RPMB partition with the RPMB subsystem Jens Wiklander
2024-04-25 8:42 ` Manuel Traut
2024-04-26 13:24 ` Jens Wiklander
2024-04-29 9:40 ` Manuel Traut
2024-04-29 10:08 ` Jens Wiklander
2024-04-29 10:35 ` Manuel Traut
2024-04-29 10:45 ` Jens Wiklander
2024-04-29 11:13 ` Jens Wiklander
2024-04-29 13:13 ` Manuel Traut
2024-05-02 9:53 ` Jens Wiklander
2024-05-03 9:16 ` Manuel Traut
2024-04-29 19:36 ` Avri Altman
2024-05-07 9:21 ` Jens Wiklander [this message]
2024-04-22 9:19 ` [PATCH v5 3/3] optee: probe RPMB device using " Jens Wiklander
2024-04-25 9:13 ` Manuel Traut
2024-04-26 13:40 ` Jens Wiklander
2024-05-03 14:37 ` Manuel Traut
2024-05-06 8:34 ` Jens Wiklander
2024-04-23 6:42 ` [PATCH v5 0/3] Replay Protected Memory Block (RPMB) subsystem Avri Altman
2024-04-23 7:29 ` Jens Wiklander
2024-04-23 8:22 ` Avri Altman
2024-04-23 8:44 ` Jens Wiklander
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='CAHUa44GLGT7F0=LL6fjw1inf0N-OPpVL+D44F84yndUmk-xLhA@mail.gmail.com' \
--to=jens.wiklander@linaro.org \
--cc=Avri.Altman@wdc.com \
--cc=alexander.usyskin@intel.com \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=bvanassche@acm.org \
--cc=gregkh@linuxfoundation.org \
--cc=ilias.apalodimas@linaro.org \
--cc=jerome.forissier@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=manut@mecka.net \
--cc=op-tee@lists.trustedfirmware.org \
--cc=rdunlap@infradead.org \
--cc=shyamsaini@linux.microsoft.com \
--cc=sumit.garg@linaro.org \
--cc=tomas.winkler@intel.com \
--cc=ulf.hansson@linaro.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).