mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Stéphane Grosjean" <stephane.grosjean@free.fr>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: mailhol@kernel.org, linux-kernel@vger.kernel.org,
	linux-can@vger.kernel.org,  kernel@pengutronix.de,
	s grosjean <s.grosjean@peak-system.fr>,
	 kuba@kernel.org
Subject: Re: [PATCH can-next 6/7] can: peak_usb: Add bus error reporting for the PCAN-USB FD family
Date: Tue, 6 Oct 2026 17:11:08 +0200 (CEST)	[thread overview]
Message-ID: <597196165.930416749.1791299468914.JavaMail.root@zimbra65-e11.priv.proxad.net> (raw)
In-Reply-To: <20261005-ancient-viper-of-swiftness-c884c3-mkl@pengutronix.de>

Hi Marc,

I think I've pulled on a loose thread and ended up uncovering a much larger issue.

My original goal was to work on some improvements and cleanup for the PEAK USB drivers. However, while reviewing the series, Sashiko started pointing out places where the new code was still trusting data received from the USB device without sufficient validation.

After fixing those issues and respinning the series, the next round of comments raised a different question: if these checks are necessary in the newly added code, why are similar assumptions still present elsewhere in the driver?

The more I look at it, the more it seems that I'm mixing two different objectives in the same series:

- functional improvements and cleanups intended for linux-can-next,
- hardening changes required because USB devices can no longer be considered inherently trustworthy.

Given that every new fix tends to reveal additional places where the driver relies on the same trust assumptions, I wonder whether it would be better to pause the planned enhancements for now and first perform a dedicated pass over the entire driver focused on robustness and security.

My idea would be to start with a separate series whose sole purpose is to audit and harden the driver against malformed or unexpected data coming from the USB device, and only resume the functional improvements once that baseline is in place.

What do you think?

Best regards,

Stéphane

----- Mail original -----
> On 05.10.2026 16:22:12, Stéphane Grosjean wrote:
> > Can you let me know if I need to make changes myself to these
> > patches
> > you sent,
> 
> Sure!
> 
> > and if so, how? (Should the new requested changes—which are
> > unrelated to the original patch—be included in a new version? Or in
> > a
> > different series?...)
> 
> As I'm not planing to work on this series, feel free to take it
> (including my patches), add your changes and send a v2.
> 
> FYI: you can import the series to your b4 with:
> 
> | b4 prep -n peak_usb_enhancements -f net-next/main -F
> | 20261002-peak_usb_enhancements-v1-0-50e965755c06@pengutronix.de
> 
> regards,
> Marc
> 
> --
> Pengutronix e.K.                 | Marc Kleine-Budde          |
> Embedded Linux                   | https://www.pengutronix.de |
> Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
> Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |
> 

  reply	other threads:[~2026-10-06 15:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02  7:55 [PATCH can-next 0/7] can: peak_usb: fixes, cleanups, bus error reporting and loopback mode Marc Kleine-Budde
2026-10-02  7:55 ` [PATCH can-next 1/7] can: peak_usb: fix missing CAN_ERR_FLAG when reporting error counters Marc Kleine-Budde
2026-10-02  7:55 ` [PATCH can-next 2/7] can: peak_usb: add missing includes Marc Kleine-Budde
2026-10-02  7:55 ` [PATCH can-next 3/7] can: peak_usb: sort struct peak_usb_adapter::ctrlmode_supported by value Marc Kleine-Budde
2026-10-02  7:55 ` [PATCH can-next 4/7] can: peak_usb: Add PCAN-USB bus errors reporting Marc Kleine-Budde
2026-10-03 23:00   ` netdev-bot+sashiko
2026-10-02  7:55 ` [PATCH can-next 5/7] can: peak_usb: Sort CAN_CTRLMODE flags by value Marc Kleine-Budde
2026-10-02  7:55 ` [PATCH can-next 6/7] can: peak_usb: Add bus error reporting for the PCAN-USB FD family Marc Kleine-Budde
2026-10-03 23:00   ` netdev-bot+sashiko
2026-10-05 14:22     ` Stéphane Grosjean
2026-10-05 21:45       ` Marc Kleine-Budde
2026-10-06 15:11         ` Stéphane Grosjean [this message]
2026-10-07 12:55           ` Marc Kleine-Budde
2026-10-07 13:25             ` Marc Kleine-Budde
2026-10-02  7:55 ` [PATCH can-next 7/7] can: peak_usb: Add support of loopback mode to " Marc Kleine-Budde
2026-10-03 23:00   ` netdev-bot+sashiko

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=597196165.930416749.1791299468914.JavaMail.root@zimbra65-e11.priv.proxad.net \
    --to=stephane.grosjean@free.fr \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=s.grosjean@peak-system.fr \
    /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®