Home
last modified time | relevance | path

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

12

/Linux-v4.19/security/apparmor/
Dresource.c39 rlim_names[aad(sa)->rlim.rlim], aad(sa)->rlim.max); in audit_cb()
62 aad(&sa)->rlim.rlim = resource; in audit_resource()
63 aad(&sa)->rlim.max = value; in audit_resource()
148 struct rlimit *rlim, *initrlim; in __aa_transition_rlimits() local
165 rlim = current->signal->rlim + j; in __aa_transition_rlimits()
166 initrlim = init_task.signal->rlim + j; in __aa_transition_rlimits()
167 rlim->rlim_cur = min(rlim->rlim_max, in __aa_transition_rlimits()
184 rlim = current->signal->rlim + j; in __aa_transition_rlimits()
185 rlim->rlim_max = min(rlim->rlim_max, in __aa_transition_rlimits()
188 rlim->rlim_cur = min(rlim->rlim_cur, rlim->rlim_max); in __aa_transition_rlimits()
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-v4.19/tools/testing/selftests/powerpc/ptrace/
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()
85 if (rlim.rlim_max != RLIM_INFINITY && 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()
[all …]
/Linux-v4.19/kernel/
Dsys.c1379 SYSCALL_DEFINE2(getrlimit, unsigned int, resource, struct rlimit __user *, rlim) in SYSCALL_DEFINE2() argument
1386 ret = copy_to_user(rlim, &value, sizeof(*rlim)) ? -EFAULT : 0; in SYSCALL_DEFINE2()
1394 struct compat_rlimit __user *, rlim) in COMPAT_SYSCALL_DEFINE2()
1399 if (copy_from_user(&r32, rlim, sizeof(struct compat_rlimit))) in COMPAT_SYSCALL_DEFINE2()
1414 struct compat_rlimit __user *, rlim) in COMPAT_SYSCALL_DEFINE2()
1431 if (copy_to_user(rlim, &r32, sizeof(struct compat_rlimit))) in COMPAT_SYSCALL_DEFINE2()
1445 struct rlimit __user *, rlim) in SYSCALL_DEFINE2()
1453 x = current->signal->rlim[resource]; in SYSCALL_DEFINE2()
1459 return copy_to_user(rlim, &x, sizeof(x)) ? -EFAULT : 0; in SYSCALL_DEFINE2()
1464 struct compat_rlimit __user *, rlim) in COMPAT_SYSCALL_DEFINE2()
[all …]
Dacct.c481 flim = current->signal->rlim[RLIMIT_FSIZE].rlim_cur; in do_acct_process()
482 current->signal->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY; in do_acct_process()
524 current->signal->rlim[RLIMIT_FSIZE].rlim_cur = flim; in do_acct_process()
Dfork.c761 init_task.signal->rlim[RLIMIT_NPROC].rlim_cur = max_threads/2; in fork_init()
762 init_task.signal->rlim[RLIMIT_NPROC].rlim_max = max_threads/2; in fork_init()
763 init_task.signal->rlim[RLIMIT_SIGPENDING] = in fork_init()
764 init_task.signal->rlim[RLIMIT_NPROC]; in fork_init()
1455 cpu_limit = READ_ONCE(sig->rlim[RLIMIT_CPU].rlim_cur); in posix_cpu_timers_init_group()
1504 memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim); in copy_signal()
/Linux-v4.19/tools/testing/selftests/mqueue/
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()
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-v4.19/tools/perf/tests/
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-v4.19/fs/
Dbinfmt_aout.c205 unsigned long rlim; in load_aout_binary() local
229 rlim = rlimit(RLIMIT_DATA); in load_aout_binary()
230 if (rlim >= RLIM_INFINITY) in load_aout_binary()
231 rlim = ~0; in load_aout_binary()
232 if (ex.a_data + ex.a_bss > rlim) in load_aout_binary()
Dbinfmt_flat.c417 unsigned long len, memp, memp_size, extra, rlim; in load_flat_file() local
503 rlim = rlimit(RLIMIT_DATA); in load_flat_file()
504 if (rlim >= RLIM_INFINITY) in load_flat_file()
505 rlim = ~0; in load_flat_file()
506 if (data_len + bss_len > rlim) { in load_flat_file()
Dcoredump.c534 current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1}; in umh_pipe_setup()
Dexec.c415 bprm->rlim_stack = current->signal->rlim[RLIMIT_STACK]; in bprm_mm_init()
1391 current->signal->rlim[RLIMIT_STACK] = bprm->rlim_stack; in finalize_exec()
/Linux-v4.19/security/apparmor/include/
Daudit.h130 int rlim; member
132 } rlim; member
/Linux-v4.19/arch/x86/ia32/
Dia32_aout.c263 unsigned long error, fd_offset, rlim; in load_aout_binary() local
283 rlim = rlimit(RLIMIT_DATA); in load_aout_binary()
284 if (rlim >= RLIM_INFINITY) in load_aout_binary()
285 rlim = ~0; in load_aout_binary()
286 if (ex.a_data + ex.a_bss > rlim) in load_aout_binary()
/Linux-v4.19/include/linux/sched/
Dsignal.h208 struct rlimit rlim[RLIM_NLIMITS]; member
665 return READ_ONCE(tsk->signal->rlim[limit].rlim_cur); in task_rlimit()
671 return READ_ONCE(tsk->signal->rlim[limit].rlim_max); in task_rlimit_max()
/Linux-v4.19/init/
Dinit_task.c26 .rlim = INIT_RLIMITS,
/Linux-v4.19/tools/perf/pmu-events/
Djevents.c852 struct rlimit rlim; in get_maxfds() local
854 if (getrlimit(RLIMIT_NOFILE, &rlim) == 0) in get_maxfds()
855 return min((int)rlim.rlim_max / 2, 512); in get_maxfds()
/Linux-v4.19/drivers/net/ethernet/ti/
Ddavinci_cpdma.c409 int rlim = 0; in cpdma_chan_fit_rate() local
421 rlim = 1; in cpdma_chan_fit_rate()
426 if (rlim) in cpdma_chan_fit_rate()
431 *prio_mode = rlim; in cpdma_chan_fit_rate()
/Linux-v4.19/fs/proc/
Dbase.c574 struct rlimit rlim[RLIM_NLIMITS]; in proc_pid_limits() local
578 memcpy(rlim, task->signal->rlim, sizeof(struct rlimit) * RLIM_NLIMITS); in proc_pid_limits()
588 if (rlim[i].rlim_cur == RLIM_INFINITY) in proc_pid_limits()
593 lnames[i].name, rlim[i].rlim_cur); in proc_pid_limits()
595 if (rlim[i].rlim_max == RLIM_INFINITY) in proc_pid_limits()
598 seq_printf(m, "%-20lu ", rlim[i].rlim_max); in proc_pid_limits()
/Linux-v4.19/kernel/time/
Dposix-cpu-timers.c860 tsk->signal->rlim[RLIMIT_RTTIME].rlim_cur = in check_thread_timers()
983 sig->rlim[RLIMIT_CPU].rlim_cur = soft; in check_process_timers()
/Linux-v4.19/include/linux/
Dcompat.h779 struct compat_rlimit __user *rlim);
781 struct compat_rlimit __user *rlim);
Dsyscalls.h667 struct rlimit __user *rlim);
669 struct rlimit __user *rlim);
1100 asmlinkage long sys_old_getrlimit(unsigned int resource, struct rlimit __user *rlim);
Dmm.h2245 static inline int check_data_rlimit(unsigned long rlim, in check_data_rlimit() argument
2251 if (rlim < RLIM_INFINITY) { in check_data_rlimit()
2252 if (((new - start) + (end_data - start_data)) > rlim) in check_data_rlimit()
/Linux-v4.19/security/selinux/
Dhooks.c2643 struct rlimit *rlim, *initrlim; in selinux_bprm_committing_creds() local
2673 rlim = current->signal->rlim + i; in selinux_bprm_committing_creds()
2674 initrlim = init_task.signal->rlim + i; in selinux_bprm_committing_creds()
2675 rlim->rlim_cur = min(rlim->rlim_max, initrlim->rlim_cur); in selinux_bprm_committing_creds()
4154 struct rlimit *old_rlim = p->signal->rlim + resource; in selinux_task_setrlimit()

12