mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
When choosing segments to write to the core file, don't assume that
writable implies readable.
This commit is contained in:
parent
5ee58402df
commit
6bb20c5063
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=39311
@ -26,7 +26,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: imgact_elf.c,v 1.31 1998/09/14 22:46:04 jdp Exp $
|
||||
* $Id: imgact_elf.c,v 1.32 1998/09/15 21:46:34 jdp Exp $
|
||||
*/
|
||||
|
||||
#include "opt_rlimit.h"
|
||||
@ -891,7 +891,8 @@ each_writable_segment(p, func, closure)
|
||||
vm_object_t backobj;
|
||||
|
||||
if (entry->eflags & (MAP_ENTRY_IS_A_MAP|MAP_ENTRY_IS_SUB_MAP) ||
|
||||
!(entry->protection & VM_PROT_WRITE))
|
||||
(entry->protection & (VM_PROT_READ|VM_PROT_WRITE)) !=
|
||||
(VM_PROT_READ|VM_PROT_WRITE))
|
||||
continue;
|
||||
|
||||
/* Find the deepest backing object. */
|
||||
|
Loading…
Reference in New Issue
Block a user