mbox series

[v2,0/3] linux: Update the mremap C implementation [BZ #31968]

Message ID 20240716224321.2352246-1-hjl.tools@gmail.com
Headers show
Series linux: Update the mremap C implementation [BZ #31968] | expand

Message

H.J. Lu July 16, 2024, 10:43 p.m. UTC
Changes in v2:

1. Update mremap manual entry.
2. Remove linux-support.h.
3. Split a single mremap test into 3 separate tests.

---
1. Update the mremap C implementation to support the optional argument for
MREMAP_DONTUNMAP added in Linux 5.7 since it may not always be correct
to implement a variadic function as a non-variadic function on all Linux
targets.  Return MAP_FAILED and set errno to EINVAL for unknown flag bits.
2. Update mremap manual entry.
3. Add tests for MREMAP_MAYMOVE and MREMAP_FIXED.  On Linux, also test
MREMAP_DONTUNMAP.

H.J. Lu (3):
  linux: Update the mremap C implementation [BZ #31968]
  mremap: Update manual entry
  Add mremap tests

 manual/llio.texi                            | 41 +++++++++++---
 misc/Makefile                               |  2 +
 misc/tst-mremap1.c                          | 46 +++++++++++++++
 misc/tst-mremap2.c                          | 53 ++++++++++++++++++
 sysdeps/unix/sysv/linux/Makefile            |  1 +
 sysdeps/unix/sysv/linux/mremap.c            | 14 ++++-
 sysdeps/unix/sysv/linux/tst-linux-mremap1.c | 62 +++++++++++++++++++++
 7 files changed, 211 insertions(+), 8 deletions(-)
 create mode 100644 misc/tst-mremap1.c
 create mode 100644 misc/tst-mremap2.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-linux-mremap1.c