Home
last modified time | relevance | path

Searched refs:rlim (Results 1 – 25 of 31) sorted by relevance

12

/linux/security/apparmor/
A Dresource.c35 rlim_names[aad(sa)->rlim.rlim], aad(sa)->rlim.max); in audit_cb()
58 aad(&sa)->rlim.rlim = resource; in audit_resource()
59 aad(&sa)->rlim.max = value; in audit_resource()
144 struct rlimit *rlim, *initrlim; in __aa_transition_rlimits() local
161 rlim = current->signal->rlim + j; in __aa_transition_rlimits()
162 initrlim = init_task.signal->rlim + j; in __aa_transition_rlimits()
163 rlim->rlim_cur = min(rlim->rlim_max, in __aa_transition_rlimits()
180 rlim = current->signal->rlim + j; in __aa_transition_rlimits()
181 rlim->rlim_max = min(rlim->rlim_max, in __aa_transition_rlimits()
184 rlim->rlim_cur = min(rlim->rlim_cur, rlim->rlim_max); in __aa_transition_rlimits()
A DMakefile84 quiet_cmd_make-rlim = GEN $@
85 cmd_make-rlim = echo "static const char *const rlim_names[RLIM_NLIMITS] = {" \
105 $(call cmd,make-rlim)
/linux/tools/perf/util/
A Drlimit.c15 struct rlimit rlim; in rlimit__bump_memlock() local
17 if (getrlimit(RLIMIT_MEMLOCK, &rlim) == 0) { in rlimit__bump_memlock()
18 rlim.rlim_cur *= 4; in rlimit__bump_memlock()
19 rlim.rlim_max *= 4; in rlimit__bump_memlock()
21 if (setrlimit(RLIMIT_MEMLOCK, &rlim) < 0) { in rlimit__bump_memlock()
22 rlim.rlim_cur /= 2; in rlimit__bump_memlock()
23 rlim.rlim_max /= 2; in rlimit__bump_memlock()
25 if (setrlimit(RLIMIT_MEMLOCK, &rlim) < 0) in rlimit__bump_memlock()
/linux/tools/testing/selftests/powerpc/ptrace/
A Dcore-pkey.c76 struct rlimit rlim; in increase_core_file_limit() local
79 ret = getrlimit(RLIMIT_CORE, &rlim); in increase_core_file_limit()
82 if (rlim.rlim_cur != RLIM_INFINITY && rlim.rlim_cur < CORE_FILE_LIMIT) { in increase_core_file_limit()
83 rlim.rlim_cur = CORE_FILE_LIMIT; in increase_core_file_limit()
86 rlim.rlim_max < CORE_FILE_LIMIT) in increase_core_file_limit()
87 rlim.rlim_max = CORE_FILE_LIMIT; in increase_core_file_limit()
89 ret = setrlimit(RLIMIT_CORE, &rlim); in increase_core_file_limit()
93 ret = getrlimit(RLIMIT_FSIZE, &rlim); in increase_core_file_limit()
96 if (rlim.rlim_cur != RLIM_INFINITY && rlim.rlim_cur < CORE_FILE_LIMIT) { in increase_core_file_limit()
97 rlim.rlim_cur = CORE_FILE_LIMIT; in increase_core_file_limit()
[all …]
/linux/kernel/
A Dsys.c1425 ret = copy_to_user(rlim, &value, sizeof(*rlim)) ? -EFAULT : 0; in SYSCALL_DEFINE2()
1484 struct rlimit __user *, rlim) in SYSCALL_DEFINE2()
1542 rlim64->rlim_cur = rlim->rlim_cur; in rlim_to_rlim64()
1546 rlim64->rlim_max = rlim->rlim_max; in rlim_to_rlim64()
1552 rlim->rlim_cur = RLIM_INFINITY; in rlim64_to_rlim()
1556 rlim->rlim_max = RLIM_INFINITY; in rlim64_to_rlim()
1565 struct rlimit *rlim; in do_prlimit() local
1585 rlim = tsk->signal->rlim + resource; in do_prlimit()
1598 *old_rlim = *rlim; in do_prlimit()
1600 *rlim = *new_rlim; in do_prlimit()
[all …]
A Dacct.c481 current->signal->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY; in do_acct_process()
522 current->signal->rlim[RLIMIT_FSIZE].rlim_cur = flim; in do_acct_process()
A Dfork.c834 init_task.signal->rlim[RLIMIT_NPROC].rlim_cur = max_threads/2; in fork_init()
835 init_task.signal->rlim[RLIMIT_NPROC].rlim_max = max_threads/2; in fork_init()
836 init_task.signal->rlim[RLIMIT_SIGPENDING] = in fork_init()
837 init_task.signal->rlim[RLIMIT_NPROC]; in fork_init()
1630 cpu_limit = READ_ONCE(sig->rlim[RLIMIT_CPU].rlim_cur); in posix_cpu_timers_init_group()
1668 memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim); in copy_signal()
/linux/tools/testing/selftests/mqueue/
A Dmq_open_tests.c65 static inline void getr(int type, struct rlimit *rlim);
66 static inline void setr(int type, struct rlimit *rlim);
141 static inline void getr(int type, struct rlimit *rlim) in getr() argument
143 if (getrlimit(type, rlim)) in getr()
147 static inline void setr(int type, struct rlimit *rlim) in setr() argument
149 if (setrlimit(type, rlim)) in setr()
A Dmq_perf_tests.c160 static inline void getr(int type, struct rlimit *rlim);
161 static inline void setr(int type, struct rlimit *rlim);
267 static inline void getr(int type, struct rlimit *rlim) in getr() argument
269 if (getrlimit(type, rlim)) in getr()
273 static inline void setr(int type, struct rlimit *rlim) in setr() argument
275 if (setrlimit(type, rlim)) in setr()
/linux/tools/perf/tests/
A Ddso-data.c240 struct rlimit rlim; in set_fd_limit() local
242 if (getrlimit(RLIMIT_NOFILE, &rlim)) in set_fd_limit()
245 pr_debug("file limit %ld, new %d\n", (long) rlim.rlim_cur, n); in set_fd_limit()
247 rlim.rlim_cur = n; in set_fd_limit()
248 return setrlimit(RLIMIT_NOFILE, &rlim); in set_fd_limit()
/linux/tools/testing/selftests/vm/
A Dmemfd_secret.c231 struct rlimit rlim; in prepare() local
238 if (getrlimit(RLIMIT_MEMLOCK, &rlim)) in prepare()
242 mlock_limit_cur = rlim.rlim_cur; in prepare()
243 mlock_limit_max = rlim.rlim_max; in prepare()
/linux/arch/x86/ia32/
A Dia32_aout.c106 unsigned long error, fd_offset, rlim; in load_aout_binary() local
126 rlim = rlimit(RLIMIT_DATA); in load_aout_binary()
127 if (rlim >= RLIM_INFINITY) in load_aout_binary()
128 rlim = ~0; in load_aout_binary()
129 if (ex.a_data + ex.a_bss > rlim) in load_aout_binary()
/linux/fs/
A Dbinfmt_aout.c123 unsigned long rlim; in load_aout_binary() local
147 rlim = rlimit(RLIMIT_DATA); in load_aout_binary()
148 if (rlim >= RLIM_INFINITY) in load_aout_binary()
149 rlim = ~0; in load_aout_binary()
150 if (ex.a_data + ex.a_bss > rlim) in load_aout_binary()
A Dbinfmt_flat.c442 unsigned long len, memp, memp_size, extra, rlim; in load_flat_file() local
538 rlim = rlimit(RLIMIT_DATA); in load_flat_file()
539 if (rlim >= RLIM_INFINITY) in load_flat_file()
540 rlim = ~0; in load_flat_file()
541 if (data_len + bss_len > rlim) { in load_flat_file()
/linux/kernel/bpf/preload/iterators/
A Diterators.c40 struct rlimit rlim = { RLIM_INFINITY, RLIM_INFINITY }; in main() local
58 setrlimit(RLIMIT_MEMLOCK, &rlim); in main()
/linux/security/apparmor/include/
A Daudit.h126 int rlim; member
128 } rlim; member
/linux/tools/io_uring/
A Dio_uring-bench.c529 struct rlimit rlim; in main() local
531 rlim.rlim_cur = RLIM_INFINITY; in main()
532 rlim.rlim_max = RLIM_INFINITY; in main()
533 if (setrlimit(RLIMIT_MEMLOCK, &rlim) < 0) { in main()
/linux/include/linux/sched/
A Dsignal.h216 struct rlimit rlim[RLIM_NLIMITS]; member
737 return READ_ONCE(task->signal->rlim[limit].rlim_cur); in task_rlimit()
743 return READ_ONCE(task->signal->rlim[limit].rlim_max); in task_rlimit_max()
/linux/tools/testing/selftests/proc/
A Dproc-pid-vm.c237 struct rlimit rlim = {0, 0}; in vsyscall() local
238 (void)setrlimit(RLIMIT_CORE, &rlim); in vsyscall()
/linux/init/
A Dinit_task.c27 .rlim = INIT_RLIMITS,
/linux/tools/perf/pmu-events/
A Djevents.c971 struct rlimit rlim; in get_maxfds() local
973 if (getrlimit(RLIMIT_NOFILE, &rlim) == 0) in get_maxfds()
974 return min(rlim.rlim_max / 2, (rlim_t)512); in get_maxfds()
/linux/drivers/net/ethernet/ti/
A Ddavinci_cpdma.c413 int rlim = 0; in cpdma_chan_fit_rate() local
425 rlim = 1; in cpdma_chan_fit_rate()
430 if (rlim) in cpdma_chan_fit_rate()
435 *prio_mode = rlim; in cpdma_chan_fit_rate()
/linux/fs/proc/
A Dbase.c602 struct rlimit rlim[RLIM_NLIMITS]; in proc_pid_limits() local
606 memcpy(rlim, task->signal->rlim, sizeof(struct rlimit) * RLIM_NLIMITS); in proc_pid_limits()
618 if (rlim[i].rlim_cur == RLIM_INFINITY) in proc_pid_limits()
623 lnames[i].name, rlim[i].rlim_cur); in proc_pid_limits()
625 if (rlim[i].rlim_max == RLIM_INFINITY) in proc_pid_limits()
628 seq_printf(m, "%-20lu ", rlim[i].rlim_max); in proc_pid_limits()
/linux/include/linux/
A Dcompat.h740 struct compat_rlimit __user *rlim);
742 struct compat_rlimit __user *rlim);
/linux/kernel/time/
A Dposix-cpu-timers.c922 tsk->signal->rlim[RLIMIT_RTTIME].rlim_cur = soft; in check_thread_timers()
1020 sig->rlim[RLIMIT_CPU].rlim_cur = soft + 1; in check_process_timers()

Completed in 70 milliseconds

12