From: Luca Boccassi <bluca@debian.org>
To: Chas Williams <3chas3@gmail.com>, dev@dpdk.org
Cc: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com,
Chas Williams <chas3@att.com>
Subject: Re: [PATCH] hash: document rte_jhash() boundary behavior
Date: Tue, 19 Sep 2017 11:07:55 +0100 [thread overview]
Message-ID: <1505815675.19272.19.camel@debian.org> (raw)
In-Reply-To: <20170918194740.23057-1-3chas3@gmail.com>
On Mon, 2017-09-18 at 15:47 -0400, Chas Williams wrote:
> From: Chas Williams <chas3@att.com>
>
> Due to the uint32_t accesses in the hash computation, keys that
> aren't
> aligned to a uint32_t boundary or multiples of uint32_t in length,
> may
> see accesses beyond the end of the key. This may cross a page
> boundary.
>
> Signed-off-by: Chas Williams <chas3@att.com>
> ---
> lib/librte_hash/rte_jhash.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/lib/librte_hash/rte_jhash.h
> b/lib/librte_hash/rte_jhash.h
> index 207478c..3eca138 100644
> --- a/lib/librte_hash/rte_jhash.h
> +++ b/lib/librte_hash/rte_jhash.h
> @@ -290,7 +290,10 @@ rte_jhash_32b_2hashes(const uint32_t *k,
> uint32_t length, uint32_t *pc, uint32_t
> /**
> * The most generic version, hashes an arbitrary sequence
> * of bytes. No alignment or length assumptions are made about
> - * the input key.
> + * the input key. For keys not aligned to four byte boundaries
> + * or a multiple of four bytes in length, the memory region
> + * just after may be read (but not used in the computation).
> + * This may cross a page boundary.
> *
> * @param key
> * Key to calculate hash of.
Acked-by: Luca Boccassi <bluca@debian.org>
--
Kind regards,
Luca Boccassi
next prev parent reply other threads:[~2017-09-19 10:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 19:47 [PATCH] hash: document rte_jhash() boundary behavior Chas Williams
2017-09-19 10:07 ` Luca Boccassi [this message]
2017-09-19 13:33 ` Mcnamara, John
2017-10-05 21:37 ` Thomas Monjalon
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=1505815675.19272.19.camel@debian.org \
--to=bluca@debian.org \
--cc=3chas3@gmail.com \
--cc=bruce.richardson@intel.com \
--cc=chas3@att.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.