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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: aglitke
Date: Wednesday, November 14, 2007 - 8:31 am

Hi Ciju:

I am still not exactly sure why this patch is needed.  As I read
user_shm_lock():


... if the user's locked limit (ulimit -l) is set to unlimited, allowed
(above) is set to 1.  In that case, the second part of that if() is
bypassed, and the function grants permission.  Therefore, the easy
solution is to make sure your user's lock_limit is RLIM_INFINITY.

On Wed, 2007-11-14 at 19:45 +0530, Ciju Rajan K wrote:
<snip>

This will allow any user in hugetlb_shm_group to make unlimited use of
huge page shm segments _and_ normal page shm segments.  Definitely not
what you want.


Please don't add new #ifdefs into .c files, headers only.

-- 
Adam Litke - (agl at us.ibm.com)
IBM Linux Technology Center

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

Messages in current thread:
Re: [RFC] [PATCH] hugetlbfs :shmget with SHM_HUGETLB only ..., aglitke, (Wed Nov 14, 8:31 am)
Re: [RFC] [PATCH] hugetlbfs :shmget with SHM_HUGETLB only ..., William Lee Irwin III, (Wed Nov 14, 3:00 pm)