From: Jarkko Sakkinen <jarkko@kernel.org>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: linux-integrity@vger.kernel.org, Peter Huewe <peterhuewe@gmx.de>,
Jason Gunthorpe <jgg@ziepe.ca>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Stuart Yoder <stuart.yoder@arm.com>,
Chu Guangqing <chuguangqing@inspur.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tpm_crb: Remove dead code from crb_map_res()
Date: Tue, 1 Sep 2026 19:55:27 +0300 [thread overview]
Message-ID: <apcDfzVRBtwghIuN@kernel.org> (raw)
In-Reply-To: <apb2LdIAqUHROYBt@sgarzare-redhat>
On Tue, Sep 01, 2026 at 06:06:40PM +0200, Stefano Garzarella wrote:
> On Tue, Sep 01, 2026 at 05:29:46PM +0300, Jarkko Sakkinen wrote:
> > In all the pre-existing call sites both @iomem and @iobase_ptr are
> > either NULL or non-NULL.
>
> I don't know this code, but I'm a bit worried about iobase_ptr and
> *iobase_ptr. IIUC it is true that iobase_ptr and iores are either NULL or
> non-NULL, but here we are removing the case where *iobase_ptr is NULL.
>
> Now looking at crb_map_io(), IIUC iobase_array is initialized with NULL
> pointers and the code we are removing was the only one initializing those
> pointers IIUC, or am I missing something?
crb_map_io() sets both to non-NULL value, or leaves both as NULL.
crb_map_pluton() explicitly calls both explicitly with NULL.
If anything else will arrive too crb_map_res, that'd be unexpected
input, which without this patch will go unnoticed and will lead to
undefined behavior.
Not sure what is the argument here really.
>
> Thanks,
> Stefano
BR, Jarkko
next prev parent reply other threads:[~2026-09-01 16:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 14:29 [PATCH] tpm_crb: Remove dead code from crb_map_res() Jarkko Sakkinen
2026-09-01 16:06 ` Stefano Garzarella
2026-09-01 16:55 ` Jarkko Sakkinen [this message]
2026-09-02 8:54 ` Stefano Garzarella
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=apcDfzVRBtwghIuN@kernel.org \
--to=jarkko@kernel.org \
--cc=chuguangqing@inspur.com \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=rafael.j.wysocki@intel.com \
--cc=sgarzare@redhat.com \
--cc=stuart.yoder@arm.com \
/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