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: <20230822095847.GA20667@willie-the-truck>
Date:   Tue, 22 Aug 2023 10:58:47 +0100
From:   Will Deacon <will@...nel.org>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Qi Zheng <zhengqi.arch@...edance.com>,
        Qi Zheng <qi.zheng@...ux.dev>, catalin.marinas@....com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        muchun.song@...ux.dev, pasha.tatashin@...een.com,
        wangkefeng.wang@...wei.co
Subject: Re: [PATCH] arm64: mm: use ptep_clear() instead of pte_clear() in
 clear_flush()

On Mon, Aug 21, 2023 at 01:21:19PM -0700, Andrew Morton wrote:
> On Fri, 11 Aug 2023 19:28:41 +0800 Qi Zheng <zhengqi.arch@...edance.com> wrote:
> 
> > Will Deacon <will@...nel.org>于2023年8月11日 周五19:21写道:
> > 
> > > On Fri, Aug 11, 2023 at 07:16:20PM +0800, Qi Zheng wrote:
> > > >    Will Deacon <[1]will@...nel.org>于2023年8月11日 周五19:03写道:
> > > >
> > > >      On Thu, Aug 10, 2023 at 09:32:41AM +0000, Qi Zheng wrote:
> > > >      > From: Qi Zheng <[2]zhengqi.arch@...edance.com>
> > > >      >
> > > >      > In clear_flush(), the original pte may be a present entry, so we
> > > >      should
> > > >      > use ptep_clear() to let page_table_check track the pte clearing
> > > >      operation,
> > > >      > otherwise it may cause false positive in subsequent set_pte_at().
> > > >
> > > >      Isn't this true for most users of pte_clear()? There are some in the
> > > >      core
> > > >      code, so could they trigger the false positive as well?
> > > >
> > > >    No, the PTE entry in other places where pte_clear() is used is
> > > non-present
> > > >    PTE.
> > > >    The page_table_check does not does track the pte operation in this
> > > case,
> > > >    so it will not cause false positives.
> > >
> > > Are you sure? For example, the call from flush_all_zero_pkmaps() in
> > > highmem.c really looks like it's clearing a valid entry. Not that arm64
> > > cares about highmem, but still.
> > 
> > 
> > Ah, this is init_mm, not user mm, page_table_check does not care about this
> > case.
> 
> It's unclear where we stand with this patch.  An ack or a nack, please?

Sorry Andrew, I saw you'd queued it so I marked it as "done" on my list. I
think it's fine:

Acked-by: Will Deacon <will@...nel.org>

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ