Home
last modified time | relevance | path

Searched refs:rlimit (Results 1 – 25 of 92) sorted by relevance

1234

/linux-6.1.9/tools/testing/selftests/powerpc/mm/
Dstack_expansion_ldst.c174 struct rlimit rlimit; in test() local
177 getrlimit(RLIMIT_STACK, &rlimit); in test()
178 printf("Stack rlimit is 0x%lx\n", rlimit.rlim_cur); in test()
181 test_one_type(LOAD, page_size, rlimit.rlim_cur); in test()
183 test_one_type(STORE, page_size, rlimit.rlim_cur); in test()
/linux-6.1.9/kernel/
Ducount.c269 long new = atomic_long_add_return(v, &iter->rlimit[type]); in inc_rlimit_ucounts()
284 long dec = atomic_long_sub_return(v, &iter->rlimit[type]); in dec_rlimit_ucounts()
297 long dec = atomic_long_sub_return(1, &iter->rlimit[type]); in do_dec_rlimit_put_ucounts()
318 long new = atomic_long_add_return(1, &iter->rlimit[type]); in inc_rlimit_get_ucounts()
335 dec = atomic_long_sub_return(1, &iter->rlimit[type]); in inc_rlimit_get_ucounts()
342 bool is_rlimit_overlimit(struct ucounts *ucounts, enum rlimit_type type, unsigned long rlimit) in is_rlimit_overlimit() argument
345 long max = rlimit; in is_rlimit_overlimit()
346 if (rlimit > LONG_MAX) in is_rlimit_overlimit()
Dsys.c500 if (is_rlimit_overlimit(new->ucounts, UCOUNT_RLIMIT_NPROC, rlimit(RLIMIT_NPROC)) && in flag_nproc_exceeded()
1438 struct rlimit *new_rlim, struct rlimit *old_rlim) in do_prlimit()
1440 struct rlimit *rlim; in do_prlimit()
1500 SYSCALL_DEFINE2(getrlimit, unsigned int, resource, struct rlimit __user *, rlim) in SYSCALL_DEFINE2()
1502 struct rlimit value; in SYSCALL_DEFINE2()
1517 struct rlimit r; in COMPAT_SYSCALL_DEFINE2()
1537 struct rlimit r; in COMPAT_SYSCALL_DEFINE2()
1566 struct rlimit __user *, rlim) in SYSCALL_DEFINE2()
1568 struct rlimit x; in SYSCALL_DEFINE2()
1587 struct rlimit r; in COMPAT_SYSCALL_DEFINE2()
[all …]
/linux-6.1.9/tools/testing/selftests/core/
Dclose_range_test.c248 struct rlimit rlimit; in TEST() local
271 ASSERT_EQ(0, getrlimit(RLIMIT_NOFILE, &rlimit)); in TEST()
272 rlimit.rlim_cur = 25; in TEST()
273 ASSERT_EQ(0, setrlimit(RLIMIT_NOFILE, &rlimit)); in TEST()
316 struct rlimit rlimit; in TEST() local
339 ASSERT_EQ(0, getrlimit(RLIMIT_NOFILE, &rlimit)); in TEST()
340 rlimit.rlim_cur = 25; in TEST()
341 ASSERT_EQ(0, setrlimit(RLIMIT_NOFILE, &rlimit)); in TEST()
/linux-6.1.9/drivers/hwmon/pmbus/
Dlm25066.c232 u16 rlimit; /* Maximum register value */ member
394 word = ((s16)word < 0) ? 0 : clamp_val(word, 0, data->rlimit); in lm25066_write_word_data()
398 word = ((s16)word < 0) ? 0 : clamp_val(word, 0, data->rlimit); in lm25066_write_word_data()
404 word = ((s16)word < 0) ? 0 : clamp_val(word, 0, data->rlimit); in lm25066_write_word_data()
412 word = ((s16)word < 0) ? 0 : clamp_val(word, 0, data->rlimit); in lm25066_write_word_data()
419 word = ((s16)word < 0) ? 0 : clamp_val(word, 0, data->rlimit); in lm25066_write_word_data()
512 data->rlimit = 0x0fff; in lm25066_probe()
516 data->rlimit = 0x0fff; in lm25066_probe()
/linux-6.1.9/security/apparmor/include/
Dresource.h30 struct rlimit limits[RLIM_NLIMITS];
37 unsigned int resource, struct rlimit *new_rlim);
/linux-6.1.9/arch/x86/mm/
Dmmap.c83 struct rlimit *rlim_stack) in mmap_base()
120 struct rlimit *rlim_stack) in arch_pick_mmap_base()
129 void arch_pick_mmap_layout(struct mm_struct *mm, struct rlimit *rlim_stack) in arch_pick_mmap_layout()
/linux-6.1.9/tools/testing/selftests/mqueue/
Dmq_open_tests.c53 struct rlimit saved_limits, cur_limits;
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()
147 static inline void setr(int type, struct rlimit *rlim) in setr()
Dmq_perf_tests.c93 struct rlimit saved_limits, cur_limits;
160 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()
276 static inline void setr(int type, struct rlimit *rlim) in setr()
/linux-6.1.9/security/apparmor/
Dresource.c82 struct rlimit *new_rlim) in profile_setrlimit()
105 unsigned int resource, struct rlimit *new_rlim) in aa_task_setrlimit()
144 struct rlimit *rlim, *initrlim; in __aa_transition_rlimits()
/linux-6.1.9/tools/testing/selftests/vm/
Dmlock-random-test.c27 struct rlimit new; in set_cap_limits()
143 struct rlimit cur; in test_mlock_within_limit()
220 struct rlimit cur; in test_mlock_outof_limit()
Don-fault-limit.c16 struct rlimit lims; in test_limit()
Dmemfd_secret.c210 struct rlimit new; in set_cap_limits()
231 struct rlimit rlim; in prepare()
/linux-6.1.9/arch/s390/mm/
Dmmap.c29 static inline int mmap_is_legacy(struct rlimit *rlim_stack) in mmap_is_legacy()
49 struct rlimit *rlim_stack) in mmap_base()
172 void arch_pick_mmap_layout(struct mm_struct *mm, struct rlimit *rlim_stack) in arch_pick_mmap_layout()
/linux-6.1.9/tools/perf/util/
Drlimit.c15 struct rlimit rlim; in rlimit__bump_memlock()
/linux-6.1.9/include/linux/
Duser_namespace.h113 atomic_long_t rlimit[UCOUNT_RLIMIT_COUNTS]; member
129 return atomic_long_read(&ucounts->rlimit[type]); in get_rlimit_value()
/linux-6.1.9/include/uapi/linux/
Dresource.h43 struct rlimit { struct
/linux-6.1.9/Documentation/translations/zh_CN/process/
D3.Early-stage.rst36 进程特权),并对系统稳定性造成风险。他们首选的解决方案包括短期的通过rlimit
/linux-6.1.9/include/linux/sched/
Dmm.h148 struct rlimit *rlim_stack);
167 struct rlimit *rlim_stack) {} in arch_pick_mmap_layout()
/linux-6.1.9/Documentation/translations/zh_TW/process/
D3.Early-stage.rst39 進程特權),並對系統穩定性造成風險。他們首選的解決方案包括短期的通過rlimit
/linux-6.1.9/tools/testing/selftests/kvm/
Dkvm_create_max_vcpus.c49 struct rlimit rl; in main()
/linux-6.1.9/mm/
Dmlock.c42 if (rlimit(RLIMIT_MEMLOCK) != 0) in can_do_mlock()
581 lock_limit = rlimit(RLIMIT_MEMLOCK); in do_mlock()
709 lock_limit = rlimit(RLIMIT_MEMLOCK); in SYSCALL_DEFINE1()
750 lock_limit = rlimit(RLIMIT_MEMLOCK); in user_shm_lock()
Dutil.c371 static int mmap_is_legacy(struct rlimit *rlim_stack) in mmap_is_legacy()
389 static unsigned long mmap_base(unsigned long rnd, struct rlimit *rlim_stack) in mmap_base()
410 void arch_pick_mmap_layout(struct mm_struct *mm, struct rlimit *rlim_stack) in arch_pick_mmap_layout()
426 void arch_pick_mmap_layout(struct mm_struct *mm, struct rlimit *rlim_stack) in arch_pick_mmap_layout()
/linux-6.1.9/drivers/infiniband/hw/hfi1/
Duser_pages.c32 unsigned long ulimit = rlimit(RLIMIT_MEMLOCK), pinned, cache_limit, in hfi1_can_pin_pages()
/linux-6.1.9/drivers/infiniband/hw/qib/
Dqib_user_pages.c101 lock_limit = rlimit(RLIMIT_MEMLOCK) >> PAGE_SHIFT; in qib_get_user_pages()

1234