From: Karl Mehltretter <kmehltretter@gmail.com>
To: Eddie James <eajames@linux.ibm.com>
Cc: Ninad Palsule <ninad@linux.ibm.com>,
Joel Stanley <joel@jms.id.au>,
linux-fsi@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fsi: i2cr-scom: Return -EFAULT on usercopy failures
Date: Thu, 15 Oct 2026 07:54:09 +0200 [thread overview]
Message-ID: <atBnlxyXloAAGK88@gmail.com> (raw)
In-Reply-To: <20260914062426.14140-1-kmehltretter@gmail.com>
On Mon, Sep 14, 2026 at 08:24:26AM +0100, Karl Mehltretter wrote:
> copy_to_user() and copy_from_user() return the number of bytes that were
> not copied. i2cr_scom_read() and i2cr_scom_write() return that value
> directly, so a usercopy fault is reported as a successful short I/O.
>
> Return -EFAULT when either copy fails.
>
> A temporary KUnit test called i2cr_scom_write() with an invalid user
> pointer. The unmodified kernel returned 8. With this change it returned
> -EFAULT. Both versions were booted under QEMU.
>
> Fixes: c0b34bed0bbf ("fsi: Add I2C Responder SCOM driver")
> Assisted-by: LLM
> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
A friendly ping on this usercopy error-handling fix.
Thanks,
Karl
prev parent reply other threads:[~2026-10-15 5:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 6:24 Karl Mehltretter
2026-10-15 5:54 ` Karl Mehltretter [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=atBnlxyXloAAGK88@gmail.com \
--to=kmehltretter@gmail.com \
--cc=eajames@linux.ibm.com \
--cc=joel@jms.id.au \
--cc=linux-fsi@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ninad@linux.ibm.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
all inboxes | Powered by JetHome®