suspicious __GFP_NOMEMALLOC in selinux
Subsystems (2)
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
Signature · 2 lines
Michal Hocko SUSE Labs
Quoted 9 lines · Michal Hocko
Hi,
while doing something completely unrelated to selinux I've noticed a really strange__GFP_NOMEMALLOCusage pattern in selinux, especiallyGFP_ATOMIC|__GFP_NOMEMALLOCdoesn't make much sense to me.GFP_ATOMICon its own allows to access memory reserves while the later flag tells we cannot use memory reserves at all. The primary usecase for__GFP_NOMEMALLOCis to override a globalPF_MEMALLOCshould there be a need.
Quoted 4 lines
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'tGFP_ATOMICbe actuallyGFP_NOWAIT. What makes this path important to access memory reserves?
[NOTE: added the SELinux list to the CC line, please include that list when asking SELinux questions]
The GFP_ATOMIC|__GFP_NOMEMALLOC use in SELinux appears to be limited to security/selinux/avc.c, and digging a bit, I'm guessing commit fa1aa143ac4a copied the combination from 6290c2c43973 ("selinux: tag avc cache alloc as non-critical") and the avc_alloc_node() function.
I can't say that I'm an expert at the vm subsystem and the variety of different GFP_* flags, but your suggestion of moving to GFP_NOWAIT in security/selinux/avc.c seems reasonable and in keeping with the idea behind commit 6290c2c43973.
Signature · 8 lines
paul moore security @ redhat -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
[CC Mel]
Quoted 10 lines · Paul Moore
Quoted 9 lines · Michal Hocko
Hi,
while doing something completely unrelated to selinux I've noticed a really strange__GFP_NOMEMALLOCusage pattern in selinux, especiallyGFP_ATOMIC|__GFP_NOMEMALLOCdoesn't make much sense to me.GFP_ATOMICon its own allows to access memory reserves while the later flag tells we cannot use memory reserves at all. The primary usecase for__GFP_NOMEMALLOCis to override a globalPF_MEMALLOCshould there be a need.
Quoted 7 lines
Quoted 4 lines
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'tGFP_ATOMICbe actuallyGFP_NOWAIT. What makes this path important to access memory reserves?[NOTE: added the SELinux list to the CC line, please include that list when asking SELinux questions]
Sorry about that. Will keep it in mind for next posts
Quoted 4 lines
The GFP_ATOMIC|__GFP_NOMEMALLOC use in SELinux appears to be limited to
security/selinux/avc.c, and digging a bit, I'm guessing commitfa1aa143ac4acopied the combination from6290c2c43973("selinux: tag avc cache alloc as non-critical") and theavc_alloc_node()function.
Thanks for the pointer. That makes much more sense now. Back in 2012 we really didn't have a good way to distinguish non sleeping and atomic with reserves allocations.
Quoted 4 lines
I can't say that I'm an expert at the vm subsystem and the variety of different GFP_* flags, but your suggestion of moving to
GFP_NOWAITinsecurity/selinux/avc.cseems reasonable and in keeping with the idea behind commit6290c2c43973.
What do you think about the following? I haven't tested it but it should be rather straightforward.
---
Mel Gorman
Acked-byQuoted 9 lines · Michal Hocko
Quoted 4 lines
The GFP_ATOMIC|__GFP_NOMEMALLOC use in SELinux appears to be limited to
security/selinux/avc.c, and digging a bit, I'm guessing commitfa1aa143ac4acopied the combination from6290c2c43973("selinux: tag avc cache alloc as non-critical") and theavc_alloc_node()function.Thanks for the pointer. That makes much more sense now. Back in 2012 we really didn't have a good way to distinguish non sleeping and atomic with reserves allocations.
Yes, and GFP_NOWAIT is the right way to express that now. It'll still wake kswapd but it won't stall on direct reclaim and won't dip into reserves.
Thanks Michal.
Quoted 13 lines
---
From6d506a75da83c0724ed399966971711f37d67411Mon Sep 17 00:00:00 2001
From: Michal Hocko <[email protected]>
Date: Thu, 3 Aug 2017 10:04:20 +0200
Subject: [PATCH] selinux: replaceGFP_ATOMIC|__GFP_NOMEMALLOCwith
GFP_NOWAITselinux avc code uses a weird combination of gfp flags. It asks for
GFP_ATOMICwhich allows access to memory reserves while it requests to not consume memory reserves by__GFP_NOMEMALLOC. This seems to be copying the pattern from6290c2c43973("selinux: tag avc cache alloc as non-critical").
Quoted 8 lines
Back then (before
d0164adc89f6("mm,page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd")) we didn't have a good way to distinguish nowait and atomic allocations so the construct made some sense. Now we do not have to play tricks though andGFP_NOWAITwill provide the required semantic (aka do not sleep and do not consume any memory reserves).Signed-off-by Michal Hocko <[email protected]>
Looks right to me
Signature · 8 lines
Mel Gorman SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 32 lines · Michal Hocko
[CC Mel]
Quoted 10 lines · Paul Moore
Quoted 9 lines · Michal Hocko
Hi,
while doing something completely unrelated to selinux I've noticed a really strange__GFP_NOMEMALLOCusage pattern in selinux, especiallyGFP_ATOMIC|__GFP_NOMEMALLOCdoesn't make much sense to me.GFP_ATOMICon its own allows to access memory reserves while the later flag tells we cannot use memory reserves at all. The primary usecase for__GFP_NOMEMALLOCis to override a globalPF_MEMALLOCshould there be a need.Quoted 7 lines
Quoted 4 lines
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'tGFP_ATOMICbe actuallyGFP_NOWAIT. What makes this path important to access memory reserves?[NOTE: added the SELinux list to the CC line, please include that list when asking SELinux questions]
Sorry about that. Will keep it in mind for next posts
Quoted 4 lines
The GFP_ATOMIC|__GFP_NOMEMALLOC use in SELinux appears to be limited to
security/selinux/avc.c, and digging a bit, I'm guessing commitfa1aa143ac4acopied the combination from6290c2c43973("selinux: tag avc cache alloc as non-critical") and theavc_alloc_node()function.Thanks for the pointer. That makes much more sense now. Back in 2012 we really didn't have a good way to distinguish non sleeping and atomic with reserves allocations.
Quoted 7 lines
Quoted 4 lines
I can't say that I'm an expert at the vm subsystem and the variety of different GFP_* flags, but your suggestion of moving to
GFP_NOWAITinsecurity/selinux/avc.cseems reasonable and in keeping with the idea behind commit6290c2c43973.What do you think about the following? I haven't tested it but it should be rather straightforward.
Why not at least __GFP_NOWARN ? And why not also __GFP_NOMEMALLOC ?
http://lkml.kernel.org/r/[email protected]
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 38 lines · Tetsuo Handa
Quoted 37 lines · Michal Hocko
[CC Mel]
Quoted 10 lines · Paul Moore
Quoted 9 lines · Michal Hocko
Hi,
while doing something completely unrelated to selinux I've noticed a really strange__GFP_NOMEMALLOCusage pattern in selinux, especiallyGFP_ATOMIC|__GFP_NOMEMALLOCdoesn't make much sense to me.GFP_ATOMICon its own allows to access memory reserves while the later flag tells we cannot use memory reserves at all. The primary usecase for__GFP_NOMEMALLOCis to override a globalPF_MEMALLOCshould there be a need.Quoted 7 lines
Quoted 4 lines
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'tGFP_ATOMICbe actuallyGFP_NOWAIT. What makes this path important to access memory reserves?[NOTE: added the SELinux list to the CC line, please include that list when asking SELinux questions]
Sorry about that. Will keep it in mind for next posts
Quoted 4 lines
The GFP_ATOMIC|__GFP_NOMEMALLOC use in SELinux appears to be limited to
security/selinux/avc.c, and digging a bit, I'm guessing commitfa1aa143ac4acopied the combination from6290c2c43973("selinux: tag avc cache alloc as non-critical") and theavc_alloc_node()function.Thanks for the pointer. That makes much more sense now. Back in 2012 we really didn't have a good way to distinguish non sleeping and atomic with reserves allocations.
Quoted 4 lines
I can't say that I'm an expert at the vm subsystem and the variety of different GFP_* flags, but your suggestion of moving to
GFP_NOWAITinsecurity/selinux/avc.cseems reasonable and in keeping with the idea behind commit6290c2c43973.
Quoted 4 lines
Quoted 2 lines
What do you think about the following? I haven't tested it but it should be rather straightforward.
Why not at least
__GFP_NOWARN?
This would require an additional justification.
Quoted 1 line
And why not also
__GFP_NOMEMALLOC?
What would be the purpose of __GFP_NOMEMALLOC? In other words which context would set PF_NOMEMALLOC so that the flag would override it?
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 39 lines · Michal Hocko
Quoted 38 lines · Tetsuo Handa
Quoted 37 lines · Michal Hocko
[CC Mel]
Quoted 10 lines · Paul Moore
Quoted 9 lines · Michal Hocko
Hi,
while doing something completely unrelated to selinux I've noticed a really strange__GFP_NOMEMALLOCusage pattern in selinux, especiallyGFP_ATOMIC|__GFP_NOMEMALLOCdoesn't make much sense to me.GFP_ATOMICon its own allows to access memory reserves while the later flag tells we cannot use memory reserves at all. The primary usecase for__GFP_NOMEMALLOCis to override a globalPF_MEMALLOCshould there be a need.Quoted 7 lines
Quoted 4 lines
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'tGFP_ATOMICbe actuallyGFP_NOWAIT. What makes this path important to access memory reserves?[NOTE: added the SELinux list to the CC line, please include that list when asking SELinux questions]
Sorry about that. Will keep it in mind for next posts
Quoted 4 lines
The GFP_ATOMIC|__GFP_NOMEMALLOC use in SELinux appears to be limited to
security/selinux/avc.c, and digging a bit, I'm guessing commitfa1aa143ac4acopied the combination from6290c2c43973("selinux: tag avc cache alloc as non-critical") and theavc_alloc_node()function.Thanks for the pointer. That makes much more sense now. Back in 2012 we really didn't have a good way to distinguish non sleeping and atomic with reserves allocations.
Quoted 4 lines
I can't say that I'm an expert at the vm subsystem and the variety of different GFP_* flags, but your suggestion of moving to
GFP_NOWAITinsecurity/selinux/avc.cseems reasonable and in keeping with the idea behind commit6290c2c43973.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
What do you think about the following? I haven't tested it but it should be rather straightforward.
Why not at least
__GFP_NOWARN?This would require an additional justification.
If allocation failure is not a problem, printing allocation failure messages is nothing but noisy.
Quoted 6 lines
Quoted 2 lines
And why not also
__GFP_NOMEMALLOC?What would be the purpose of
__GFP_NOMEMALLOC? In other words which context would setPF_NOMEMALLOCso that the flag would override it?
When allocating thread is selected as an OOM victim, it gets TIF_MEMDIE. Since that function might be called from !in_interrupt() context, it is possible that gfp_pfmemalloc_allowed() returns true due to TIF_MEMDIE and the OOM victim will dip into memory reserves even when allocation failure is not a problem.
Thus, I think that majority of plain GFP_NOWAIT users want to use GFP_NOWAIT | __GFP_NOWARN | __GFP_NOMEMALLOC.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 43 lines · Tetsuo Handa
Quoted 42 lines · Michal Hocko
Quoted 41 lines · Tetsuo Handa
Quoted 39 lines · Michal Hocko
[CC Mel]
Quoted 10 lines · Paul Moore
Quoted 9 lines · Michal Hocko
Hi,
while doing something completely unrelated to selinux I've noticed a really strange__GFP_NOMEMALLOCusage pattern in selinux, especiallyGFP_ATOMIC|__GFP_NOMEMALLOCdoesn't make much sense to me.GFP_ATOMICon its own allows to access memory reserves while the later flag tells we cannot use memory reserves at all. The primary usecase for__GFP_NOMEMALLOCis to override a globalPF_MEMALLOCshould there be a need.Quoted 7 lines
Quoted 4 lines
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'tGFP_ATOMICbe actuallyGFP_NOWAIT. What makes this path important to access memory reserves?[NOTE: added the SELinux list to the CC line, please include that list when asking SELinux questions]
Sorry about that. Will keep it in mind for next posts
Quoted 4 lines
The GFP_ATOMIC|__GFP_NOMEMALLOC use in SELinux appears to be limited to
security/selinux/avc.c, and digging a bit, I'm guessing commitfa1aa143ac4acopied the combination from6290c2c43973("selinux: tag avc cache alloc as non-critical") and theavc_alloc_node()function.Thanks for the pointer. That makes much more sense now. Back in 2012 we really didn't have a good way to distinguish non sleeping and atomic with reserves allocations.
Quoted 4 lines
I can't say that I'm an expert at the vm subsystem and the variety of different GFP_* flags, but your suggestion of moving to
GFP_NOWAITinsecurity/selinux/avc.cseems reasonable and in keeping with the idea behind commit6290c2c43973.What do you think about the following? I haven't tested it but it should be rather straightforward.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Why not at least
__GFP_NOWARN?This would require an additional justification.
If allocation failure is not a problem, printing allocation failure messages is nothing but noisy.
That alone is not a sufficient justification. An allocation warning might still tell you that something is not configured properly. Note that I am not objecting that __GFP_NOWARN is wrong it should just not be added blindly withtout deep understanding of the code which I do not have.
Quoted 11 lines
Quoted 5 lines
Quoted 1 line
And why not also
__GFP_NOMEMALLOC?What would be the purpose of
__GFP_NOMEMALLOC? In other words which context would setPF_NOMEMALLOCso that the flag would override it?When allocating thread is selected as an OOM victim, it gets
TIF_MEMDIE. Since that function might be called from !in_interrupt() context, it is possible thatgfp_pfmemalloc_allowed()returns true due toTIF_MEMDIEand the OOM victim will dip into memory reserves even when allocation failure is not a problem.
Yes this is possible but I do not see any major problem with that. I wouldn't add __GFP_NOMEMALLOC unless there is a real runaway of some sort that could be abused.
Quoted 2 lines
Thus, I think that majority of plain
GFP_NOWAITusers want to useGFP_NOWAIT|__GFP_NOWARN|__GFP_NOMEMALLOC.
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Paul Moore
maintainerQuoted 48 lines · Michal Hocko
Quoted 47 lines · Tetsuo Handa
Quoted 45 lines · Michal Hocko
Quoted 38 lines · Tetsuo Handa
Quoted 37 lines · Michal Hocko
[CC Mel]
Quoted 10 lines · Paul Moore
Quoted 9 lines · Michal Hocko
Hi,
while doing something completely unrelated to selinux I've noticed a really strange__GFP_NOMEMALLOCusage pattern in selinux, especiallyGFP_ATOMIC|__GFP_NOMEMALLOCdoesn't make much sense to me.GFP_ATOMICon its own allows to access memory reserves while the later flag tells we cannot use memory reserves at all. The primary usecase for__GFP_NOMEMALLOCis to override a globalPF_MEMALLOCshould there be a need.Quoted 7 lines
Quoted 4 lines
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'tGFP_ATOMICbe actuallyGFP_NOWAIT. What makes this path important to access memory reserves?[NOTE: added the SELinux list to the CC line, please include that list when asking SELinux questions]
Sorry about that. Will keep it in mind for next posts
Quoted 4 lines
The GFP_ATOMIC|__GFP_NOMEMALLOC use in SELinux appears to be limited to
security/selinux/avc.c, and digging a bit, I'm guessing commitfa1aa143ac4acopied the combination from6290c2c43973("selinux: tag avc cache alloc as non-critical") and theavc_alloc_node()function.Thanks for the pointer. That makes much more sense now. Back in 2012 we really didn't have a good way to distinguish non sleeping and atomic with reserves allocations.
Quoted 4 lines
I can't say that I'm an expert at the vm subsystem and the variety of different GFP_* flags, but your suggestion of moving to
GFP_NOWAITinsecurity/selinux/avc.cseems reasonable and in keeping with the idea behind commit6290c2c43973.Quoted 4 lines
Quoted 2 lines
What do you think about the following? I haven't tested it but it should be rather straightforward.
Why not at least
__GFP_NOWARN?This would require an additional justification.
Quoted 8 lines
Quoted 2 lines
If allocation failure is not a problem, printing allocation failure messages is nothing but noisy.
That alone is not a sufficient justification. An allocation warning might still tell you that something is not configured properly. Note that I am not objecting that
__GFP_NOWARNis wrong it should just not be added blindly withtout deep understanding of the code which I do not have.
I understand the concern about noise from failed memory allocations, but I tend to agree with the argument that notification of these failures could be useful to admins/devs who are trying to diagnose problems; let's *not* use __GFP_NOWARN in the SELinux AVC code.
Quoted 12 lines
Quoted 11 lines
Quoted 5 lines
Quoted 1 line
And why not also
__GFP_NOMEMALLOC?What would be the purpose of
__GFP_NOMEMALLOC? In other words which context would setPF_NOMEMALLOCso that the flag would override it?When allocating thread is selected as an OOM victim, it gets
TIF_MEMDIE. Since that function might be called from !in_interrupt() context, it is possible thatgfp_pfmemalloc_allowed()returns true due toTIF_MEMDIEand the OOM victim will dip into memory reserves even when allocation failure is not a problem.
Quoted 3 lines
Yes this is possible but I do not see any major problem with that. I wouldn't add
__GFP_NOMEMALLOCunless there is a real runaway of some sort that could be abused.
Adding __GFP_NOMEMALLOC would not hurt anything would it?
Quoted 2 lines
Quoted 2 lines
Thus, I think that majority of plain
GFP_NOWAITusers want to useGFP_NOWAIT|__GFP_NOWARN|__GFP_NOMEMALLOC.
Signature · 8 lines
paul moore www.paul-moore.com -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 2 lines · Paul Moore
Quoted 1 line · Michal Hocko
On Thu 03-08-17 19:44:46, Tetsuo Handa wrote:
[...]
Quoted 11 lines
Quoted 9 lines
Quoted 5 lines
When allocating thread is selected as an OOM victim, it gets
TIF_MEMDIE. Since that function might be called from !in_interrupt() context, it is possible thatgfp_pfmemalloc_allowed()returns true due toTIF_MEMDIEand the OOM victim will dip into memory reserves even when allocation failure is not a problem.Yes this is possible but I do not see any major problem with that. I wouldn't add
__GFP_NOMEMALLOCunless there is a real runaway of some sort that could be abused.Adding
__GFP_NOMEMALLOCwould not hurt anything would it?
I is not harmfull but I fail to see how it would be useful either and as such it just adds a pointless gfp flag and confusion to whoever tries to modify the code in future. Really the main purpose of __GFP_NOMEMALLOC is to override the process scope PF_MEMALLOC. As such it is quite a hack and the fewer users we have the better.
Btw. Should I resend the patch or somebody will take it from this email thread?
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Paul Moore
maintainerQuoted 14 lines · Michal Hocko
Quoted 2 lines · Paul Moore
Quoted 1 line · Michal Hocko
On Thu 03-08-17 19:44:46, Tetsuo Handa wrote:
[...]
Quoted 10 lines
Quoted 9 lines
Quoted 5 lines
When allocating thread is selected as an OOM victim, it gets
TIF_MEMDIE. Since that function might be called from !in_interrupt() context, it is possible thatgfp_pfmemalloc_allowed()returns true due toTIF_MEMDIEand the OOM victim will dip into memory reserves even when allocation failure is not a problem.Yes this is possible but I do not see any major problem with that. I wouldn't add
__GFP_NOMEMALLOCunless there is a real runaway of some sort that could be abused.
Quoted 7 lines
Quoted 1 line
Adding
__GFP_NOMEMALLOCwould not hurt anything would it?I is not harmfull but I fail to see how it would be useful either and as such it just adds a pointless gfp flag and confusion to whoever tries to modify the code in future. Really the main purpose of
__GFP_NOMEMALLOCis to override the process scopePF_MEMALLOC. As such it is quite a hack and the fewer users we have the better.
Okay, that is a viable explanation for me.
Quoted 2 lines
Btw. Should I resend the patch or somebody will take it from this email thread?
No, unless your mailer mangled the patch I should be able to pull it from this thread. However, I'm probably going to let this sit until early next week on the odd chance that anyone else wants to comment on the flag choice. I'll send another reply once I merge the patch.
Signature · 8 lines
paul moore www.paul-moore.com -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 1 line · Paul Moore
On Fri, Aug 4, 2017 at 3:56 AM, Michal Hocko <[email protected]> wrote:
[...]
Quoted 7 lines
Quoted 2 lines
Btw. Should I resend the patch or somebody will take it from this email thread?
No, unless your mailer mangled the patch I should be able to pull it from this thread. However, I'm probably going to let this sit until early next week on the odd chance that anyone else wants to comment on the flag choice. I'll send another reply once I merge the patch.
OK, there is certainly no hurry for merging this. Thanks!
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 11 lines · Michal Hocko
Quoted 1 line · Paul Moore
On Fri, Aug 4, 2017 at 3:56 AM, Michal Hocko <[email protected]> wrote:
[...]
Quoted 7 lines
Quoted 2 lines
Btw. Should I resend the patch or somebody will take it from this email thread?
No, unless your mailer mangled the patch I should be able to pull it from this thread. However, I'm probably going to let this sit until early next week on the odd chance that anyone else wants to comment on the flag choice. I'll send another reply once I merge the patch.
Quoted 4 lines
OK, there is certainly no hurry for merging this. Thanks! --
Michal Hocko
SUSE Labs
Merged into selinux/next with this patch description, and your sign-off (I had to munge the description a bit based on the thread). Are you okay with this, especially your sign-off?
commit 476accbe2f6ef69caeebe99f52a286e12ac35aee
Author: Michal Hocko <[email protected]>
Date: Thu Aug 3 10:11:52 2017 +0200
selinux: use GFP_NOWAIT in the AVC kmem_caches
There is a strange __GFP_NOMEMALLOC usage pattern in SELinux, specifically GFP_ATOMIC | __GFP_NOMEMALLOC which doesn't make much sense. GFP_ATOMIC on its own allows to access memory reserves while __GFP_NOMEMALLOC dictates we cannot use memory reserves. Replace this with the much more sane GFP_NOWAIT in the AVC code as we can tolerate memory allocation failures in that code.
Signature · 8 lines
paul moore www.paul-moore.com -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 12 lines · Paul Moore
Quoted 11 lines · Michal Hocko
Quoted 1 line · Paul Moore
On Fri, Aug 4, 2017 at 3:56 AM, Michal Hocko <[email protected]> wrote:
[...]
Quoted 7 lines
Quoted 2 lines
Btw. Should I resend the patch or somebody will take it from this email thread?
No, unless your mailer mangled the patch I should be able to pull it from this thread. However, I'm probably going to let this sit until early next week on the odd chance that anyone else wants to comment on the flag choice. I'll send another reply once I merge the patch.
Quoted 8 lines
Quoted 4 lines
OK, there is certainly no hurry for merging this. Thanks! --
Michal Hocko
SUSE LabsMerged into selinux/next with this patch description, and your sign-off (I had to munge the description a bit based on the thread). Are you okay with this, especially your sign-off?
Yes. Thanks!
Quoted 21 lines
commit
476accbe2f6ef69caeebe99f52a286e12ac35aee
Author: Michal Hocko <[email protected]>
Date: Thu Aug 3 10:11:52 2017 +0200selinux: use
GFP_NOWAITin the AVCkmem_cachesThere is a strange
__GFP_NOMEMALLOCusage pattern in SELinux, specificallyGFP_ATOMIC|__GFP_NOMEMALLOCwhich doesn't make much sense.GFP_ATOMICon its own allows to access memory reserves while__GFP_NOMEMALLOCdictates we cannot use memory reserves. Replace this with the much more saneGFP_NOWAITin the AVC code as we can tolerate memory allocation failures in that code.Signed-off-by Michal Hocko <[email protected]>Acked-by Mel Gorman <[email protected]>Signed-off-by Paul Moore <[email protected]>Signature · 2 lines
paul moore www.paul-moore.com
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Paul Moore
maintainerQuoted 18 lines · Michal Hocko
Quoted 17 lines · Paul Moore
Quoted 15 lines · Michal Hocko
Quoted 1 line · Paul Moore
On Fri, Aug 4, 2017 at 3:56 AM, Michal Hocko <[email protected]> wrote:
[...]
Quoted 7 lines
Quoted 2 lines
Btw. Should I resend the patch or somebody will take it from this email thread?
No, unless your mailer mangled the patch I should be able to pull it from this thread. However, I'm probably going to let this sit until early next week on the odd chance that anyone else wants to comment on the flag choice. I'll send another reply once I merge the patch.
OK, there is certainly no hurry for merging this. Thanks! --
Michal Hocko
SUSE Labs
Quoted 5 lines
Quoted 3 lines
Merged into selinux/next with this patch description, and your sign-off (I had to munge the description a bit based on the thread). Are you okay with this, especially your sign-off?
Yes. Thanks!
Great, thanks for the confirmation. I'll send this up during the next merge window.
Signature · 8 lines
paul moore www.paul-moore.com -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>