lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171009182751.5e76bd2e@gandalf.local.home>
Date:   Mon, 9 Oct 2017 18:27:51 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Michael Sartain <mikesart@...tmail.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/5] trace-cmd: Add ULL suffix to MISSING_EVENTS since
 ints shouldn't be left shifted by 31

On Sat, 12 Aug 2017 11:30:45 -0600
Michael Sartain <mikesart@...tmail.com> wrote:


> Signed-off-by: Michael Sartain <mikesart@...tmail.com>
> ---
>  kbuffer-parse.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kbuffer-parse.c b/kbuffer-parse.c
> index 4e6e95e..dde642c 100644
> --- a/kbuffer-parse.c
> +++ b/kbuffer-parse.c
> @@ -24,8 +24,8 @@
>  
>  #include "kbuffer.h"
>  
> -#define MISSING_EVENTS (1 << 31)

Actually, why not? This could also be just UL, because it's fine to
shift 31, that would give us: 0x80000000  And that bit is all we care
for.

-- Steve

> -#define MISSING_STORED (1 << 30)
> +#define MISSING_EVENTS (1ULL << 31)
> +#define MISSING_STORED (1ULL << 30)
>  
>  #define COMMIT_MASK ((1 << 27) - 1)
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ