mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonas Jelonek <jelonek.jonas@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "Russell King" <linux@armlinux.org.uk>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Maxime Chevallier" <maxime.chevallier@bootlin.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Bjørn Mork" <bjorn@mork.no>, "Simon Horman" <horms@kernel.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH net-next v9 1/3] net: sfp: initialize i2c_block_size at adapter configure time
Date: Fri, 12 Jun 2026 16:14:06 +0200	[thread overview]
Message-ID: <ec27912c-a66e-4a81-8c8c-318d27ec62b5@gmail.com> (raw)
In-Reply-To: <20260603180607.353551af@kernel.org>

Hi Jakub,

sorry for the noise.

On 04.06.26 03:06, Jakub Kicinski wrote:
> In the meantime - AI seems to also be saying something the cap being
> potentially off by 1 in patch 2? We add 1 to the len? Maybe I'm
> misunderstanding..
>
> https://sashiko.dev/#/patchset/20260528205242.971410-2-jelonek.jonas@gmail.com

I had another look at that. The concern is theoretically valid, the I2C
write path prepends the length byte to the data buffer. This could exceed
the limit and would be rejected by I2C core/driver. But this is not a result
of my patch, it can also happen without. My patch probably just brought
that more into awareness.

However, this isn't triggerable right now IMO, thus has no practical
impact. In v8 I had a look at in-tree drivers with a potentially problematic
constellation of max_read_len and max_write_len [1]. And looking at the
SFP code, the biggest write being issued might end up with 3+1 bytes.
This doesn't reach any existing driver limit.

Given that, I'll send a v10.

Best,
Jonas

[1] https://lore.kernel.org/netdev/4a1b13f4-9c68-4f4c-a676-fd61e2aeeab0@gmail.com/

  parent reply	other threads:[~2026-06-12 14:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-28 20:52 [PATCH net-next v9 0/3] net: sfp: extend SMBus support Jonas Jelonek
2026-05-28 20:52 ` [PATCH net-next v9 1/3] net: sfp: initialize i2c_block_size at adapter configure time Jonas Jelonek
2026-06-04  1:06   ` Jakub Kicinski
2026-06-12  7:40     ` Jonas Jelonek
2026-06-12 14:14     ` Jonas Jelonek [this message]
2026-05-28 20:52 ` [PATCH net-next v9 2/3] net: sfp: apply I2C adapter quirks to limit block size Jonas Jelonek
2026-05-29 16:18   ` Maxime Chevallier
2026-05-28 20:52 ` [PATCH net-next v9 3/3] net: sfp: extend SMBus support Jonas Jelonek
2026-06-04  1:14 ` [PATCH net-next v9 0/3] " patchwork-bot+netdevbpf

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=ec27912c-a66e-4a81-8c8c-318d27ec62b5@gmail.com \
    --to=jelonek.jonas@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=bjorn@mork.no \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.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

all inboxes | Powered by JetHome®