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

2008-01-30 Thread Ciju Rajan K
Ciju Rajan K wrote: William Lee Irwin III wrote: On Fri, Nov 30, 2007 at 12:02:32AM +0530, Ciju Rajan K wrote: I tested your patch. But that is not solving the problem. If the code change to user_shm_lock() is not a good solution, could you please suggest a method so that the normal user

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

2008-01-30 Thread Ciju Rajan K
Ciju Rajan K wrote: William Lee Irwin III wrote: On Fri, Nov 30, 2007 at 12:02:32AM +0530, Ciju Rajan K wrote: I tested your patch. But that is not solving the problem. If the code change to user_shm_lock() is not a good solution, could you please suggest a method so that the normal user

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

2008-01-29 Thread Ciju Rajan K
William Lee Irwin III wrote: On Fri, Nov 30, 2007 at 12:02:32AM +0530, Ciju Rajan K wrote: I tested your patch. But that is not solving the problem. If the code change to user_shm_lock() is not a good solution, could you please suggest a method so that the normal user is able to allocate

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

2008-01-29 Thread Ciju Rajan K
William Lee Irwin III wrote: On Fri, Nov 30, 2007 at 12:02:32AM +0530, Ciju Rajan K wrote: I tested your patch. But that is not solving the problem. If the code change to user_shm_lock() is not a good solution, could you please suggest a method so that the normal user is able to allocate

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

2007-11-29 Thread Ciju Rajan K
Hi Wli, I tested your patch. But that is not solving the problem. If the code change to user_shm_lock() is not a good solution, could you please suggest a method so that the normal user is able to allocate the huge pages, if his gid is added to /proc/sys/vm/hugetlb_shm_group Thanks Ciju

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

2007-11-29 Thread Ciju Rajan K
Hi Wli, I tested your patch. But that is not solving the problem. If the code change to user_shm_lock() is not a good solution, could you please suggest a method so that the normal user is able to allocate the huge pages, if his gid is added to /proc/sys/vm/hugetlb_shm_group Thanks Ciju

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

2007-11-16 Thread Ciju Rajan K
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: @@ -248,8 +249,14 @@ int user_shm_lock(size_t si

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

2007-11-16 Thread Ciju Rajan K
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 @@ -248,8 +249,14 @@ int user_shm_lock(size_t size, struct us allowed = 1

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

2007-11-14 Thread Ciju Rajan K
When a normal user is trying to allocate huge pages using shmget(), the user is not able to get the memory even if the gid is present in /proc/sys/vm/hugetlb_shm_group. The function user_shm_lock() is not successful. The user does not have the capability to perform a CAP_IPC_LOCK. A check is

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

2007-11-14 Thread Ciju Rajan K
When a normal user is trying to allocate huge pages using shmget(), the user is not able to get the memory even if the gid is present in /proc/sys/vm/hugetlb_shm_group. The function user_shm_lock() is not successful. The user does not have the capability to perform a CAP_IPC_LOCK. A check is