public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Andi Shyti <andi.shyti@kernel.org>
Cc: Akhil R <akhilrajeev@nvidia.com>,
	ldewangan@nvidia.com, digetx@gmail.com, thierry.reding@gmail.com,
	jonathanh@nvidia.com, wsa@kernel.org, linux-i2c@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
	Thierry Reding <treding@nvidia.com>
Subject: Re: [PATCH v2 RESEND] i2c: tegra: check msg length in SMBUS block read
Date: Tue, 29 Apr 2025 05:17:58 +0200	[thread overview]
Message-ID: <aBBE5mgqGk0yXQWN@shikoro> (raw)
In-Reply-To: <j3jxuuwu2joyn6jsfa63lkkuwqazd2mpeki6gamdpktllhpkhv@tfoqnztsa7zw>

[-- Attachment #1: Type: text/plain, Size: 759 bytes --]


> I agree with Thierry, this check is driver independent and it
> should be done in the library. Anyway, for now, I'm going to take
> this as this check is now left to the drivers and it would be
> huge to shift it somewhere else.

The big picture is to support SMBUS3 somewhen which allows for 255 byte
transfers. Besides that, it usually is not possible to check the value
outside the driver because it has to act on the value right away. That
is, the length comes in and exactly this number of bytes has to be read
in the same message,

> Before I merge, I want to know if you have you seen any failure
> here? What is the reason you are sending it?

Usually some devices just send more bytes because they can. A value of 0
would be interesting in deed.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2025-04-29  3:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24  5:33 [PATCH v2 RESEND] i2c: tegra: check msg length in SMBUS block read Akhil R
2025-04-28 23:34 ` Andi Shyti
2025-04-29  3:17   ` Wolfram Sang [this message]
2025-04-29  4:37     ` Akhil R
2025-04-29  5:41       ` Wolfram Sang
2025-04-29  9:51         ` Akhil R
2025-04-29 11:29           ` Andi Shyti

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=aBBE5mgqGk0yXQWN@shikoro \
    --to=wsa+renesas@sang-engineering.com \
    --cc=akhilrajeev@nvidia.com \
    --cc=andi.shyti@kernel.org \
    --cc=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=treding@nvidia.com \
    --cc=wsa@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