Home
last modified time | relevance | path

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

12

/linux-6.12.1/security/apparmor/
Dresource.c36 rlim_names[ad->rlim.rlim], ad->rlim.max); in audit_cb()
65 ad.rlim.rlim = resource; in audit_resource()
66 ad.rlim.max = value; in audit_resource()
157 struct rlimit *rlim, *initrlim; in __aa_transition_rlimits() local
177 rlim = current->signal->rlim + j; in __aa_transition_rlimits()
178 initrlim = init_task.signal->rlim + j; in __aa_transition_rlimits()
179 rlim->rlim_cur = min(rlim->rlim_max, in __aa_transition_rlimits()
199 rlim = current->signal->rlim + j; in __aa_transition_rlimits()
200 rlim->rlim_max = min(rlim->rlim_max, in __aa_transition_rlimits()
203 rlim->rlim_cur = min(rlim->rlim_cur, rlim->rlim_max); in __aa_transition_rlimits()
DMakefile88 quiet_cmd_make-rlim = GEN $@
89 cmd_make-rlim = echo "static const char *const rlim_names[RLIM_NLIMITS] = {" \
109 $(call cmd,make-rlim)
/linux-6.12.1/tools/perf/util/
Drlimit.c16 struct rlimit rlim; in rlimit__bump_memlock() local
18 if (getrlimit(RLIMIT_MEMLOCK, &rlim) == 0) { in rlimit__bump_memlock()
19 rlim.rlim_cur *= 4; in rlimit__bump_memlock()
20 rlim.rlim_max *= 4; in rlimit__bump_memlock()
22 if (setrlimit(RLIMIT_MEMLOCK, &rlim) < 0) { in rlimit__bump_memlock()
23 rlim.rlim_cur /= 2; in rlimit__bump_memlock()
24 rlim.rlim_max /= 2; in rlimit__bump_memlock()
26 if (setrlimit(RLIMIT_MEMLOCK, &rlim) < 0) in rlimit__bump_memlock()
/linux-6.12.1/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 …]
Dperf-hwbreak.c148 struct rlimit rlim; in perf_systemwide_event_open() local
152 if (getrlimit(RLIMIT_NOFILE, &rlim)) { in perf_systemwide_event_open()
156 rlim.rlim_cur = 65536; in perf_systemwide_event_open()
157 if (setrlimit(RLIMIT_NOFILE, &rlim)) { in perf_systemwide_event_open()
/linux-6.12.1/tools/testing/selftests/x86/
Dnx_stack.c180 struct rlimit rlim; in main() local
181 int rv = getrlimit(RLIMIT_STACK, &rlim); in main()
184 rlim.rlim_max = rlim.rlim_cur; in main()
185 if (rlim.rlim_max > 8 * 1024 * 1024) { in main()
186 rlim.rlim_max = 8 * 1024 * 1024; in main()
188 rv = setrlimit(RLIMIT_STACK, &rlim); in main()
/linux-6.12.1/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);
270 static inline void getr(int type, struct rlimit *rlim) in getr() argument
272 if (getrlimit(type, rlim)) in getr()
276 static inline void setr(int type, struct rlimit *rlim) in setr() argument
278 if (setrlimit(type, rlim)) in setr()
/linux-6.12.1/kernel/
Dsys.c1467 struct rlimit *rlim; in do_prlimit() local
1483 rlim = tsk->signal->rlim + resource; in do_prlimit()
1490 if (new_rlim->rlim_max > rlim->rlim_max && in do_prlimit()
1498 *old_rlim = *rlim; in do_prlimit()
1500 *rlim = *new_rlim; in do_prlimit()
1527 SYSCALL_DEFINE2(getrlimit, unsigned int, resource, struct rlimit __user *, rlim) in SYSCALL_DEFINE2() argument
1534 ret = copy_to_user(rlim, &value, sizeof(*rlim)) ? -EFAULT : 0; in SYSCALL_DEFINE2()
1542 struct compat_rlimit __user *, rlim) in COMPAT_SYSCALL_DEFINE2()
1547 if (copy_from_user(&r32, rlim, sizeof(struct compat_rlimit))) in COMPAT_SYSCALL_DEFINE2()
1562 struct compat_rlimit __user *, rlim) in COMPAT_SYSCALL_DEFINE2()
[all …]
Dacct.c502 current->signal->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY; in do_acct_process()
543 current->signal->rlim[RLIMIT_FSIZE].rlim_cur = flim; in do_acct_process()
Dfork.c1062 init_task.signal->rlim[RLIMIT_NPROC].rlim_cur = max_threads/2; in fork_init()
1063 init_task.signal->rlim[RLIMIT_NPROC].rlim_max = max_threads/2; in fork_init()
1064 init_task.signal->rlim[RLIMIT_SIGPENDING] = in fork_init()
1065 init_task.signal->rlim[RLIMIT_NPROC]; in fork_init()
1831 cpu_limit = READ_ONCE(sig->rlim[RLIMIT_CPU].rlim_cur); in posix_cpu_timers_init_group()
1870 memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim); in copy_signal()
/linux-6.12.1/tools/perf/tests/
Ddso-data.c238 struct rlimit rlim; in set_fd_limit() local
240 if (getrlimit(RLIMIT_NOFILE, &rlim)) in set_fd_limit()
243 pr_debug("file limit %ld, new %d\n", (long) rlim.rlim_cur, n); in set_fd_limit()
245 rlim.rlim_cur = n; in set_fd_limit()
246 return setrlimit(RLIMIT_NOFILE, &rlim); in set_fd_limit()
/linux-6.12.1/tools/testing/selftests/mm/
Dmemfd_secret.c271 struct rlimit rlim; in prepare() local
278 if (getrlimit(RLIMIT_MEMLOCK, &rlim)) in prepare()
282 mlock_limit_cur = rlim.rlim_cur; in prepare()
283 mlock_limit_max = rlim.rlim_max; in prepare()
/linux-6.12.1/security/apparmor/include/
Daudit.h132 int rlim; member
134 } rlim; member
/linux-6.12.1/tools/include/nolibc/
Dsys.h916 int getrlimit(int resource, struct rlimit *rlim) in getrlimit() argument
922 rlim->rlim_cur = rlim64.rlim_cur; in getrlimit()
923 rlim->rlim_max = rlim64.rlim_max; in getrlimit()
929 int setrlimit(int resource, const struct rlimit *rlim) in setrlimit() argument
932 .rlim_cur = rlim->rlim_cur, in setrlimit()
933 .rlim_max = rlim->rlim_max, in setrlimit()
/linux-6.12.1/fs/
Dbinfmt_flat.c412 unsigned long len, memp, memp_size, extra, rlim; in load_flat_file() local
500 rlim = rlimit(RLIMIT_DATA); in load_flat_file()
501 if (rlim >= RLIM_INFINITY) in load_flat_file()
502 rlim = ~0; in load_flat_file()
503 if (data_len + bss_len > rlim) { in load_flat_file()
/linux-6.12.1/include/linux/sched/
Dsignal.h214 struct rlimit rlim[RLIM_NLIMITS]; member
765 return READ_ONCE(task->signal->rlim[limit].rlim_cur); in task_rlimit()
771 return READ_ONCE(task->signal->rlim[limit].rlim_max); in task_rlimit_max()
/linux-6.12.1/lib/kunit/
Duser_alloc.c45 arch_pick_mmap_layout(mm, &current->signal->rlim[RLIMIT_STACK]); in kunit_attach_mm()
/linux-6.12.1/tools/testing/selftests/nolibc/
Dnolibc-test.c958 struct rlimit rlim = { in test_rlimit() local
964 ret = setrlimit(RLIMIT_CORE, &rlim); in test_rlimit()
968 rlim.rlim_cur = 0; in test_rlimit()
969 rlim.rlim_max = 0; in test_rlimit()
971 ret = getrlimit(RLIMIT_CORE, &rlim); in test_rlimit()
975 if (rlim.rlim_cur != 1 << 20) in test_rlimit()
977 if (rlim.rlim_max != 1 << 21) in test_rlimit()
/linux-6.12.1/arch/powerpc/include/asm/
Dsyscalls.h79 struct compat_rlimit __user *rlim);
/linux-6.12.1/tools/testing/selftests/proc/
Dproc-pid-vm.c249 struct rlimit rlim = {0, 0}; in vsyscall() local
250 (void)setrlimit(RLIMIT_CORE, &rlim); in vsyscall()
/linux-6.12.1/init/
Dinit_task.c29 .rlim = INIT_RLIMITS,
/linux-6.12.1/drivers/net/ethernet/ti/
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-6.12.1/tools/lib/bpf/
Dbpf.c149 struct rlimit rlim; in bump_rlimit_memlock() local
161 rlim.rlim_cur = rlim.rlim_max = memlock_rlim; in bump_rlimit_memlock()
162 if (setrlimit(RLIMIT_MEMLOCK, &rlim)) in bump_rlimit_memlock()
/linux-6.12.1/fs/proc/
Dbase.c638 struct rlimit rlim[RLIM_NLIMITS]; in proc_pid_limits() local
642 memcpy(rlim, task->signal->rlim, sizeof(struct rlimit) * RLIM_NLIMITS); in proc_pid_limits()
654 if (rlim[i].rlim_cur == RLIM_INFINITY) in proc_pid_limits()
659 lnames[i].name, rlim[i].rlim_cur); in proc_pid_limits()
661 if (rlim[i].rlim_max == RLIM_INFINITY) in proc_pid_limits()
664 seq_printf(m, "%-20lu ", rlim[i].rlim_max); in proc_pid_limits()

12