This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]



This one is a cover letter. The patch and its cover are in a single
thread though.

That's the patch:

I agree about the DSO truncation but MAP_DENYWRITE functionality has
been removed
as it effectively allowed anyone with read permissions to block
writing to a file by using mmap
with this flag.

Right now it just pollutes the strace output and confuses people about how DSOs
work (e.g. why cp of a new library over an old one will most likely
result in a segfault
while mv from the same file system will not).

It is hard for me to tell what kind of mechanism would make a better
job in the Linux kernel.

On Sat, Sep 3, 2016 at 9:58 PM, Florian Weimer <> wrote:
> * Dmitrii Shcherbakov:
> > Dmitrii Shcherbakov (1):
> >   dl-load.h: Remove MAP_DENYWRITE from MAP_COPY definition
> The patch seems to be missing, but I can guess what it looks like.
> I wonder if the kernel can do a better job here.  Truncation of DSOs
> is a common source of application crashes because you either get
> SIGBUS immediatelly, or a crash because private writeable mappings are
> cleared.  And it's not just about executable mappings, OpenJDK faces
> the same issue with mapped JARs.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]