Research Menu

.
Skip Search Box

SELinux Mailing List

Re: [PATCH] security/selinux/netif.c has a serious problem

From: Kaigai Kohei <kaigai_at_ak.jp.nec.com>
Date: Thu, 7 Oct 2004 11:27:40 +0900


Good morning.

James Morris wrote:
> > - Updating the sel_netif_hash table is protected by spinlock_irqsave().
> > This method is same as my RCU-patch.
>
> Why use irqsave? This code is never contended from irq context.

Hmm, I worried about using spinlock() without _irqsave(), since I faced to the another problem as you know. Your notice is right.

> > # And, I wondered if 'sel_netif_total' is really necessary.
>
> This prevents the cache from growing without bounds.

But a result of sel_netif_insert() was not checked in the original code. It's assumed the number of 'netif' is less than SEL_NETIF_HASH_MAX. And, Its upper limitation is the number of the real network interfaces. Why do you think the cache may grow without bounds?

Thanks.



Kai Gai <kaigai@ak.jp.nec.com>
--
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.
Received on Wed 6 Oct 2004 - 22:27:24 EDT
 

Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009

 
bottom

National Security Agency / Central Security Service