/freebsd/tools/test/stress2/misc/ |
H A D | syzkaller64.sh | 191 struct rlimit rlim; 192 rlim.rlim_cur = rlim.rlim_max = 128 << 20; 193 setrlimit(RLIMIT_AS, &rlim); 194 rlim.rlim_cur = rlim.rlim_max = 8 << 20; 195 setrlimit(RLIMIT_MEMLOCK, &rlim); 196 rlim.rlim_cur = rlim.rlim_max = 1 << 20; 197 setrlimit(RLIMIT_FSIZE, &rlim); 198 rlim.rlim_cur = rlim.rlim_max = 1 << 20; 199 setrlimit(RLIMIT_STACK, &rlim); 200 rlim.rlim_cur = rlim.rlim_max = 0; [all …]
|
H A D | syzkaller47.sh | 261 struct rlimit rlim; 262 rlim.rlim_cur = rlim.rlim_max = 128 << 20; 263 setrlimit(RLIMIT_AS, &rlim); 264 rlim.rlim_cur = rlim.rlim_max = 8 << 20; 265 setrlimit(RLIMIT_MEMLOCK, &rlim); 266 rlim.rlim_cur = rlim.rlim_max = 1 << 20; 267 setrlimit(RLIMIT_FSIZE, &rlim); 268 rlim.rlim_cur = rlim.rlim_max = 1 << 20; 269 setrlimit(RLIMIT_STACK, &rlim); 270 rlim.rlim_cur = rlim.rlim_max = 0; [all …]
|
H A D | syzkaller52.sh | 214 struct rlimit rlim; 215 rlim.rlim_cur = rlim.rlim_max = 128 << 20; 216 setrlimit(RLIMIT_AS, &rlim); 217 rlim.rlim_cur = rlim.rlim_max = 8 << 20; 218 setrlimit(RLIMIT_MEMLOCK, &rlim); 219 rlim.rlim_cur = rlim.rlim_max = 1 << 20; 220 setrlimit(RLIMIT_FSIZE, &rlim); 221 rlim.rlim_cur = rlim.rlim_max = 1 << 20; 222 setrlimit(RLIMIT_STACK, &rlim); 223 rlim.rlim_cur = rlim.rlim_max = 0; [all …]
|
H A D | syzkaller25.sh | 274 struct rlimit rlim; 275 rlim.rlim_cur = rlim.rlim_max = 128 << 20; 276 setrlimit(RLIMIT_AS, &rlim); 277 rlim.rlim_cur = rlim.rlim_max = 8 << 20; 278 setrlimit(RLIMIT_MEMLOCK, &rlim); 279 rlim.rlim_cur = rlim.rlim_max = 1 << 20; 280 setrlimit(RLIMIT_FSIZE, &rlim); 281 rlim.rlim_cur = rlim.rlim_max = 1 << 20; 282 setrlimit(RLIMIT_STACK, &rlim); 283 rlim.rlim_cur = rlim.rlim_max = 0; [all …]
|
H A D | syzkaller69.sh | 306 struct rlimit rlim; 307 rlim.rlim_cur = rlim.rlim_max = 128 << 20; 308 setrlimit(RLIMIT_AS, &rlim); 309 rlim.rlim_cur = rlim.rlim_max = 8 << 20; 310 setrlimit(RLIMIT_MEMLOCK, &rlim); 311 rlim.rlim_cur = rlim.rlim_max = 1 << 20; 312 setrlimit(RLIMIT_FSIZE, &rlim); 313 rlim.rlim_cur = rlim.rlim_max = 1 << 20; 314 setrlimit(RLIMIT_STACK, &rlim); 315 rlim.rlim_cur = rlim.rlim_max = 0; [all …]
|
H A D | setrlimit2.sh | 69 struct rlimit rlim; 95 rlim.rlim_cur = rlim.rlim_max = len / 2;; 96 if (setrlimit(RLIMIT_FSIZE, &rlim) == -1)
|
H A D | setrlimit.sh | 73 struct rlimit rlim; 90 rlim.rlim_cur = rlim.rlim_max = limit; 91 if (setrlimit(RLIMIT_FSIZE, &rlim) == -1)
|
/freebsd/sys/compat/linux/ |
H A D | linux_emul.c | 96 struct rlimit rlim; in linux_set_default_openfiles() local 103 lim_rlimit_proc(p, RLIMIT_NOFILE, &rlim); in linux_set_default_openfiles() 105 if (rlim.rlim_cur != rlim.rlim_max || in linux_set_default_openfiles() 106 rlim.rlim_cur <= linux_default_openfiles) in linux_set_default_openfiles() 108 rlim.rlim_cur = linux_default_openfiles; in linux_set_default_openfiles() 109 error = kern_proc_setrlimit(td, p, RLIMIT_NOFILE, &rlim); in linux_set_default_openfiles() 119 struct rlimit rlim; in linux_set_default_stacksize() local 126 lim_rlimit_proc(p, RLIMIT_STACK, &rlim); in linux_set_default_stacksize() 128 if (rlim.rlim_cur != rlim.rlim_max || in linux_set_default_stacksize() 129 rlim.rlim_cur <= linux_default_stacksize) in linux_set_default_stacksize() [all …]
|
H A D | linux_misc.c | 1129 linux_get_dummy_limit(struct thread *td, l_uint resource, struct rlimit *rlim) in linux_get_dummy_limit() argument 1140 rlim->rlim_cur = LINUX_RLIM_INFINITY; in linux_get_dummy_limit() 1141 rlim->rlim_max = LINUX_RLIM_INFINITY; in linux_get_dummy_limit() 1145 rlim->rlim_cur = 0; in linux_get_dummy_limit() 1146 rlim->rlim_max = 0; in linux_get_dummy_limit() 1154 rlim->rlim_cur = res; in linux_get_dummy_limit() 1155 rlim->rlim_max = res; in linux_get_dummy_limit() 1162 rlim->rlim_cur = res; in linux_get_dummy_limit() 1163 rlim->rlim_max = res; in linux_get_dummy_limit() 1174 struct l_rlimit rlim; in linux_setrlimit() local [all …]
|
/freebsd/contrib/llvm-project/clang/tools/driver/ |
H A D | cc1_main.cpp | 84 struct rlimit rlim; in ensureSufficientStack() local 85 if (getrlimit(RLIMIT_STACK, &rlim) != 0) in ensureSufficientStack() 90 if (rlim.rlim_cur != RLIM_INFINITY && in ensureSufficientStack() 91 rlim.rlim_cur < rlim_t(DesiredStackSize)) { in ensureSufficientStack() 93 if (rlim.rlim_max == RLIM_INFINITY || in ensureSufficientStack() 94 rlim.rlim_max >= rlim_t(DesiredStackSize)) in ensureSufficientStack() 95 rlim.rlim_cur = DesiredStackSize; in ensureSufficientStack() 96 else if (rlim.rlim_cur == rlim.rlim_max) in ensureSufficientStack() 99 rlim.rlim_cur = rlim.rlim_max; in ensureSufficientStack() 101 if (setrlimit(RLIMIT_STACK, &rlim) != 0 || in ensureSufficientStack() [all …]
|
/freebsd/usr.sbin/rpc.yppasswdd/ |
H A D | yppasswdd_main.c | 162 struct rlimit rlim; in main() local 327 rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY; in main() 328 (void)setrlimit(RLIMIT_CPU, &rlim); in main() 329 (void)setrlimit(RLIMIT_FSIZE, &rlim); in main() 330 (void)setrlimit(RLIMIT_STACK, &rlim); in main() 331 (void)setrlimit(RLIMIT_DATA, &rlim); in main() 332 (void)setrlimit(RLIMIT_RSS, &rlim); in main() 335 rlim.rlim_cur = rlim.rlim_max = 0; in main() 336 (void)setrlimit(RLIMIT_CORE, &rlim); in main()
|
/freebsd/contrib/ntp/sntp/libevent/ |
H A D | bufferevent_ratelim.c | 565 struct bufferevent_rate_limit *rlim; in bufferevent_set_rate_limit() local 575 rlim = bevp->rate_limiting; in bufferevent_set_rate_limit() 576 rlim->cfg = NULL; in bufferevent_set_rate_limit() 579 if (event_initialized(&rlim->refill_bucket_event)) in bufferevent_set_rate_limit() 580 event_del(&rlim->refill_bucket_event); in bufferevent_set_rate_limit() 595 rlim = mm_calloc(1, sizeof(struct bufferevent_rate_limit)); in bufferevent_set_rate_limit() 596 if (!rlim) in bufferevent_set_rate_limit() 598 bevp->rate_limiting = rlim; in bufferevent_set_rate_limit() 600 rlim = bevp->rate_limiting; in bufferevent_set_rate_limit() 602 reinit = rlim->cfg != NULL; in bufferevent_set_rate_limit() [all …]
|
/freebsd/contrib/libevent/ |
H A D | bufferevent_ratelim.c | 565 struct bufferevent_rate_limit *rlim; in bufferevent_set_rate_limit() local 575 rlim = bevp->rate_limiting; in bufferevent_set_rate_limit() 576 rlim->cfg = NULL; in bufferevent_set_rate_limit() 579 if (event_initialized(&rlim->refill_bucket_event)) in bufferevent_set_rate_limit() 580 event_del(&rlim->refill_bucket_event); in bufferevent_set_rate_limit() 595 rlim = mm_calloc(1, sizeof(struct bufferevent_rate_limit)); in bufferevent_set_rate_limit() 596 if (!rlim) in bufferevent_set_rate_limit() 598 bevp->rate_limiting = rlim; in bufferevent_set_rate_limit() 600 rlim = bevp->rate_limiting; in bufferevent_set_rate_limit() 602 reinit = rlim->cfg != NULL; in bufferevent_set_rate_limit() [all …]
|
/freebsd/contrib/unbound/daemon/ |
H A D | unbound.c | 199 struct rlimit rlim; in checkrlimits() local 216 if(getrlimit(RLIMIT_AS, &rlim) == 0) { in checkrlimits() 217 if(rlim.rlim_cur != (rlim_t)RLIM_INFINITY && in checkrlimits() 218 rlim.rlim_cur < (rlim_t)memsize_expect) { in checkrlimits() 219 …e expected memory usage (added size of caches). %u < %u bytes", (unsigned)rlim.rlim_cur, (unsigned… in checkrlimits() 223 if(getrlimit(RLIMIT_DATA, &rlim) == 0) { in checkrlimits() 224 if(rlim.rlim_cur != (rlim_t)RLIM_INFINITY && in checkrlimits() 225 rlim.rlim_cur < (rlim_t)memsize_expect) { in checkrlimits() 226 …e expected memory usage (added size of caches). %u < %u bytes", (unsigned)rlim.rlim_cur, (unsigned… in checkrlimits() 259 if(getrlimit(RLIMIT_NOFILE, &rlim) < 0) { in checkrlimits() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_posix_libcdep.cpp | 87 rlimit rlim; in getlim() local 88 CHECK_EQ(0, getrlimit(res, &rlim)); in getlim() 89 return rlim.rlim_cur; in getlim() 93 struct rlimit rlim; in setlim() local 94 if (getrlimit(res, &rlim)) { in setlim() 98 rlim.rlim_cur = lim; in setlim() 99 if (setrlimit(res, &rlim)) { in setlim() 107 rlimit rlim; in DisableCoreDumperIfNecessary() local 108 CHECK_EQ(0, getrlimit(RLIMIT_CORE, &rlim)); in DisableCoreDumperIfNecessary() 126 rlim.rlim_cur = Min<rlim_t>(SANITIZER_LINUX ? 1 : 0, rlim.rlim_max); in DisableCoreDumperIfNecessary() [all …]
|
/freebsd/contrib/netbsd-tests/lib/libpthread/ |
H A D | t_siglongjmp.c | 77 struct rlimit rlim; in ATF_TC_BODY() local 80 rlim.rlim_cur = rlim.rlim_max = 0; in ATF_TC_BODY() 81 (void)setrlimit(RLIMIT_CORE, &rlim); in ATF_TC_BODY()
|
H A D | t_sigmask.c | 70 struct rlimit rlim; in ATF_TC_BODY() local 72 rlim.rlim_cur = rlim.rlim_max = 0; in ATF_TC_BODY() 73 (void) setrlimit(RLIMIT_CORE, &rlim); in ATF_TC_BODY()
|
/freebsd/lib/libutil/ |
H A D | pw_util.c | 91 struct rlimit rlim; in pw_init() 130 rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY; in pw_init() 131 (void)setrlimit(RLIMIT_CPU, &rlim); in pw_init() 132 (void)setrlimit(RLIMIT_FSIZE, &rlim); in pw_init() 133 (void)setrlimit(RLIMIT_STACK, &rlim); in pw_init() 134 (void)setrlimit(RLIMIT_DATA, &rlim); in pw_init() 135 (void)setrlimit(RLIMIT_RSS, &rlim); in pw_init() 138 rlim.rlim_cur = rlim.rlim_max = 0; in pw_init() 139 (void)setrlimit(RLIMIT_CORE, &rlim); in pw_init()
|
H A D | login_class.c | 82 struct rlimit rlim; in setclassresources() local 96 if (getrlimit(lr->why, &rlim) != 0) in setclassresources() 101 rlim_t rcur = rlim.rlim_cur; in setclassresources() 102 rlim_t rmax = rlim.rlim_max; in setclassresources() 109 rlim.rlim_cur = (*lr->who)(lc, name_cur, rcur, rcur); in setclassresources() 110 rlim.rlim_max = (*lr->who)(lc, name_max, rmax, rmax); in setclassresources() 112 if (setrlimit(lr->why, &rlim) == -1) in setclassresources()
|
/freebsd/contrib/netbsd-tests/lib/libc/sys/ |
H A D | t_mincore.c | 153 struct rlimit rlim; in ATF_TC_BODY() local 155 ATF_REQUIRE(getrlimit(RLIMIT_MEMLOCK, &rlim) == 0); in ATF_TC_BODY() 160 rlim.rlim_max = RLIM_INFINITY; in ATF_TC_BODY() 161 rlim.rlim_cur = rlim.rlim_max; in ATF_TC_BODY() 162 ATF_REQUIRE(setrlimit(RLIMIT_MEMLOCK, &rlim) == 0); in ATF_TC_BODY()
|
/freebsd/lib/libc/gen/ |
H A D | elf_utils.c | 78 struct rlimit rlim; in __libc_map_stacks_exec() local 90 if (getrlimit(RLIMIT_STACK, &rlim) == -1) in __libc_map_stacks_exec() 92 stacksz = rlim.rlim_cur; in __libc_map_stacks_exec()
|
/freebsd/tests/sys/vm/ |
H A D | mlock_test.c | 183 struct rlimit rlim; in ATF_TC_BODY() local 196 error = getrlimit(RLIMIT_MEMLOCK, &rlim); in ATF_TC_BODY() 198 rlim.rlim_cur += len; in ATF_TC_BODY() 199 rlim.rlim_max += len; in ATF_TC_BODY() 200 error = setrlimit(RLIMIT_MEMLOCK, &rlim); in ATF_TC_BODY()
|
/freebsd/contrib/ofed/libibverbs/ |
H A D | init.c | 247 struct rlimit rlim; in check_memlock_limit() local 252 if (getrlimit(RLIMIT_MEMLOCK, &rlim)) { in check_memlock_limit() 257 if (rlim.rlim_cur <= 32768) in check_memlock_limit() 260 rlim.rlim_cur); in check_memlock_limit()
|
/freebsd/contrib/netbsd-tests/lib/libc/gen/ |
H A D | t_siginfo.c | 179 struct rlimit rlim; in sigchild_setup() local 181 (void)getrlimit(RLIMIT_CORE, &rlim); in sigchild_setup() 182 rlim.rlim_cur = rlim.rlim_max; in sigchild_setup() 183 (void)setrlimit(RLIMIT_CORE, &rlim); in sigchild_setup()
|
/freebsd/contrib/netbsd-tests/fs/puffs/h_dtfs/ |
H A D | dtfs_vfsops.c | 197 struct rlimit rlim; in dtfs_fs_statvfs() local 211 if (getrlimit(RLIMIT_DATA, &rlim) == 0) in dtfs_fs_statvfs() 212 btot = rlim.rlim_cur; in dtfs_fs_statvfs()
|