[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACKFLinkYZJLXvsMug1-8ohx92LwWw8Yvcbrw-TwULXD0TX-5A@mail.gmail.com>
Date: Sun, 11 Oct 2020 15:49:33 -0700
From: Michael Chan <michael.chan@...adcom.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: David Miller <davem@...emloft.net>,
Netdev <netdev@...r.kernel.org>,
Andrew Gospodarek <gospo@...adcom.com>,
Vasundhara Volam <vasundhara-v.volam@...adcom.com>
Subject: Re: [PATCH net-next 8/9] bnxt_en: Refactor bnxt_dl_info_get().
On Sun, Oct 11, 2020 at 2:59 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Sun, 11 Oct 2020 06:23:00 -0400 Michael Chan wrote:
> > +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.
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4166 bytes)
Powered by blists - more mailing lists