shmget with SHM_HUGETLB flag: Operation not permitted
Hi,
I'm using stock kernel 2.6.2. I have HUGETLB support compiled in.
CONFIG_HUGETLBFS=yCONFIG_HUGETLB_PAGE=y
When issuing this command in a C pgm
shmid =shmget(IPC_PRIVATE, SOMESIZE, SHM_HUGETLB|IPC_CREAT|SHM_R|SHM_W)
I get "Operation not Permitted" when running it as a normal user. It works for root. Without the SHM_HUGETLB flag it works fine for all users.
How can I grant the permission to use HUGETLB to ordinary users?
Jochen
Quoted 9 lines · Jochen Roemling
Hi,
I'm using stock kernel 2.6.2. I have HUGETLB support compiled in.CONFIG_HUGETLBFS=yCONFIG_HUGETLB_PAGE=y
When issuing this command in a C pgm
shmid =shmget(IPC_PRIVATE, SOMESIZE, SHM_HUGETLB|IPC_CREAT|SHM_R|SHM_W) I get "Operation not Permitted" when running it as a normal user. It works for root. Without theSHM_HUGETLBflag it works fine for all users. How can I grant the permission to use HUGETLB to ordinary users?
(a) use the fs which uses fs permissions to grant users permission to fiddle with hugetlb
(b) man 2 capset
(c) proxy daemon for shmget()
-- wli
Quoted 6 lines · * William Lee Irwin III ([email protected]) wrote:
Quoted 1 line · Jochen Roemling
How can I grant the permission to use HUGETLB to ordinary users?
(a) use the fs which uses fs permissions to grant users permission to fiddle with hugetlb
(b) man 2 capset
In case that part wasn't clear, it would be CAP_IPC_LOCK capability.
thanks,
-chris
Signature · 1 line
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net