The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Hongbo Li <lihongbo22@huawei.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: <heikki.krogerus@linux.intel.com>, <nathan.c.rebello@gmail.com>,
	<kyungtae.kim@dartmouth.edu>, <linux-usb@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 6.6 & 5.10] usb: typec: ucsi: validate connector number in ucsi_connector_change
Date: Fri, 8 May 2026 20:59:06 +0800	[thread overview]
Message-ID: <1886be01-2dcf-4aa7-9aac-067634db4ce7@huawei.com> (raw)
In-Reply-To: <2026050843-denatured-bonfire-6337@gregkh>

Hi Greg,

On 2026/5/8 19:03, Greg KH wrote:
> On Fri, May 08, 2026 at 05:20:26PM +0800, Hongbo Li wrote:
>> Commit d2d8c17ac01a ("usb: typec: ucsi: validate connector
>> number in ucsi_notify_common()") and commit 5a1140404cbf ("usb:
>> typec: ucsi: skip connector validation before init") add the bounds
>> check when do the connector change both in pre-init notification and
>> the forward notifications. But they are difficult to backport to
>> early stable branch such as LTS 6.6, LTS 5.10 due to many dependencies.
>> Instead, we choose to validate connector number in ucsi_connector_change
>> directly to avoid out-of-range issue.
> 
> Why just these 2 branches?

I only noticed these two branches, but in fact, there are more.

> 
> And what specific commits are needed exactly?  Why not just backport
> them all?  that will make future changes apply properly as well, making

Commit d2d8c17ac01a ("usb: typec: ucsi: validate connector number in 
ucsi_notify_common()") use the ucsi_notify_common helper which is 
introduced in 584e8df58942 ("usb: typec: ucsi: extract common code for 
command handling"). This commit refactored part of the code and involves 
many modifications to USB ucsi controllers (such as stm32g0...), which 
were introduced after 6.6.

I think there are two possible modifications:
One is to adapt the modification for different branches, and the other 
is to modify the code in ucsi_connector_change (as in my commit).

Thanks,
Hongbo

> the overall work much less over time.
> 
> thanks,
> 
> greg k-h
> 

  reply	other threads:[~2026-05-08 12:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08  9:20 [PATCH 6.6 & 5.10] usb: typec: ucsi: validate connector number in ucsi_connector_change Hongbo Li
2026-05-08 11:03 ` Greg KH
2026-05-08 12:59   ` Hongbo Li [this message]
2026-05-08 13:04     ` Greg KH
2026-05-09  3:32       ` Hongbo Li
2026-05-09  3:52         ` Greg KH

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=1886be01-2dcf-4aa7-9aac-067634db4ce7@huawei.com \
    --to=lihongbo22@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=kyungtae.kim@dartmouth.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nathan.c.rebello@gmail.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