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: <CAKwvOd=egq-9JqMPX-OET1h5Fc6WNdpRKrNJgGD=vQig3ES91w@mail.gmail.com>
Date:   Fri, 14 Aug 2020 15:29:33 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     John Ogness <john.ogness@...utronix.de>
Cc:     Jan Kiszka <jan.kiszka@...mens.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Baoquan He <bhe@...hat.com>, Dave Young <dyoung@...hat.com>,
        Vivek Goyal <vgoyal@...hat.com>,
        Jonathan Corbet <corbet@....net>,
        Kieran Bingham <kbingham@...nel.org>,
        Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        LKML <linux-kernel@...r.kernel.org>,
        David Laight <David.Laight@...lab.com>
Subject: Re: [PATCH 1/2][next] scripts/gdb: add utils.read_ulong()

On Fri, Aug 14, 2020 at 2:25 PM John Ogness <john.ogness@...utronix.de> wrote:
>
> Add a function for reading unsigned long values, which vary in size
> depending on the architecture.
>
> Signed-off-by: John Ogness <john.ogness@...utronix.de>

Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>

/me wonders if there's any non-ILP32 or LP64 ARCH='s supported by the kernel.

> ---
>
>  based on next-20200814
>
>  scripts/gdb/linux/utils.py | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/scripts/gdb/linux/utils.py b/scripts/gdb/linux/utils.py
> index ea94221dbd39..ff7c1799d588 100644
> --- a/scripts/gdb/linux/utils.py
> +++ b/scripts/gdb/linux/utils.py
> @@ -123,6 +123,13 @@ def read_u64(buffer, offset):
>          return read_u32(buffer, offset + 4) + (read_u32(buffer, offset) << 32)
>
>
> +def read_ulong(buffer, offset):
> +    if get_long_type().sizeof == 8:
> +        return read_u64(buffer, offset)
> +    else:
> +        return read_u32(buffer, offset)
> +
> +
>  target_arch = None
>
>
> --
> 2.20.1
>


-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ