1/* 2 * ---------------------------------------------------------------------------- 3 * "THE BEER-WARE LICENSE" (Revision 42): 4 * <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you 5 * can do whatever you want with this stuff. If we meet some day, and you think 6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp 7 * ---------------------------------------------------------------------------- 8 * |
9 * $FreeBSD: head/sys/kern/imgact_gzip.c 84783 2001-10-10 23:06:54Z ps $ |
10 * 11 * This module handles execution of a.out files which have been run through 12 * "gzip". This saves diskspace, but wastes cpu-cycles and VM. 13 * 14 * TODO: 15 * text-segments should be made R/O after being filled 16 * is the vm-stuff safe ? 17 * should handle the entire header of gzip'ed stuff. --- 186 unchanged lines hidden (view full) --- 204 gz->where = __LINE__; 205 return (-1); 206 } 207 /* 208 * text/data/bss must not exceed limits 209 */ 210 mtx_assert(&Giant, MA_OWNED); 211 if ( /* text can't exceed maximum text size */ |
212 gz->a_out.a_text > maxtsiz || |
213 214 /* data + bss can't exceed rlimit */ 215 gz->a_out.a_data + gz->bss_size > 216 gz->ip->proc->p_rlimit[RLIMIT_DATA].rlim_cur) { 217 gz->where = __LINE__; 218 return (ENOMEM); 219 } 220 /* Find out how far we should go */ --- 165 unchanged lines hidden --- |