From: "Venkat Yekkirala" <vyekkirala@trustedcs.com>
To: "'James Morris'" <jmorris@namei.org>,
"Herbert Xu" <herbert.xu@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>, <netdev@vger.kernel.org>,
"Paul Moore" <paul.moore@hp.com>
Subject: RE: [IPSEC] flow: Cache negative results
Date: Wed, 10 Jan 2007 11:41:07 -0600 [thread overview]
Message-ID: <001301c734de$8252b170$cc0a010a@tcssec.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0701100913050.8582@d.namei>
> > 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.
next prev parent reply other threads:[~2007-01-10 17:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-10 7:22 [IPSEC] flow: Cache negative results Herbert Xu
2007-01-10 9:24 ` David Miller
2007-01-10 14:15 ` James Morris
2007-01-10 15:26 ` Venkat Yekkirala
2007-01-10 17:41 ` Venkat Yekkirala [this message]
2007-01-10 20:49 ` Herbert Xu
2007-01-10 21:08 ` Venkat Yekkirala
2007-01-10 23:27 ` Herbert Xu
2007-01-11 6:06 ` David Miller
2007-01-11 11:29 ` Herbert Xu
2007-01-10 16:11 ` Paul Moore
2007-01-10 23:27 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001301c734de$8252b170$cc0a010a@tcssec.com' \
--to=vyekkirala@trustedcs.com \
--cc=davem@davemloft.net \
--cc=herbert.xu@redhat.com \
--cc=jmorris@namei.org \
--cc=netdev@vger.kernel.org \
--cc=paul.moore@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.