From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Hugh Dickins <hughd@google.com>
Cc: linux-mm@kvack.org, Dave Hansen <dave.hansen@linux.intel.com>,
Cyrill Gorcunov <gorcunov@openvz.org>,
Pavel Emelyanov <xemul@openvz.org>,
linux-kernel@vger.kernel.org,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: [PATCH 0/2] Account PMD page tables to the process
Date: Tue, 13 Jan 2015 21:14:14 +0200 [thread overview]
Message-ID: <1421176456-21796-1-git-send-email-kirill.shutemov@linux.intel.com> (raw)
Currently we don't account PMD page tables to the process. It can lead to
local DoS: unprivileged user can allocate >500 MiB on x86_64 per process
without being noticed by oom-killer or memory cgroup.
Proposed fix adds accounting for PMD table the same way we account for PTE
tables.
There're few corner case in the accounting (see patch 2/2) which have not
well tested yet. If anybody know any other cases we should handle, please
let me know.
Kirill A. Shutemov (2):
mm: rename mm->nr_ptes to mm->nr_pgtables
mm: account pmd page tables to the process
Documentation/sysctl/vm.txt | 2 +-
arch/x86/mm/pgtable.c | 13 ++++++++-----
fs/proc/task_mmu.c | 2 +-
include/linux/mm_types.h | 2 +-
kernel/fork.c | 2 +-
mm/debug.c | 4 ++--
mm/huge_memory.c | 10 +++++-----
mm/hugetlb.c | 8 ++++++--
mm/memory.c | 6 ++++--
mm/mmap.c | 9 +++++++--
mm/oom_kill.c | 8 ++++----
11 files changed, 40 insertions(+), 26 deletions(-)
--
2.1.4
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2015-01-13 19:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-13 19:14 Kirill A. Shutemov [this message]
2015-01-13 19:14 ` [PATCH 1/2] mm: rename mm->nr_ptes to mm->nr_pgtables Kirill A. Shutemov
2015-01-13 20:36 ` Dave Hansen
2015-01-13 20:41 ` Kirill A. Shutemov
2015-01-13 21:35 ` Dave Hansen
2015-01-13 21:43 ` Cyrill Gorcunov
2015-01-13 21:49 ` Dave Hansen
2015-01-14 9:45 ` Cyrill Gorcunov
2015-01-14 14:33 ` Kirill A. Shutemov
2015-01-14 14:48 ` Cyrill Gorcunov
2015-01-13 19:14 ` [PATCH 2/2] mm: account pmd page tables to the process Kirill A. Shutemov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421176456-21796-1-git-send-email-kirill.shutemov@linux.intel.com \
--to=kirill.shutemov@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@linux.intel.com \
--cc=gorcunov@openvz.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=xemul@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).