netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: lesliemonis@gmail.com
Cc: netdev@vger.kernel.org, tahiliani@nitk.edu.in, gautamramk@gmail.com
Subject: Re: [PATCH net-next 3/4] pie: remove pie_vars->accu_prob_overflows
Date: Tue, 03 Mar 2020 17:43:05 -0800 (PST)	[thread overview]
Message-ID: <20200303.174305.187736433958803345.davem@davemloft.net> (raw)
In-Reply-To: <20200302151831.2811-4-lesliemonis@gmail.com>

From: Leslie Monis <lesliemonis@gmail.com>
Date: Mon,  2 Mar 2020 20:48:30 +0530

> -	prandom_bytes(&rnd, 8);
> +	prandom_bytes(&rnd, 7);

This is undefined because it depends upon the endianness whether you
are initializing the more significant 7 bytes or the least significant
7 bytes of rnd.

I think you should just keep this at 8 and explicitly clear out the
top byte.


  reply	other threads:[~2020-03-04  1:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-02 15:18 [PATCH net-next 0/4] pie: minor improvements Leslie Monis
2020-03-02 15:18 ` [PATCH net-next 1/4] pie: use term backlog instead of qlen Leslie Monis
2020-03-02 15:18 ` [PATCH net-next 2/4] pie: remove unnecessary type casting Leslie Monis
2020-03-02 15:18 ` [PATCH net-next 3/4] pie: remove pie_vars->accu_prob_overflows Leslie Monis
2020-03-04  1:43   ` David Miller [this message]
2020-03-02 15:18 ` [PATCH net-next 4/4] pie: realign comment Leslie Monis

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=20200303.174305.187736433958803345.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=gautamramk@gmail.com \
    --cc=lesliemonis@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=tahiliani@nitk.edu.in \
    /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;
as well as URLs for NNTP newsgroup(s).