Thread (39 messages) 39 messages, 12 authors, 2024-12-26

Re: [PATCH v3 4/7] can: Add Nuvoton NCT6694 CAN support

From: Vincent Mailhol <hidden>
Date: 2024-12-16 17:15:38
Also in: linux-can, linux-gpio, linux-hwmon, linux-i2c, linux-rtc, linux-watchdog, lkml

On 16/12/2024 at 15:58, Ming Yu wrote:
Dear Vincent,

Thank you for your comments,

Vincent Mailhol [off-list ref] 於 2024年12月11日 週三 下午11:25寫道:
(...)
quoted
quoted
quoted
+     cf->len = xmit->dlc;
what does xmit->dlc contain? The DLC or the length?
+1

Also, do not trust the device data. Even if SPI attacks are less
common, make sure to sanitize this length.

  cf->len = canfd_sanitize_len(xmit->dlc);

Or

  cf->len = canfd_sanitize_len(xmit->dlc);

if xmit->dlc is in fact a DLC.
Excuse me, the xmit->dlc is actual data length.
Does it need to be fixed?
Yes, name is xmit->len. DLC has a different meaning.


Yours sincerely,
Vincent Mailhol
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help