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: <CAOJsxLHuX-nXFS6Dp+X=_hOrbT=-FUvWF_oM+6q508r=MNnFrQ@mail.gmail.com>
Date:   Sun, 30 Aug 2020 11:01:22 +0300
From:   Pekka Enberg <penberg@...il.com>
To:     Zong Li <zong.li@...ive.com>
Cc:     Palmer Dabbelt <palmer@...belt.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        david.abdurachmanov@...ive.com,
        linux-riscv <linux-riscv@...ts.infradead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Palmer Dabbelt <palmerdabbelt@...gle.com>
Subject: Re: [PATCH v3 3/3] riscv: Add cache information in AUX vector

On Fri, Aug 28, 2020 at 10:09 AM Zong Li <zong.li@...ive.com> wrote:
> +uintptr_t get_cache_geometry(u32 level, enum cache_type type)
> +{
> +       struct cacheinfo *this_leaf = get_cacheinfo(level, type);
> +       uintptr_t ret = (this_leaf->ways_of_associativity << 16 |
> +                        this_leaf->coherency_line_size);

You are dereferencing "this_leaf" without checking if it's NULL here.

> +
> +       return this_leaf ? ret : 0;
> +}

- Pekka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ