<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:52:32 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-5560] SELinux support on the client side</title>
                <link>https://jira.whamcloud.com/browse/LU-5560</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The aim is to be able to enforce SELinux security policies on Lustre from SELinux-enabled clients.&lt;/p&gt;

&lt;p&gt;It requires to properly initiate file security context on client side, and store it on server side via extended attribute.&lt;/p&gt;</description>
                <environment></environment>
        <key id="26231">LU-5560</key>
            <summary>SELinux support on the client side</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="green">Oleg Drokin</assignee>
                                    <reporter username="sbuisson">Sebastien Buisson</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Fri, 29 Aug 2014 13:02:42 +0000</created>
                <updated>Thu, 8 Dec 2016 20:33:15 +0000</updated>
                            <resolved>Wed, 27 Jul 2016 22:01:34 +0000</resolved>
                                                    <fixVersion>Lustre 2.8.0</fixVersion>
                    <fixVersion>Lustre 2.9.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>23</watches>
                                                                            <comments>
                            <comment id="92796" author="sebastien.buisson" created="Fri, 29 Aug 2014 13:04:34 +0000"  >&lt;p&gt;As a first implementation, I added a call to a new function ll_init_security() after the calls to d_instantiate() in ll_create_it() and ll_new_node(). This new function retrieves security context via security_inode_init_security(), and stores it in extended attribute in MDT with ll_setxattr().&lt;/p&gt;

&lt;p&gt;To ensure security context coherency between clients, this basic implementation does not cache inodes at all. This is why I created a new function ll_drop_inode(), and also modified ll_ddelete() to always return 1 when SELinux is enabled.&lt;/p&gt;

&lt;p&gt;Of course this first, basic implementation severely hurts metadata performance because of the inode cache drop.&lt;/p&gt;

&lt;p&gt;I uploaded the patch here:&lt;br/&gt;
&lt;a href=&quot;http://review.whamcloud.com/11648&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/11648&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="92797" author="sebastien.buisson" created="Fri, 29 Aug 2014 13:05:15 +0000"  >&lt;p&gt;Ideally, to ensure security context coherency between clients, a new lock (let&apos;s call it MDS_INODELOCK_SECURITY) should be used to synchronize updates:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;take MDS_INODELOCK_SECURITY lock at setxattr time if SELinux is enabled and xattr is security.selinux (this also requires modifying mdc_enqueue() to ask for MDS_INODELOCK_SECURITY if it is called with IT_SETXATTR);&lt;/li&gt;
	&lt;li&gt;when asked to release MDS_INODELOCK_SECURITY lock in ll_md_blocking_ast(), delete inode with a call to generic_delete_inode(), so that further access to the inode will retrieve fresh security context.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;My problem is the Lustre code is too complicated, I am not able to do what I described here. Could you help with the part taking the new MDS_INODELOCK_SECURITY lock at setxattr time?&lt;/p&gt;</comment>
                            <comment id="92939" author="bfaccini" created="Mon, 1 Sep 2014 21:18:17 +0000"  >&lt;p&gt;Hello Seb, this looks like a non-trivial task!&lt;br/&gt;
Are there any paper/notes to describe all the situations that will need to be handled ?&lt;/p&gt;</comment>
                            <comment id="92952" author="sebastien.buisson" created="Tue, 2 Sep 2014 12:48:24 +0000"  >&lt;p&gt;Hi Bruno,&lt;/p&gt;

&lt;p&gt;What do you think of the suggestion from Andrew Perepechko in &lt;a href=&quot;http://review.whamcloud.com/11648&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/11648&lt;/a&gt; to modify MDS behavior so that we cancel lookup lock in case of change on &apos;security.selinux&quot; xattr?&lt;/p&gt;

&lt;p&gt;Can we exchange by IRC on #lustre for instance (sorry, no Skype available for me).&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Sebastien.&lt;/p&gt;</comment>
                            <comment id="92990" author="pjones" created="Tue, 2 Sep 2014 17:40:16 +0000"  >&lt;p&gt;Oleg is looking into this&lt;/p&gt;</comment>
                            <comment id="93047" author="adilger" created="Tue, 2 Sep 2014 21:43:39 +0000"  >&lt;p&gt;Sebastien, do we need a separate lock bit for SELinux? We already have client-side xattr cache introduced in 2.5 that should result in the client-side xattr cache being cleaned if the selinux xattr is changed.&lt;/p&gt;</comment>
                            <comment id="93088" author="sebastien.buisson" created="Wed, 3 Sep 2014 07:19:40 +0000"  >&lt;p&gt;The xattr cache is only filled in case of getxattr, not setxattr. So the MDS_INODELOCK_XATTR lock is not hold by a client creating a file with SELinux attributes. Then if another client modifies the SELinux attributes, it will not lead to any action on the client that initially created the file.&lt;/p&gt;

&lt;p&gt;Moreover, security context is stored in (struct inode*)-&amp;gt;i_security besides its representation as an xattr in the Lustre/ldiskfs case. So in case of SELinux attributes modification by another client, the action required on the client that initially created the file would be to call delete_inode(), in order to force a new lookup of the inode. This could be overkill, maybe there is another mechanism already available in Lustre to force lookup without having to delete the inode.&lt;/p&gt;</comment>
                            <comment id="95628" author="sebastien.buisson" created="Fri, 3 Oct 2014 14:32:12 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;In order to make things easier, and because the coherency need comes from a very special use case, I have decided to tackle it separately.&lt;br/&gt;
This is why I have pushed a new patch that stores security information permanently, and filters out security.selinux xattr from xattr cache (because security information is already in system slab cache).&lt;br/&gt;
Please see:&lt;br/&gt;
&lt;a href=&quot;http://review.whamcloud.com/11648&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/11648&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sebastien.&lt;/p&gt;</comment>
                            <comment id="99461" author="wangshilong" created="Tue, 18 Nov 2014 06:27:34 +0000"  >&lt;p&gt;Hello Sebastien Buisson,&lt;/p&gt;

&lt;p&gt;Could you please tell me how do you mount lustre client under enforcing mode with this patch?&lt;br/&gt;
btw, do you have some selinux testsuite to verify this patch works? &lt;/p&gt;

&lt;p&gt;Best Regards,&lt;br/&gt;
Wang Shilong&lt;/p&gt;</comment>
                            <comment id="99462" author="sebastien.buisson" created="Tue, 18 Nov 2014 06:58:02 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;There is no mount option required. As soon as SELinux is enforced on the client node, it will be taken into account at the Lustre level.&lt;br/&gt;
I do not have specific testsuite for this patch for now.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Sebastien.&lt;/p&gt;</comment>
                            <comment id="119888" author="gerrit" created="Mon, 29 Jun 2015 22:35:48 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/11648/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/11648/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5560&quot; title=&quot;SELinux support on the client side&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5560&quot;&gt;&lt;del&gt;LU-5560&lt;/del&gt;&lt;/a&gt; llite: basic support of SELinux in CLIO&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 8a11cb6282cfbdc8617b809344e6a11223e86a38&lt;/p&gt;</comment>
                            <comment id="122111" author="sebastien.buisson" created="Fri, 24 Jul 2015 13:40:44 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Please find attached the proposed Test Plan for SELinux support on the client side.&lt;/p&gt;

&lt;p&gt;Sebastien.&lt;/p&gt;</comment>
                            <comment id="122853" author="gerrit" created="Fri, 31 Jul 2015 14:27:25 +0000"  >&lt;p&gt;Sebastien Buisson (sebastien.buisson@bull.net) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/15818&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/15818&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5560&quot; title=&quot;SELinux support on the client side&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5560&quot;&gt;&lt;del&gt;LU-5560&lt;/del&gt;&lt;/a&gt; tests: add sanity-selinux.sh&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 38ed4c38796c1903f4cfd553d886f7fbaebba972&lt;/p&gt;</comment>
                            <comment id="122854" author="sebastien.buisson" created="Fri, 31 Jul 2015 14:29:16 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Here is an updated Test Plan for SELinux support on the client side, including functional tests.&lt;/p&gt;

&lt;p&gt;Sebastien.&lt;/p&gt;</comment>
                            <comment id="123571" author="sebastien.buisson" created="Fri, 7 Aug 2015 11:12:24 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Here is an updated Test Plan for SELinux support on the client side, including remarks from Andrew Perepechko.&lt;/p&gt;

&lt;p&gt;Sebastien.&lt;/p&gt;</comment>
                            <comment id="129358" author="sarah" created="Mon, 5 Oct 2015 19:18:20 +0000"  >&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;For the upgrade/downgrade testing of this feature, how would you like the test be implemented?  Is there any specific requirement?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Sarah&lt;/p&gt;</comment>
                            <comment id="145819" author="jgmitter" created="Wed, 16 Mar 2016 17:16:43 +0000"  >&lt;p&gt;This work has landed for the 2.8.0 release in patch &lt;a href=&quot;http://review.whamcloud.com/#/c/11648/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/11648/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="146804" author="jamesanunez" created="Thu, 24 Mar 2016 16:20:36 +0000"  >&lt;p&gt;Reopening ticket because the patch containing the SELinux test suite never landed; &lt;a href=&quot;http://review.whamcloud.com/#/c/15818&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/15818&lt;/a&gt;. &lt;/p&gt;</comment>
                            <comment id="155618" author="gerrit" created="Tue, 14 Jun 2016 03:53:52 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/19970/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/19970/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5560&quot; title=&quot;SELinux support on the client side&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5560&quot;&gt;&lt;del&gt;LU-5560&lt;/del&gt;&lt;/a&gt; obd: reserve connection flag OBD_CONNECT2_FILE_SECCTX&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: a06b32d1c49eb6c31aeba556795841730de37006&lt;/p&gt;</comment>
                            <comment id="158839" author="gerrit" created="Thu, 14 Jul 2016 16:07:39 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/15818/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/15818/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5560&quot; title=&quot;SELinux support on the client side&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5560&quot;&gt;&lt;del&gt;LU-5560&lt;/del&gt;&lt;/a&gt; tests: add sanity-selinux.sh&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: bfca8338e5f2ae1b7c16cc1d0c2376523d68685e&lt;/p&gt;</comment>
                            <comment id="160145" author="pjones" created="Wed, 27 Jul 2016 22:01:34 +0000"  >&lt;p&gt;Reclosing as the test script landed. Sebastien, you should open a new ticket to track the atomic context transfer during create patch also still in flight - &lt;a href=&quot;http://review.whamcloud.com/#/c/19971/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/19971/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="161549" author="gerrit" created="Thu, 11 Aug 2016 05:50:57 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/19971/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/19971/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5560&quot; title=&quot;SELinux support on the client side&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5560&quot;&gt;&lt;del&gt;LU-5560&lt;/del&gt;&lt;/a&gt; security: send file security context for creates&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 4ea24bdabb2b318721605bd185c32bbc1e9bc924&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10120">
                    <name>Blocker</name>
                                                                <inwardlinks description="is blocked by">
                                        <issuelink>
            <issuekey id="30885">LU-6784</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="36327">LUDOC-335</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="40211">LU-8654</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="42323">LU-9193</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="31339">LU-6950</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="33088">LU-7417</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="18593" name="selinux_test_plan_v3.pdf" size="96605" author="sebastien.buisson" created="Fri, 7 Aug 2015 11:12:24 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10490" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>End date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 22 Apr 2016 13:02:42 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzwuxr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>15510</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10493" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>Start date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 29 Aug 2014 13:02:42 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>