SELinux: Reduce max avtab size to avoid page allocation failures
PATCH 1/1 SELinux: Reduce max avtab size to avoid page allocation failures
Reduce MAX_AVTAB_HASH_BITS so that the avtab allocation is an order 2 allocation rather than an order 4 allocation on x86_64. This addresses reports of page allocation failures:
http://marc.info/?l=selinux&m=126757230625867&w=2
https://bugzilla.redhat.com/show_bug.cgi?id=570433
---
security/selinux/ss/avtab.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
security/selinux/ss/avtab.h +1 -1
@@ -82,7 +82,7 @@ struct avtab_node *avtab_search_node_next(struct avtab_node *node, int specifiedvoid avtab_cache_init (void );void avtab_cache_destroy (void ); -#define MAX_AVTAB_HASH_BITS 13 +#define MAX_AVTAB_HASH_BITS 11#define MAX_AVTAB_HASH_BUCKETS (1 << MAX_AVTAB_HASH_BITS)#define MAX_AVTAB_HASH_MASK (MAX_AVTAB_HASH_BUCKETS-1)#define MAX_AVTAB_SIZE MAX_AVTAB_HASH_BUCKETS
Signature · 8 lines
Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 8 lines · Stephen Smalley
Reduce
MAX_AVTAB_HASH_BITSso that the avtab allocation is an order 2 allocation rather than an order 4 allocation onx86_64. This addresses reports of page allocation failures:
http://marc.info/?l=selinux&m=126757230625867&w=2
https://bugzilla.redhat.com/show_bug.cgi?id=570433Reported-by Russell Coker <[email protected]>Signed-off-by Stephen D. Smalley <[email protected]>
although if I get a coulpe of minutes I might look at using lib/flex_array.c for this....
-Eric
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 8 lines · Stephen Smalley
Reduce
MAX_AVTAB_HASH_BITSso that the avtab allocation is an order 2 allocation rather than an order 4 allocation onx86_64. This addresses reports of page allocation failures:
http://marc.info/?l=selinux&m=126757230625867&w=2
https://bugzilla.redhat.com/show_bug.cgi?id=570433Reported-by Russell Coker <[email protected]>Signed-off-by Stephen D. Smalley <[email protected]>
Applied togit://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next
Signature · 7 lines
James Morris <[email protected]> -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 8 lines · James Morris
Quoted 6 lines · Stephen Smalley
Reduce
MAX_AVTAB_HASH_BITSso that the avtab allocation is an order 2 allocation rather than an order 4 allocation onx86_64. This addresses reports of page allocation failures:
http://marc.info/?l=selinux&m=126757230625867&w=2
https://bugzilla.redhat.com/show_bug.cgi?id=570433
Quoted 6 lines
Quoted 2 lines
Reported-by Russell Coker <[email protected]>Signed-off-by Stephen D. Smalley <[email protected]>Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next
Candidate for -stable? for 2.6.34?
Signature · 8 lines
Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 4 lines · Stephen Smalley
Quoted 2 lines
Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#nextCandidate for -stable? for 2.6.34?
I'm not sure -- it's not really a bug or a regression. I think we want to keep changes to -stable and the -rc series as essential as possible.
Signature · 7 lines
James Morris <[email protected]> -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.