Re: shmget with SHM_HUGETLB flag: Operation not permitted

From: Zlatko Calusic
Date: Fri Feb 27 2004 - 11:34:11 EST


Jochen Roemling <jochen@xxxxxxxxxxxx> writes:

> William Lee Irwin III wrote:
>
>>Check /proc/sys/vm/nr_hugepages and /proc/sys/kernel/shmmax also.
>>
>>
> cat /proc/sys/vm/nr_hugepages
> 64
>
> cat /proc/sys/kernel/shmmax
> 33554432
>
> cat /proc/meminfo | grep Huge
> HugePages_Total: 64
> HugePages_Free: 62
> Hugepagesize: 4096 kB
>
> but again: root can, users cannot, so sizes won't matter, would they?

Of course! Appended simple patch is what i did (ugly, I know) and that
helped me install Oracle10g on Debian unstable (with two other
adaptations). I don't know how in the hell I forgot to put that
important patch on my page where I explain how to install Oracle10g on
Debian?! Sorry, it'll be on http://linux.inet.hr/oracle10g_on_debian.html
later today or tomorrow, after I check some other problems people have
reported to me (and you Jochen, too :)).

Index: 3.3/fs/hugetlbfs/inode.c
--- 3.3/fs/hugetlbfs/inode.c Thu, 19 Feb 2004 19:05:15 +0100 zcalusic (linux26/D/6_inode.c 1.1.1.2 644)
+++ 3.4/fs/hugetlbfs/inode.c Mon, 23 Feb 2004 09:33:52 +0100 zcalusic (linux26/D/6_inode.c 1.1.1.3 644)
@@ -694,9 +694,6 @@
struct qstr quick_string;
char buf[16];

- if (!capable(CAP_IPC_LOCK))
- return ERR_PTR(-EPERM);
-
if (!is_hugepage_mem_enough(size))
return ERR_PTR(-ENOMEM);
n = atomic_read(&hugetlbfs_counter);

Regards,
--
Zlatko

P.S. Please Cc: me, I'm not subscribed.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/