Re: [v9.1] sepgsql - userspace access vector cache

From: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
To: Yeb Havinga <yebhavinga(at)gmail(dot)com>
Cc: Kohei Kaigai <Kohei(dot)Kaigai(at)emea(dot)nec(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PgHacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [v9.1] sepgsql - userspace access vector cache
Date: 2011-07-22 12:08:40
Message-ID: CADyhKSXkvpjXUdEFU_yuZKdzSELLbW54ypg6qVuxc-w+s6TVtw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2011/7/22 Yeb Havinga <yebhavinga(at)gmail(dot)com>:
> On 2011-07-22 11:55, Kohei Kaigai wrote:
>>
>>> 2) Also I thought if it could work to not remember tcontext is valid, but
>>> instead remember the consequence,
>>> which is that it is replaced by "unlabeled". It makes the avc_cache
>>> struct shorter and the code somewhat
>>> simpler.
>>>
>> Here is a reason why we hold tcontext, even if it is not valid.
>> The hash key of avc_cache is combination of scontext, tcontext and tclass.
>> Thus, if we replaced an invalid
>> tcontext by unlabeled context, it would always make cache mishit and
>> performance loss.
>
> I see that now, thanks.
>
> I have no further comments, and I think that the patch in it's current
> status is ready for committer.
>
Thanks for your reviewing.

The attached patch is a revised one according to your suggestion to
include fallback for 'unlabeled' label within sepgsql_avc_lookup().
And I found a noise in regression test results, so eliminated it from v5.
--
KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>

Attachment Content-Type Size
pgsql-v9.2-uavc-selinux.v6.patch text/x-patch 35.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Albe Laurenz 2011-07-22 12:09:35 Re: Questions and experiences writing a Foreign Data Wrapper
Previous Message Yeb Havinga 2011-07-22 10:11:52 Re: [v9.1] sepgsql - userspace access vector cache