From: "XianLiang Huang" <huangxianliang@lanxincomputing.com>
To: <markus.elfring@web.de>
Cc: <alex@ghiti.fr>, <aou@eecs.berkeley.edu>,
<huangxianliang@lanxincomputing.com>, <iommu@lists.linux.dev>,
<joro@8bytes.org>, <linux-kernel@vger.kernel.org>,
<linux-riscv@lists.infradead.org>, <palmer@dabbelt.com>,
<paul.walmsley@sifive.com>, <robin.murphy@arm.com>,
<tjeznach@rivosinc.com>, <will@kernel.org>
Subject: Re: [PATCH v4] iommu/riscv: prevent NULL deref in iova_to_phys
Date: Wed, 20 Aug 2025 17:21:28 +0800 [thread overview]
Message-ID: <20250820092128.8069-1-huangxianliang@lanxincomputing.com> (raw)
In-Reply-To: <568d8b25-8cb5-48f8-850e-0298e3fc456a@web.de>
https://lore.kernel.org/lkml/feb46658-5a3a-4403-b407-500566280eb3@web.de/
I updated the patch in v3, and updated change description accordingly:
In v1
> - if (_io_pte_none(*ptr) || !_io_pte_present(*ptr))
> + if (!ptr || _io_pte_none(*ptr) || !_io_pte_present(*ptr))
In v3
> - if (_io_pte_none(*ptr) || !_io_pte_present(*ptr))
> + if (!ptr)
but put your proposal at the patch Subject...
v1: check pte null pointer before use
v3: prevent NULL deref in iova_to_phys
> …> ---
> > Changes
> > v4:
> > - Change the summary as Markus recommends
> >
> > v3:
sorry for making this messy.
Regards,
Xianliang
next prev parent reply other threads:[~2025-08-20 9:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 7:22 XianLiang Huang
2025-08-20 8:25 ` Markus Elfring
2025-08-20 9:21 ` XianLiang Huang [this message]
2025-08-20 10:40 ` [v4] " Markus Elfring
2025-08-20 11:16 ` XianLiang Huang
2025-08-20 11:30 ` Markus Elfring
2025-08-22 2:36 ` XianLiang Huang
2025-08-22 6:52 ` [PATCH v4] " Joerg Roedel
2025-10-09 1:07 ` patchwork-bot+linux-riscv
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=20250820092128.8069-1-huangxianliang@lanxincomputing.com \
--to=huangxianliang@lanxincomputing.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=markus.elfring@web.de \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robin.murphy@arm.com \
--cc=tjeznach@rivosinc.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
all inboxes | Powered by JetHome®