aa_task_setrlimit(9)
β¨ aa_task_setrlimit(9) β¨
okay bestie so this one is from the Kernel API Manual (section 9, kernel-functions vibes) and it's literally the AppArmor girlie whose whole job is checking whether a task is allowed to set an rlimit π
πΈ NAME πΈ
aa_task_setrlimit β test permission to set an rlimit
like, it's the vibe check before the limit gets set, iykyk π
π¦ SYNOPSIS π¦
int aa_task_setrlimit (const struct cred *subj_cred , struct aa_label
*label , struct task_struct *task , unsigned int resource , struct
rlimit *new_rlim );
that's the whole signature, no cap β copy it exactly, don't be out here renaming things π
π ARGUMENTS π
so there's five of them and each one is doing its own little main character thing:
subj_credβ the cred that's setting the limit, aka who's doing it πlabelβ the label confining the task. it's (NOT NULL) so likeβ¦ do not pass null, fr frtaskβ the task the resource is being set on, the actual targetresourceβ the resource being set, which one we're talking aboutnew_rlimβ the new resource limit. also (NOT NULL) bestie, don't test me π
π DESCRIPTION π
control raising the process's hard limit β¨
that's the whole bit β it's the gatekeeper for bumping that hard limit up. very "you shall not pass" but make it kernel π«Ά
β RETURN β
0 β slayed, all good π
or an error code if setting the resource failed π (so like, check it, don't just assume)
π₯ SEE ALSO π₯
- kernel file
./security/apparmor/resource.c audit_resource(9)aa_map_resource(9)__aa_transition_rlimits(9)
go read those if you want the full lore π§
ngl this is AppArmor territory β ./security/apparmor β so if you're poking around in there, you're in the right neighborhood π‘
and that's the page bestie!! π source is ./security/apparmor, dated October 2026 β iconic, obsessed, periodt πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms