[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <001301c734de$8252b170$cc0a010a@tcssec.com>
Date: Wed, 10 Jan 2007 11:41:07 -0600
From: "Venkat Yekkirala" <vyekkirala@...stedcs.com>
To: "'James Morris'" <jmorris@...ei.org>,
"Herbert Xu" <herbert.xu@...hat.com>
Cc: "David S. Miller" <davem@...emloft.net>, <netdev@...r.kernel.org>,
"Paul Moore" <paul.moore@...com>
Subject: RE: [IPSEC] flow: Cache negative results
> > This patch causes security policy denials to be cached instead of
> > causing a relookup every time.
Only, on a security policy denial (-ESRCH from the LSM hook), a 0
is returned by the resolver to signify no applicable policy since
a negative result is akin to no policy. And I see the "no policy"
case is already cached.
I think what may have gotten us here is the comment:
if (err) {
/* Force security policy check on next
lookup */
*head = fle->next;
flow_entry_kill(cpu, fle);
} else {
But the error we would be looking at here would be a non-denial
related error (neither positive nor negative) that the security
server may have run into, in which case we would in fact want to
attempt a full-lookup again the next time.
<snip>
> > So if the security folks actually care about this, they'd need to
> > flush the flow cache whenever a relevant change is made to the
> > security database.
Sure. Will look into this.
> >
> > This patch also happens to fix a nasty bug where if an expiring
> > flow entry that's not at the head happens to trigger a security
> > denial, all entries before it are removed from the cache and
> > leaked.
I think just leaving the flow_entry as it is will take care of it.
IOW, no entry_killing nor messing with it's object/reference. This
should naturally cause us to invoke the resolver again the next time.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists