lkml.org 
[lkml]   [2017]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 0/3] add %pX specifier
Hi Tobin,

On Wed, Oct 11, 2017 at 1:09 AM, Tobin C. Harding <me@tobin.cc> wrote:
>
> + hashval = hash_three_words(
> + (unsigned long)ptr,
> + (unsigned long)ptr >> 16 >> 16,
> + boot_time_random_int);

This is most likely not what you want to be using. Take a look at the
siphash_* set of functions. If you're just hashing 1 64-bit pointer
with some secret, use siphash_1u64, for example. That's the right
interface for this purpose.

Regards,
Jason

\
 
 \ /
  Last update: 2017-10-11 22:10    [W:0.096 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site