diff options
author | jdp <jdp@FreeBSD.org> | 1998-09-15 22:07:20 +0000 |
---|---|---|
committer | jdp <jdp@FreeBSD.org> | 1998-09-15 22:07:20 +0000 |
commit | 13fbdd93b8e155b78b48c38b22fcc3137014fed2 (patch) | |
tree | 1f41498bbcca6cc5ac780546006b3eb71d3c0cc2 /sys | |
parent | 77349ff3899e25787526114a5f5460ef796106ec (diff) | |
download | FreeBSD-src-13fbdd93b8e155b78b48c38b22fcc3137014fed2.zip FreeBSD-src-13fbdd93b8e155b78b48c38b22fcc3137014fed2.tar.gz |
When choosing segments to write to the core file, don't assume that
writable implies readable.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/imgact_elf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 2691c12..5c93c5d 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -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. */ |