bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new module 'vma-prot'


From: Bruno Haible
Subject: new module 'vma-prot'
Date: Thu, 29 Aug 2024 23:59:59 +0200

<sys/mman.h> has functions for creating memory areas with a given protection,
and mprotect() for changing the protection. But it has no API for returning
the protection of an area!

This new module fills that gap.

Not by trying to write or execute the given memory (because that would
make side effects, and because establishing a SIGSEGV / SIGBUS handler
is not multithread-safe), but instead by walking through the VMAs.


2024-08-29  Bruno Haible  <bruno@clisp.org>

        vma-prot: Add tests.
        * tests/test-vma-prot.c: New file.
        * modules/vma-prot-tests: New file.

        vma-prot: New module.
        * lib/vma-prot.h: New file.
        * lib/vma-prot.c: New file.
        * modules/vma-prot: New file.

Attachment: 0001-vma-prot-New-module.patch
Description: Text Data

Attachment: 0002-vma-prot-Add-tests.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]