From: Michal Hocko <mhocko@kernel.org>
To: Jeff Vander Stoep <jeffv@google.com>
Cc: Paul Moore <pmoore@redhat.com>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: suspicious __GFP_NOMEMALLOC in selinux
Date: Wed, 2 Aug 2017 12:50:18 +0200 [thread overview]
Message-ID: <20170802105018.GA2529@dhcp22.suse.cz> (raw)
Hi,
while doing something completely unrelated to selinux I've noticed a
really strange __GFP_NOMEMALLOC usage pattern in selinux, especially
GFP_ATOMIC | __GFP_NOMEMALLOC doesn't make much sense to me. GFP_ATOMIC
on its own allows to access memory reserves while the later flag tells
we cannot use memory reserves at all. The primary usecase for
__GFP_NOMEMALLOC is to override a global PF_MEMALLOC should there be a
need.
It all leads to fa1aa143ac4a ("selinux: extended permissions for
ioctls") which doesn't explain this aspect so let me ask. Why is the
flag used at all? Moreover shouldn't GFP_ATOMIC be actually GFP_NOWAIT.
What makes this path important to access memory reserves?
Thanks
--
Michal Hocko
SUSE Labs
--
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:[~2017-08-02 10:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 10:50 Michal Hocko [this message]
2017-08-02 21:45 ` suspicious __GFP_NOMEMALLOC in selinux Paul Moore
2017-08-03 8:11 ` Michal Hocko
2017-08-03 8:56 ` Mel Gorman
2017-08-03 10:02 ` Tetsuo Handa
2017-08-03 10:33 ` Michal Hocko
2017-08-03 10:44 ` Tetsuo Handa
2017-08-03 11:05 ` Michal Hocko
2017-08-03 18:17 ` Paul Moore
2017-08-04 7:56 ` Michal Hocko
2017-08-04 17:12 ` Paul Moore
2017-08-07 6:58 ` Michal Hocko
2017-08-08 13:34 ` Paul Moore
2017-08-10 7:02 ` Michal Hocko
2017-08-10 13:49 ` Paul Moore
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=20170802105018.GA2529@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=jeffv@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pmoore@redhat.com \
/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).