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: <CAHk-=wjUp5+tcsHG89ieuwa0wUtSWWBWRt8xOsoZ1nskZbbk-g@mail.gmail.com>
Date:   Tue, 4 Jul 2023 11:36:06 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     "Liam R. Howlett" <Liam.Howlett@...cle.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Oliver Sang <oliver.sang@...el.com>
Subject: Re: [PATCH] mm/mmap: Clean up validate_mm() calls

On Tue, 4 Jul 2023 at 11:25, Liam R. Howlett <Liam.Howlett@...cle.com> wrote:
>
> validate_mm() calls are too spread out and duplicated in numerous
> locations.  Also, now that the stack write is done under the write lock,
> it is not necessary to validate the mm prior to write operations.

So while I applied the fixes directly since I was doing all the
write-locking stuff (and asked for the locking cleanup), I'm hoping
these kinds of cleanups will now go back to normal and go through
Andrew.

I do have a question related to the write locking: now that we should
always hold the mmap lock for writing when doing any modifications,
can the "lock_is_held()" assertions be tightened?

Right now it's "any locking", but for actual modification it should
probably be using

     lockdep_is_held_type(mt->ma_external_lock, 1)

but there's just one 'mt_lock_is_held()' function (presumably because
the internal lock is always just a spinlock that doesn't have the
reader/writer distinction).

              Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ