mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Fertser <fercerpav@gmail.com>
To: kalavakunta.hari.prasad@gmail.com
Cc: sam@mendozajonas.com, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	npeacock@meta.com, akozlov@meta.com
Subject: Re: [PATCH net-next 2/2] net: ncsi: Fix GCPS 64-bit member variables
Date: Tue, 8 Apr 2025 01:23:05 +0300	[thread overview]
Message-ID: <Z/RQSfwH1CLcDEuT@home.paul.comp> (raw)
In-Reply-To: <1ee392cf6a639b47cf9aa648fbc1c11393e19748.1744048182.git.kalavakunta.hari.prasad@gmail.com>

Hello Hari,

Thank you for the patch.

On Mon, Apr 07, 2025 at 11:19:49AM -0700, kalavakunta.hari.prasad@gmail.com wrote:
> @@ -290,7 +298,8 @@ struct ncsi_rsp_gcps_pkt {
>  	__be32                  tx_1023_frames;    /* Tx 512-1023 bytes frames   */
>  	__be32                  tx_1522_frames;    /* Tx 1024-1522 bytes frames  */
>  	__be32                  tx_9022_frames;    /* Tx 1523-9022 bytes frames  */
> -	__be32                  rx_valid_bytes;    /* Rx valid bytes             */
> +	__be32                  rx_valid_bytes_hi; /* Rx valid bytes             */
> +	__be32                  rx_valid_bytes_lo; /* Rx valid bytes             */

Why not __be64 then?

>  	__be32                  rx_runt_pkts;      /* Rx error runt packets      */
>  	__be32                  rx_jabber_pkts;    /* Rx error jabber packets    */
>  	__be32                  checksum;          /* Checksum                   */

I wonder how come this problem you're fixing wasn't spotted earlier,
as your patch is changing the checksum offset within the struct it
means the checksum isn't properly checked at all and neither is the
kernel checking that the size of the returned packet matches the size
of the struct?

  reply	other threads:[~2025-04-07 22:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 18:19 [PATCH net-next 0/2] GCPS Spec Compliance Patch Set kalavakunta.hari.prasad
2025-04-07 18:19 ` [PATCH net-next 1/2] net: ncsi: Format structure for longer names kalavakunta.hari.prasad
2025-04-07 18:19 ` [PATCH net-next 2/2] net: ncsi: Fix GCPS 64-bit member variables kalavakunta.hari.prasad
2025-04-07 22:23   ` Paul Fertser [this message]
2025-04-07 21:44 ` [PATCH net-next 0/2] GCPS Spec Compliance Patch Set Sam Mendoza-Jonas
2025-04-08 17:01   ` Hari Kalavakunta
2025-04-08 18:26     ` Paul Fertser
2025-04-08 18:53       ` Hari Kalavakunta
2025-04-08 19:19         ` Paul Fertser
2025-04-08 22:02           ` Hari Kalavakunta
2025-04-08 22:35             ` Paul Fertser
2025-04-08 23:23               ` Hari Kalavakunta
2025-04-09  3:27                 ` Hari Kalavakunta
2025-04-09  9:08                 ` Paul Fertser
2025-04-09 16:39                   ` Hari Kalavakunta

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=Z/RQSfwH1CLcDEuT@home.paul.comp \
    --to=fercerpav@gmail.com \
    --cc=akozlov@meta.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kalavakunta.hari.prasad@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=npeacock@meta.com \
    --cc=pabeni@redhat.com \
    --cc=sam@mendozajonas.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

all inboxes | Powered by JetHome®