* [PATCH] SELinux: Reduce max avtab size to avoid page allocation failures
@ 2010-03-15 14:42 Stephen Smalley
2010-03-15 19:23 ` Eric Paris
2010-03-15 21:31 ` James Morris
0 siblings, 2 replies; 5+ messages in thread
From: Stephen Smalley @ 2010-03-15 14:42 UTC (permalink / raw)
To: James Morris; +Cc: Eric Paris, Russell Coker, selinux
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
Reported-by: Russell Coker <russell@coker.com.au>
Signed-off-by: Stephen D. Smalley <sds@tycho.nsa.gov>
---
security/selinux/ss/avtab.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/selinux/ss/avtab.h b/security/selinux/ss/avtab.h
index 8da6a84..cd4f734 100644
--- a/security/selinux/ss/avtab.h
+++ b/security/selinux/ss/avtab.h
@@ -82,7 +82,7 @@ struct avtab_node *avtab_search_node_next(struct avtab_node *node, int specified
void 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
--
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] SELinux: Reduce max avtab size to avoid page allocation failures
2010-03-15 14:42 [PATCH] SELinux: Reduce max avtab size to avoid page allocation failures Stephen Smalley
@ 2010-03-15 19:23 ` Eric Paris
2010-03-15 21:31 ` James Morris
1 sibling, 0 replies; 5+ messages in thread
From: Eric Paris @ 2010-03-15 19:23 UTC (permalink / raw)
To: Stephen Smalley; +Cc: James Morris, Russell Coker, selinux
On Mon, 2010-03-15 at 10:42 -0400, Stephen Smalley wrote:
> 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
>
> Reported-by: Russell Coker <russell@coker.com.au>
> Signed-off-by: Stephen D. Smalley <sds@tycho.nsa.gov>
Acked-by: Eric Paris <eparis@redhat.com>
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] SELinux: Reduce max avtab size to avoid page allocation failures
2010-03-15 14:42 [PATCH] SELinux: Reduce max avtab size to avoid page allocation failures Stephen Smalley
2010-03-15 19:23 ` Eric Paris
@ 2010-03-15 21:31 ` James Morris
2010-03-16 13:45 ` Stephen Smalley
1 sibling, 1 reply; 5+ messages in thread
From: James Morris @ 2010-03-15 21:31 UTC (permalink / raw)
To: Stephen Smalley; +Cc: Eric Paris, Russell Coker, selinux
On Mon, 15 Mar 2010, Stephen Smalley wrote:
> 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
>
> Reported-by: Russell Coker <russell@coker.com.au>
> Signed-off-by: Stephen D. Smalley <sds@tycho.nsa.gov>
Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next
--
James Morris
<jmorris@namei.org>
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] SELinux: Reduce max avtab size to avoid page allocation failures
2010-03-15 21:31 ` James Morris
@ 2010-03-16 13:45 ` Stephen Smalley
2010-03-16 21:47 ` James Morris
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Smalley @ 2010-03-16 13:45 UTC (permalink / raw)
To: James Morris; +Cc: Eric Paris, Russell Coker, selinux
On Tue, 2010-03-16 at 08:31 +1100, James Morris wrote:
> On Mon, 15 Mar 2010, Stephen Smalley wrote:
>
> > 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
> >
> > Reported-by: Russell Coker <russell@coker.com.au>
> > Signed-off-by: Stephen D. Smalley <sds@tycho.nsa.gov>
>
>
> Applied to
> git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next
Candidate for -stable? for 2.6.34?
--
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] SELinux: Reduce max avtab size to avoid page allocation failures
2010-03-16 13:45 ` Stephen Smalley
@ 2010-03-16 21:47 ` James Morris
0 siblings, 0 replies; 5+ messages in thread
From: James Morris @ 2010-03-16 21:47 UTC (permalink / raw)
To: Stephen Smalley; +Cc: Eric Paris, Russell Coker, selinux
On Tue, 16 Mar 2010, Stephen Smalley wrote:
> > Applied to
> > git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next
>
> Candidate 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.
--
James Morris
<jmorris@namei.org>
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-03-16 21:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-15 14:42 [PATCH] SELinux: Reduce max avtab size to avoid page allocation failures Stephen Smalley
2010-03-15 19:23 ` Eric Paris
2010-03-15 21:31 ` James Morris
2010-03-16 13:45 ` Stephen Smalley
2010-03-16 21:47 ` James Morris
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.