Thread (19 messages) 19 messages, 3 authors, 2020-10-12

Re: [PATCH net-next 8/9] bnxt_en: Refactor bnxt_dl_info_get().

From: Michael Chan <michael.chan@broadcom.com>
Date: 2020-10-11 22:49:47

On Sun, Oct 11, 2020 at 2:59 PM Jakub Kicinski [off-list ref] wrote:
On Sun, 11 Oct 2020 06:23:00 -0400 Michael Chan wrote:
quoted
+static int bnxt_dl_info_put(struct bnxt *bp, struct devlink_info_req *req,
+                         enum bnxt_dl_version_type type, const char *key,
+                         char *buf)
+{
+     if (!strlen(buf))
+             return 0;
I think buf can be directly read from FW in later patches, it'd be good
to see a strnlen(), or bnxt_hwrm_nvm_get_dev_info() ensuring strings
are null-terminated.
Our fw interface spec specifies a NULL terminated string to be
returned by firmware.  But we can probably add an additional check
when we process the firmware response.

Attachments

  • smime.p7s [application/pkcs7-signature] 4166 bytes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help