<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:03:18 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-13679] security.selinux xattr handling when SELinux is disabled</title>
                <link>https://jira.whamcloud.com/browse/LU-13679</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When SELinux is disabled, &quot;security.selinux&quot; does not have any special meaning.&lt;/p&gt;

&lt;p&gt;However,&lt;/p&gt;

&lt;p&gt;1) security.selinux is filtered out from the xattr cache even when SELinux is disabled&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
                } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!strcmp(xdata, &lt;span class=&quot;code-quote&quot;&gt;&quot;security.selinux&quot;&lt;/span&gt;)) {
                        &lt;span class=&quot;code-comment&quot;&gt;/* Filter out security.selinux, it is cached in slab */&lt;/span&gt;
                        CDEBUG(D_CACHE, &lt;span class=&quot;code-quote&quot;&gt;&quot;not caching security.selinux\n&quot;&lt;/span&gt;);
                        rc = 0;
                } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Lustre listxattr, as opposed to other Linux filesystems such as XFS, will not list &quot;security.selinux&quot;, getxattr will not return its value.&lt;/p&gt;

&lt;p&gt;2) security.selinux is not allowed to be modified or removed when SELinux is disabled&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
        &lt;span class=&quot;code-comment&quot;&gt;/* LU-549:  Disable security.selinux when selinux is disabled */&lt;/span&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (xattr_type == XATTR_SECURITY_T &amp;amp;&amp;amp; !selinux_is_enabled() &amp;amp;&amp;amp;
            strcmp(name, &lt;span class=&quot;code-quote&quot;&gt;&quot;security.selinux&quot;&lt;/span&gt;) == 0)
                RETURN(-EOPNOTSUPP);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This looks like a very old optimization of a case which is not completely clear to me. Under what circumstances would anyone modify security.selinux without SELinux enabled? Is it some sort of untar? If so, then is it correct to return EOPNOTSUPP instead of applying the xattr?&lt;/p&gt;

&lt;p&gt;Either way, without SELinux enabled, XFS allows security.selinux removal.&lt;/p&gt;</description>
                <environment></environment>
        <key id="59572">LU-13679</key>
            <summary>security.selinux xattr handling when SELinux is disabled</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="panda">Andrew Perepechko</reporter>
                        <labels>
                    </labels>
                <created>Mon, 15 Jun 2020 18:08:40 +0000</created>
                <updated>Mon, 15 Jun 2020 21:31:28 +0000</updated>
                                            <version>Lustre 2.12.5</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="272925" author="adilger" created="Mon, 15 Jun 2020 21:31:28 +0000"  >&lt;p&gt;Probably some searching in the Git history for this code would reveal details of the patch that committed this, and the LU or Bugzilla tickets around it.  My recollection is that this was a performance optimization from before xattr cache, to avoid a useless RPC for every file to fetch the non-existent xattr when SELinux was not enabled.  If we don&apos;t see an extra RPC today because the &lt;tt&gt;security.selinux&lt;/tt&gt; xattr (or lack thereof) is cached on the client, then it seems time to remove this optimization.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </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_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i012r3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

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