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] [day] [month] [year] [list]
Message-ID: <d4a204f74810e2a6445fe12dbf3b71695aa9b755.camel@mediatek.com>
Date:   Fri, 4 Nov 2022 09:29:55 +0000
From:   Nancy Lin (林欣螢) <Nancy.Lin@...iatek.com>
To:     "nfraprado@...labora.com" <nfraprado@...labora.com>
CC:     "llvm@...ts.linux.dev" <llvm@...ts.linux.dev>,
        Yongqiang Niu (牛永强) 
        <yongqiang.niu@...iatek.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        Singo Chang (張興國) 
        <Singo.Chang@...iatek.com>,
        "nathan@...nel.org" <nathan@...nel.org>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        "chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>,
        Jason-JH Lin (林睿祥) 
        <Jason-JH.Lin@...iatek.com>,
        "linux@...ck-us.net" <linux@...ck-us.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "daniel@...ll.ch" <daniel@...ll.ch>,
        "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        Project_Global_Chrome_Upstream_Group 
        <Project_Global_Chrome_Upstream_Group@...iatek.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "wim@...ux-watchdog.org" <wim@...ux-watchdog.org>,
        "matthias.bgg@...il.com" <matthias.bgg@...il.com>,
        "airlied@...ux.ie" <airlied@...ux.ie>,
        "angelogioacchino.delregno@...labora.com" 
        <angelogioacchino.delregno@...labora.com>,
        "ndesaulniers@...gle.com" <ndesaulniers@...gle.com>
Subject: Re: [PATCH v27 05/11] soc: mediatek: refine code to use
 mtk_mmsys_update_bits API

Dear Nicolas,

Thanks for the review.

On Thu, 2022-11-03 at 16:32 -0400, Nícolas F. R. A. Prado wrote:
> On Thu, Nov 03, 2022 at 11:25:06AM +0800, Nancy.Lin wrote:
> [..]
> > --- a/drivers/soc/mediatek/mtk-mmsys.c
> > +++ b/drivers/soc/mediatek/mtk-mmsys.c
> 
> [..]
> > +static void mtk_mmsys_update_bits(struct mtk_mmsys *mmsys, u32
> > offset, u32 mask, u32 val)
> > +{
> > +	u32 tmp;
> > +
> > +	tmp = readl_relaxed(mmsys->regs + offset);
> > +	tmp = (tmp & ~mask) | val;
> 
> You should mask the value before writing to prevent bad values from
> overwriting
> bits outside the mask.
> 
> 	tmp = (tmp & ~mask) | (val & mask);
> 
> With that,
> 
> Reviewed-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
> 
> Thanks,
> Nícolas

OK, I will fix it in the next revision.

Thanks,
Nancy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ