From: Greg KH <gregkh@linuxfoundation.org>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>,
srini@kernel.org, linux-arm-msm@vger.kernel.org,
quic_bkumar@quicinc.com, linux-kernel@vger.kernel.org,
quic_chennak@quicinc.com, dri-devel@lists.freedesktop.org,
arnd@arndb.de, dmitry.baryshkov@oss.qualcomm.com,
stable@kernel.org
Subject: Re: [PATCH v3 1/3] misc: fastrpc: Sanitize address logging and remove tabs
Date: Tue, 30 Dec 2025 14:47:37 +0100 [thread overview]
Message-ID: <2025123003-ecologist-foothill-09b8@gregkh> (raw)
In-Reply-To: <a8c6b4d9-83b6-45b5-9432-134023e2eadd@oss.qualcomm.com>
On Tue, Dec 30, 2025 at 02:23:55PM +0100, Konrad Dybcio wrote:
> On 12/30/25 12:02 PM, Ekansh Gupta wrote:
> > Avoid printing raw addresses in driver logs by using %p for remote
> > buffer addresses. This reduces the risk of information leaks and
> > conforms to kernel logging guidelines. Remove tabs in dev_*
> > messages.
> >
> > Fixes: 2419e55e532d ("misc: fastrpc: add mmap/unmap support")
> > Cc: stable@kernel.org
> > Signed-off-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
> > ---
> > drivers/misc/fastrpc.c | 19 ++++++++++---------
> > 1 file changed, 10 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
> > index ee652ef01534..408fe47e9db7 100644
> > --- a/drivers/misc/fastrpc.c
> > +++ b/drivers/misc/fastrpc.c
> > @@ -1830,13 +1830,13 @@ static int fastrpc_req_munmap_impl(struct fastrpc_user *fl, struct fastrpc_buf *
> > err = fastrpc_internal_invoke(fl, true, FASTRPC_INIT_HANDLE, sc,
> > &args[0]);
> > if (!err) {
> > - dev_dbg(dev, "unmmap\tpt 0x%09lx OK\n", buf->raddr);
> > + dev_dbg(dev, "unmap OK: raddr=%p\n", (void *)(unsigned long)buf->raddr);
>
> Would it be easier if we did away with the uintptr_t, since the protocol
> seems to assume all addresses are u64s anyway?
Why is a pointer being printed at all? That shouldn't be needed and is,
as always, a potential information leak.
thanks,
greg k-h
next prev parent reply other threads:[~2025-12-30 13:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-30 11:02 [PATCH v3 0/3] misc: fastrpc: Refactor and add userspace buffer support Ekansh Gupta
2025-12-30 11:02 ` [PATCH v3 1/3] misc: fastrpc: Sanitize address logging and remove tabs Ekansh Gupta
2025-12-30 13:23 ` Konrad Dybcio
2025-12-30 13:47 ` Greg KH [this message]
2025-12-30 11:02 ` [PATCH v3 2/3] misc: fastrpc: Refactor mmap and munmap logic into helper functions Ekansh Gupta
2025-12-30 11:02 ` [PATCH v3 3/3] misc: fastrpc: Support mapping userspace-allocated buffers Ekansh Gupta
2026-01-06 2:51 ` Dmitry Baryshkov
2026-01-29 10:39 ` Ekansh Gupta
2026-01-29 22:11 ` Rob Clark
2026-01-29 23:14 ` David Laight
2026-01-30 11:52 ` Ekansh Gupta
2026-01-30 2:29 ` Dmitry Baryshkov
2026-01-30 11:57 ` Ekansh Gupta
2026-02-09 1:39 ` Dmitry Baryshkov
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=2025123003-ecologist-foothill-09b8@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ekansh.gupta@oss.qualcomm.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_bkumar@quicinc.com \
--cc=quic_chennak@quicinc.com \
--cc=srini@kernel.org \
--cc=stable@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.