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: <20190827121956.6kitf62spfbi7pdk@rric.localdomain>
Date:   Tue, 27 Aug 2019 12:20:05 +0000
From:   Robert Richter <rrichter@...vell.com>
To:     Borislav Petkov <bp@...en8.de>
CC:     James Morse <james.morse@....com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Tony Luck <tony.luck@...el.com>,
        Jason Baron <jbaron@...mai.com>,
        Qiuxu Zhuo <qiuxu.zhuo@...el.com>,
        Tero Kristo <t-kristo@...com>,
        "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 06/24] EDAC: Kill EDAC_DIMM_PTR() macro

On 13.08.19 16:59:47, Borislav Petkov wrote:
> > + *
> > + * For 2 layers, this macro is similar to allocate a bi-dimensional array
> > + * and to return "dimms[layer0][layer1]";
> > + *
> > + * For 3 layers, this macro is similar to allocate a tri-dimensional array
> > + * and to return "dimms[layer0][layer1][layer2]";
> > + */
> > +static inline struct dimm_info *
> > +edac_get_dimm(struct mem_ctl_info *mci, int layer0, int layer1, int layer2)
> > +{
> > +	int index = layer0;
> > +
> > +	if (index >= 0 && mci->n_layers > 1)
> 
> Can layer0 be negative here to warrant that check?

Yes, if a mem controller can not determine a dimm's position, this
function can be called with layers set to -1.

I have reworked the patch according to all of your comments.

Thanks for review,

-Robert

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ