Bug 1560191

Summary: madvise.2: Document MADV_WIPEONFORK and MADV_KEEPONFORK
Product: Red Hat Enterprise Linux 7 Reporter: Rafael Aquini <aquini>
Component: man-pages-overridesAssignee: Nikola Forró <nforro>
Status: CLOSED ERRATA QA Contact: Jan Houska <jhouska>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: djez, nforro, smoroney, vondruch
Target Milestone: alphaKeywords: ManPageChange, Patch
Target Release: 7.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: man-pages-overrides-7.6.0-1.el7 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 11:34:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1476297    
Bug Blocks: 1592878    

Description Rafael Aquini 2018-03-24 15:55:01 UTC
Via Bug 1476297 we're backporting these new advice into RHEL7's madvise(2) syscall, and as such their availability and behaviour must be noted accordingly in the man pages.

Comment 10 Jan Houska 2018-08-28 10:04:46 UTC
VERIFIED

diff OLD (man-pages-overrides-7.5.2-1.el7) NEW (man-pages-overrides-7.6.2-1.el7)
91a93,103
>        MADV_WIPEONFORK (since Linux 4.14)
>               Present  the  child  process  with zero-filled memory in this range after a fork(2).  This is useful in forking servers in order to ensure that sensitive per-process data
>               (for example, PRNG seeds, cryptographic secrets, and so on) is not handed to child processes.
> 
>               The MADV_WIPEONFORK operation can be applied only to private anonymous pages (see mmap(2)).
> 
>               Within the child created by fork(2), the MADV_WIPEONFORK setting remains in place on the specified address range.  This setting is cleared during execve(2).
> 
>        MADV_KEEPONFORK (since Linux 4.14)
>               Undo the effect of an earlier MADV_WIPEONFORK.
> 
111a124,125
>        EINVAL advice is MADV_FREE or MADV_WIPEONFORK but the specified address range includes file, Huge TLB, MAP_SHARED, or VM_PFNMAP ranges.
> 
126c140
<        The current Linux implementation (2.4.0) views this system call more as a command than as advice and hence may return an error when it cannot do what  it  usually  would  do  in
---
>        The  current  Linux  implementation  (2.4.0)  views this system call more as a command than as advice and hence may return an error when it cannot do what it usually would do in
129c143
<        The  Linux  implementation  requires  that  the  address addr be page-aligned, and allows length to be zero.  If there are some parts of the specified address range that are not
---
>        The Linux implementation requires that the address addr be page-aligned, and allows length to be zero.  If there are some parts of the  specified  address  range  that  are  not
136c150
<        This  page  is  part  of  release  3.53  of  the  Linux  man-pages  project.   A  description  of  the  project,  and  information  about  reporting  bugs,  can  be   found   at
---
>        This   page   is  part  of  release  3.53  of  the  Linux  man-pages  project.   A  description  of  the  project,  and  information  about  reporting  bugs,  can  be  found  at

Comment 13 errata-xmlrpc 2018-10-30 11:34:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3254