/Linux-v5.4/security/apparmor/ |
D | resource.c | 35 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()
|
D | Makefile | 84 quiet_cmd_make-rlim = GEN $@ 85 cmd_make-rlim = echo "static const char *const rlim_names[RLIM_NLIMITS] = {" \ 105 $(call cmd,make-rlim)
|
/Linux-v5.4/tools/perf/util/ |
D | rlimit.c | 15 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-v5.4/tools/testing/selftests/powerpc/ptrace/ |
D | core-pkey.c | 76 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-v5.4/kernel/ |
D | sys.c | 1383 SYSCALL_DEFINE2(getrlimit, unsigned int, resource, struct rlimit __user *, rlim) in SYSCALL_DEFINE2() argument 1390 ret = copy_to_user(rlim, &value, sizeof(*rlim)) ? -EFAULT : 0; in SYSCALL_DEFINE2() 1398 struct compat_rlimit __user *, rlim) in COMPAT_SYSCALL_DEFINE2() 1403 if (copy_from_user(&r32, rlim, sizeof(struct compat_rlimit))) in COMPAT_SYSCALL_DEFINE2() 1418 struct compat_rlimit __user *, rlim) in COMPAT_SYSCALL_DEFINE2() 1435 if (copy_to_user(rlim, &r32, sizeof(struct compat_rlimit))) in COMPAT_SYSCALL_DEFINE2() 1449 struct rlimit __user *, rlim) in SYSCALL_DEFINE2() 1457 x = current->signal->rlim[resource]; in SYSCALL_DEFINE2() 1463 return copy_to_user(rlim, &x, sizeof(x)) ? -EFAULT : 0; in SYSCALL_DEFINE2() 1468 struct compat_rlimit __user *, rlim) in COMPAT_SYSCALL_DEFINE2() [all …]
|
D | acct.c | 481 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()
|
D | fork.c | 823 init_task.signal->rlim[RLIMIT_NPROC].rlim_cur = max_threads/2; in fork_init() 824 init_task.signal->rlim[RLIMIT_NPROC].rlim_max = max_threads/2; in fork_init() 825 init_task.signal->rlim[RLIMIT_SIGPENDING] = in fork_init() 826 init_task.signal->rlim[RLIMIT_NPROC]; in fork_init() 1543 cpu_limit = READ_ONCE(sig->rlim[RLIMIT_CPU].rlim_cur); in posix_cpu_timers_init_group() 1581 memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim); in copy_signal()
|
/Linux-v5.4/tools/testing/selftests/mqueue/ |
D | mq_open_tests.c | 65 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()
|
D | mq_perf_tests.c | 160 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-v5.4/tools/perf/tests/ |
D | dso-data.c | 240 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-v5.4/fs/ |
D | binfmt_aout.c | 123 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()
|
D | binfmt_flat.c | 431 unsigned long len, memp, memp_size, extra, rlim; in load_flat_file() local 527 rlim = rlimit(RLIMIT_DATA); in load_flat_file() 528 if (rlim >= RLIM_INFINITY) in load_flat_file() 529 rlim = ~0; in load_flat_file() 530 if (data_len + bss_len > rlim) { in load_flat_file()
|
D | coredump.c | 560 current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1}; in umh_pipe_setup()
|
/Linux-v5.4/arch/x86/ia32/ |
D | ia32_aout.c | 107 unsigned long error, fd_offset, rlim; in load_aout_binary() local 127 rlim = rlimit(RLIMIT_DATA); in load_aout_binary() 128 if (rlim >= RLIM_INFINITY) in load_aout_binary() 129 rlim = ~0; in load_aout_binary() 130 if (ex.a_data + ex.a_bss > rlim) in load_aout_binary()
|
/Linux-v5.4/security/apparmor/include/ |
D | audit.h | 126 int rlim; member 128 } rlim; member
|
/Linux-v5.4/tools/io_uring/ |
D | io_uring-bench.c | 529 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-v5.4/include/linux/sched/ |
D | signal.h | 201 struct rlimit rlim[RLIM_NLIMITS]; member 687 return READ_ONCE(task->signal->rlim[limit].rlim_cur); in task_rlimit() 693 return READ_ONCE(task->signal->rlim[limit].rlim_max); in task_rlimit_max()
|
/Linux-v5.4/tools/testing/selftests/proc/ |
D | proc-pid-vm.c | 237 struct rlimit rlim = {0, 0}; in vsyscall() local 238 (void)setrlimit(RLIMIT_CORE, &rlim); in vsyscall()
|
/Linux-v5.4/init/ |
D | init_task.c | 27 .rlim = INIT_RLIMITS,
|
/Linux-v5.4/tools/perf/pmu-events/ |
D | jevents.c | 857 struct rlimit rlim; in get_maxfds() local 859 if (getrlimit(RLIMIT_NOFILE, &rlim) == 0) in get_maxfds() 860 return min((int)rlim.rlim_max / 2, 512); in get_maxfds()
|
/Linux-v5.4/drivers/net/ethernet/ti/ |
D | davinci_cpdma.c | 413 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-v5.4/fs/proc/ |
D | base.c | 590 struct rlimit rlim[RLIM_NLIMITS]; in proc_pid_limits() local 594 memcpy(rlim, task->signal->rlim, sizeof(struct rlimit) * RLIM_NLIMITS); in proc_pid_limits() 606 if (rlim[i].rlim_cur == RLIM_INFINITY) in proc_pid_limits() 611 lnames[i].name, rlim[i].rlim_cur); in proc_pid_limits() 613 if (rlim[i].rlim_max == RLIM_INFINITY) in proc_pid_limits() 616 seq_printf(m, "%-20lu ", rlim[i].rlim_max); in proc_pid_limits()
|
/Linux-v5.4/kernel/time/ |
D | posix-cpu-timers.c | 859 tsk->signal->rlim[RLIMIT_RTTIME].rlim_cur = soft; in check_thread_timers() 957 sig->rlim[RLIMIT_CPU].rlim_cur = soft + 1; in check_process_timers()
|
/Linux-v5.4/include/linux/ |
D | compat.h | 728 struct compat_rlimit __user *rlim); 730 struct compat_rlimit __user *rlim);
|
D | syscalls.h | 725 struct rlimit __user *rlim); 727 struct rlimit __user *rlim); 1205 asmlinkage long sys_old_getrlimit(unsigned int resource, struct rlimit __user *rlim);
|