mirror of https://github.com/mkerrisk/man-pages
6cee0ddeb4
As a deprecated feature, it appears that the RLIMIT_MEMLOCK can also be used to permit huge page allocation, but let's not document that for now. In the Linux 5.12, see fs/hugetlbfs/inode.c. static int can_do_hugetlb_shm(void) { kgid_t shm_group; shm_group = make_kgid(&init_user_ns, sysctl_hugetlb_shm_group); return capable(CAP_IPC_LOCK) || in_group_p(shm_group); } ... struct file *hugetlb_file_setup(const char *name, size_t size, vm_flags_t acctflag, struct user_struct **user, int creat_flags, int page_size_log) { ... if (creat_flags == HUGETLB_SHMFS_INODE && !can_do_hugetlb_shm()) { *user = current_user(); if (user_shm_lock(size, *user)) { task_lock(current); pr_warn_once("%s (%d): Using mlock ulimits for SHM_HUGETLB is deprecated\n", current->comm, current->pid); task_unlock(current); } else { *user = NULL; return ERR_PTR(-EPERM); } } ... } Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com> |
||
---|---|---|
.. | ||
acct.5 | ||
charmap.5 | ||
core.5 | ||
dir_colors.5 | ||
elf.5 | ||
filesystems.5 | ||
fs.5 | ||
ftpusers.5 | ||
gai.conf.5 | ||
group.5 | ||
host.conf.5 | ||
hosts.5 | ||
hosts.equiv.5 | ||
intro.5 | ||
issue.5 | ||
locale.5 | ||
motd.5 | ||
networks.5 | ||
nologin.5 | ||
nscd.conf.5 | ||
nss.5 | ||
nsswitch.conf.5 | ||
passwd.5 | ||
proc.5 | ||
procfs.5 | ||
protocols.5 | ||
repertoiremap.5 | ||
resolv.conf.5 | ||
resolver.5 | ||
rpc.5 | ||
securetty.5 | ||
services.5 | ||
shells.5 | ||
slabinfo.5 | ||
sysfs.5 | ||
termcap.5 | ||
tmpfs.5 | ||
ttytype.5 | ||
tzfile.5 | ||
utmp.5 | ||
utmpx.5 | ||
wtmp.5 |