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]
Date:   Thu, 12 Mar 2020 20:57:41 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Souptick Joarder <jrdr.linux@...il.com>
Cc:     Jérôme Glisse <jglisse@...hat.com>,
        Linux-MM <linux-mm@...ck.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/hmm.c : Remove additional check for
 lockdep_assert_held()

On Fri, 13 Mar 2020 09:17:22 +0530 Souptick Joarder <jrdr.linux@...il.com> wrote:

> On Fri, Mar 13, 2020 at 8:28 AM Andrew Morton <akpm@...ux-foundation.org> wrote:
> >
> > On Fri, 13 Mar 2020 07:41:00 +0530 Souptick Joarder <jrdr.linux@...il.com> wrote:
> >
> > > walk_page_range() already has a check for lockdep_assert_held().
> > > So additional check for lockdep_assert_held() can be removed from
> > > hmm_range_fault().
> > >
> > > ...
> > >
> > > --- a/mm/hmm.c
> > > +++ b/mm/hmm.c
> > > @@ -681,7 +681,6 @@ long hmm_range_fault(struct hmm_range *range, unsigned int flags)
> > >       struct mm_struct *mm = range->notifier->mm;
> > >       int ret;
> > >
> > > -     lockdep_assert_held(&mm->mmap_sem);
> > >
> > >       do {
> > >               /* If range is no longer valid force retry. */
> >
> > It isn't very obvious that hmm_range_fault() is and will only be called
> > from walk_page_range() (is it?)
> >
> 
> Sorry Andrew, didn't get this part ?
> * hmm_range_fault() is and will only be called
>  from walk_page_range() (is it?) *

The patch assumes that hmm_range_fault() will only ever be called via
walk_page_range().  How do we know this is the case?  And that it
always will be the case?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ