From: Joerg Roedel <joro@8bytes.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Will Deacon <will@kernel.org>,
Magnus Damm <damm+renesas@opensource.se>,
Arnd Bergmann <arnd@arndb.de>,
Robin Murphy <robin.murphy@arm.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Lu Baolu <baolu.lu@linux.intel.com>,
Vasant Hegde <vasant.hegde@amd.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu: ipmmu-vmsa: avoid Wformat-security warning
Date: Mon, 28 Apr 2025 13:20:26 +0200 [thread overview]
Message-ID: <aA9keotHp257k1cS@8bytes.org> (raw)
In-Reply-To: <20250423164006.2661372-1-arnd@kernel.org>
On Wed, Apr 23, 2025 at 06:40:02PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> iommu_device_sysfs_add() requires a constant format string, otherwise
> a W=1 build produces a warning:
>
> drivers/iommu/ipmmu-vmsa.c:1093:62: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
> 1093 | ret = iommu_device_sysfs_add(&mmu->iommu, &pdev->dev, NULL, dev_name(&pdev->dev));
> | ^~~~~~~~~~~~~~~~~~~~
> drivers/iommu/ipmmu-vmsa.c:1093:62: note: treat the string as an argument to avoid this
> 1093 | ret = iommu_device_sysfs_add(&mmu->iommu, &pdev->dev, NULL, dev_name(&pdev->dev));
> | ^
> | "%s",
>
> This was an old bug but I saw it now because the code was changed as part
> of commit d9d3cede4167 ("iommu/ipmmu-vmsa: Register in a sensible order").
>
> Fixes: 7af9a5fdb9e0 ("iommu/ipmmu-vmsa: Use iommu_device_sysfs_add()/remove()")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/iommu/ipmmu-vmsa.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied, thanks.
prev parent reply other threads:[~2025-04-28 11:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 16:40 [PATCH] iommu: ipmmu-vmsa: avoid Wformat-security warning Arnd Bergmann
2025-04-23 16:47 ` Jason Gunthorpe
2025-04-24 7:34 ` Geert Uytterhoeven
2025-04-28 11:20 ` Joerg Roedel [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=aA9keotHp257k1cS@8bytes.org \
--to=joro@8bytes.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=baolu.lu@linux.intel.com \
--cc=damm+renesas@opensource.se \
--cc=geert+renesas@glider.be \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=vasant.hegde@amd.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 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.