lkml.org 
[lkml]   [2017]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectsuspicious __GFP_NOMEMALLOC in selinux
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

\
 
 \ /
  Last update: 2017-08-02 12:51    [W:0.182 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site