Re: [patch] mlock-as-nonroot revisted

From: Andrea Arcangeli (andrea_at_suse.de)
Date: 07/30/04

  • Next message: Andrea Arcangeli: "Re: [patch] mlock-as-nonroot revisted"
    Date:	Fri, 30 Jul 2004 04:09:10 +0200
    To: Chris Wright <chrisw@osdl.org>
    
    

    On Thu, Jul 29, 2004 at 06:52:15PM -0700, Chris Wright wrote:
    > 1) hugetlb accounting is not done. so it's only simple change to checking
    > permission, but the acutal usage is not tracked (gets back to problem
    > andrea pointed out). with this patch, wouldn't !capable(CAP_IPC_LOCK)
    > && rlim[RLIMIT_MEMLOCK].rlim_cur == 1 be enough to get all the hugepages
    > a user would want (i.e. security hole)?

    exactly, you beaten me on reply-speed ;).

    And this patch is needed primarly to get access to hugetlbfs without
    IPC_CAP_LOCK as Arjan mentioned.

    > I do agree, however, that storing in user struct allows for quota like
    > accounting that matches the shm_lock and hugetlb use cases.

    Looking forward to see hugetlbfs working with user quota too...
    rlimit user-quota is certainly a reasonable approach, though I'm not
    sure what happens if root runs chown, that's funny not? Comments?
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Andrea Arcangeli: "Re: [patch] mlock-as-nonroot revisted"

    Relevant Pages

    • Re: More convenient way to grab hugepage memory
      ... > kernel, creating special cases and bloat of what you could with simple a ... glibc do transparently use hugetlb pages. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • RE: [Lhms-devel] [PATCH 0/7] Fragmentation Avoidance V19
      ... we will need this functionality even for code pages. ... in some archs different address space is reserved hugetlb). ... In this case to keep the kernel changes to minimum, RTLD will ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [Lhms-devel] [PATCH 0/7] Fragmentation Avoidance V19
      ... It used to be that HIGHMEM pages were always cleanable on x86, ... the exact size of hugetlb is obviously architecture-specific, ... but sometimes want bigger areas ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] Expose SHM_HUGETLB in shmctl(id, IPC_STAT, ...)
      ... Without this feature, an application has no way to figure out if a given ... segment is hugetlb or not. ... Also, if the flag is exported via ipcs, the system administrator would ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [Lse-tech] Re: [PATCH] [0/6] HUGETLB memory commitment
      ... AFAICT the hugetlb pages start off as ... > This SF.Net email is sponsored by: IBM Linux Tutorials ... > GenToo technologies. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)