All of lore.kernel.org
 help / color / mirror / Atom feed
* suspicious __GFP_NOMEMALLOC in selinux
@ 2017-08-02 10:50 ` Michal Hocko
  0 siblings, 0 replies; 30+ messages in thread
From: Michal Hocko @ 2017-08-02 10:50 UTC (permalink / raw)
  To: Jeff Vander Stoep; +Cc: Paul Moore, linux-mm, LKML

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

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2017-08-10 13:49 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-02 10:50 suspicious __GFP_NOMEMALLOC in selinux Michal Hocko
2017-08-02 10:50 ` Michal Hocko
2017-08-02 21:45 ` Paul Moore
2017-08-02 21:45   ` Paul Moore
2017-08-03  8:11   ` Michal Hocko
2017-08-03  8:11     ` Michal Hocko
2017-08-03  8:56     ` Mel Gorman
2017-08-03  8:56       ` Mel Gorman
2017-08-03 10:02     ` Tetsuo Handa
2017-08-03 10:02       ` Tetsuo Handa
2017-08-03 10:33       ` Michal Hocko
2017-08-03 10:33         ` Michal Hocko
2017-08-03 10:44         ` Tetsuo Handa
2017-08-03 10:44           ` Tetsuo Handa
2017-08-03 11:05           ` Michal Hocko
2017-08-03 11:05             ` Michal Hocko
2017-08-03 18:17             ` Paul Moore
2017-08-03 18:17               ` Paul Moore
2017-08-04  7:56               ` Michal Hocko
2017-08-04  7:56                 ` Michal Hocko
2017-08-04 17:12                 ` Paul Moore
2017-08-04 17:12                   ` Paul Moore
2017-08-07  6:58                   ` Michal Hocko
2017-08-07  6:58                     ` Michal Hocko
2017-08-08 13:34                     ` Paul Moore
2017-08-08 13:34                       ` Paul Moore
2017-08-10  7:02                       ` Michal Hocko
2017-08-10  7:02                         ` Michal Hocko
2017-08-10 13:49                         ` Paul Moore
2017-08-10 13:49                           ` Paul Moore

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.