Re: [RFC] [PATCH] hugetlbfs :shmget with SHM_HUGETLB only works as root

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: aglitke <agl@...>
Cc: <linux-kernel@...>, <wli@...>
Date: Friday, November 16, 2007 - 9:59 am

Hi  Adam,
 If this condition check is not included, the root user have to use the 
function
 setrlimit() to set the lock_limit of a normal user to RLIM_INFINITY.  I 
think
 the /proc interface 'hugetlb_shm_group' is introduced to avoid these 
difficulties.
 Please correct me, if I am wrong.

 Regarding the problem with the 'if' condition, I feel that even in the 
case of
 user's lock_limit is set to unlimited, he could use unlimited hugepages and
 normal page shm segments. So what is the advantage in this scenario.

 I tried to avoid the #ifdef statements. But the variable 
sysctl_hugetlb_shm_group is defined
 in fs/hugetlbfs/inode.c, this segment is enabled only when the config 
parameter
 CONFIG_HUGETLBFS is set to yes. If the hugetlbfs is  not selected while 
configuring,
 there would be a compilation error.

 Is there any better way so that the root user can configure the gid in 
'hugetlb_shm_group'
 and the user is able to access the huge pages using shmget().

Thanks
Ciju

aglitke wrote:

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC] [PATCH] hugetlbfs :shmget with SHM_HUGETLB only wo..., Ciju Rajan K, (Fri Nov 16, 9:59 am)
Re: [RFC] [PATCH] hugetlbfs :shmget with SHM_HUGETLB only wo..., William Lee Irwin III, (Wed Nov 14, 6:00 pm)
Re: [RFC] [PATCH] hugetlbfs :shmget with SHM_HUGETLB only wo..., William Lee Irwin III, (Thu Nov 29, 7:11 pm)