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: <87lf56edgz.fsf@oldenburg.str.redhat.com>
Date:   Thu, 12 Aug 2021 20:15:40 +0200
From:   Florian Weimer <fweimer@...hat.com>
To:     ebiederm@...ssion.com (Eric W. Biederman)
Cc:     "Andy Lutomirski" <luto@...nel.org>,
        "David Hildenbrand" <david@...hat.com>,
        "Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
        "Linus Torvalds" <torvalds@...ux-foundation.org>,
        "Andrew Morton" <akpm@...ux-foundation.org>,
        "Thomas Gleixner" <tglx@...utronix.de>,
        "Ingo Molnar" <mingo@...hat.com>, "Borislav Petkov" <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        "Al Viro" <viro@...iv.linux.org.uk>,
        "Alexey Dobriyan" <adobriyan@...il.com>,
        "Steven Rostedt" <rostedt@...dmis.org>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        "Arnaldo Carvalho de Melo" <acme@...nel.org>,
        "Mark Rutland" <mark.rutland@....com>,
        "Alexander Shishkin" <alexander.shishkin@...ux.intel.com>,
        "Jiri Olsa" <jolsa@...hat.com>,
        "Namhyung Kim" <namhyung@...nel.org>,
        "Petr Mladek" <pmladek@...e.com>,
        "Sergey Senozhatsky" <sergey.senozhatsky@...il.com>,
        "Andy Shevchenko" <andriy.shevchenko@...ux.intel.com>,
        "Rasmus Villemoes" <linux@...musvillemoes.dk>,
        "Kees Cook" <keescook@...omium.org>,
        "Greg Ungerer" <gerg@...ux-m68k.org>,
        "Geert Uytterhoeven" <geert@...ux-m68k.org>,
        "Mike Rapoport" <rppt@...nel.org>,
        "Vlastimil Babka" <vbabka@...e.cz>,
        "Vincenzo Frascino" <vincenzo.frascino@....com>,
        "Chinwen Chang" <chinwen.chang@...iatek.com>,
        "Michel Lespinasse" <walken@...gle.com>,
        "Catalin Marinas" <catalin.marinas@....com>,
        "Matthew Wilcox (Oracle)" <willy@...radead.org>,
        "Huang Ying" <ying.huang@...el.com>,
        "Jann Horn" <jannh@...gle.com>, "Feng Tang" <feng.tang@...el.com>,
        "Kevin Brodsky" <Kevin.Brodsky@....com>,
        "Michael Ellerman" <mpe@...erman.id.au>,
        "Shawn Anastasio" <shawn@...stas.io>,
        "Steven Price" <steven.price@....com>,
        "Nicholas Piggin" <npiggin@...il.com>,
        "Christian Brauner" <christian.brauner@...ntu.com>,
        "Jens Axboe" <axboe@...nel.dk>,
        "Gabriel Krisman Bertazi" <krisman@...labora.com>,
        "Peter Xu" <peterx@...hat.com>,
        "Suren Baghdasaryan" <surenb@...gle.com>,
        "Shakeel Butt" <shakeelb@...gle.com>,
        "Marco Elver" <elver@...gle.com>,
        "Daniel Jordan" <daniel.m.jordan@...cle.com>,
        "Nicolas Viennot" <Nicolas.Viennot@...sigma.com>,
        "Thomas Cedeno" <thomascedeno@...gle.com>,
        "Collin Fijalkovich" <cfijalkovich@...gle.com>,
        "Michal Hocko" <mhocko@...e.com>,
        "Miklos Szeredi" <miklos@...redi.hu>,
        "Chengguang Xu" <cgxu519@...ernel.net>,
        Christian König 
        <ckoenig.leichtzumerken@...il.com>, linux-unionfs@...r.kernel.org,
        "Linux API" <linux-api@...r.kernel.org>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        linux-fsdevel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v1 0/7] Remove in-tree usage of MAP_DENYWRITE

* Eric W. Biederman:

> Given that MAP_PRIVATE for shared libraries is our strategy for handling
> writes to shared libraries perhaps we just need to use MAP_POPULATE or a
> new related flag (perhaps MAP_PRIVATE_NOW) that just makes certain that
> everything mapped from the executable is guaranteed to be visible from
> the time of the mmap, and any changes from the filesystem side after
> that are guaranteed to cause a copy on write.

I think this is called MAP_COPY:

  <https://www.gnu.org/software/hurd/glibc/mmap.html>

If we could get that functionality, we would certainly use it in the
glibc dynamic loader.  And it's not just dynamic loaders that would
benefit.

But I assume there are some rather thorny issues around semantics.  If
the changed areas of the file are in the page cache already, everything
is okay.  But if parts of the file are changed or discarded that are
not, they would have to be read in first, which is rather awkward.

That's why I suggested the signal for all future accesses.  It seems
more tractable and addresses the largest issue (the difficulty of
figuring out why some processes crash occasionally).

Thanks,
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ