[LU-10130] mkdir returns -95 EOPNOTSUPP with 2.10.1 on sles 12 sp3 with CONFIG_SECURITY disabled Created: 17/Oct/17  Updated: 18/Oct/17  Resolved: 18/Oct/17

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.10.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Chris Horn Assignee: Sebastien Buisson (Inactive)
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates LU-9578 having security_dentry_init_security ... Resolved
Related
is related to LU-8956 Improve create performance with SELin... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

A call to security_inode_notifysecctx() on a node running SLES 12 SP3 where CONFIG_SECURITY is disabled returns -95 (EOPNOTSUPP), but a call to that function on a node running SLES 12 SP3 where CONFIG_SECURITY is enabled does not error.

SLES 12 SP3 - CONFIG_SECURITY disabled:

# mkdir testdir
mkdir: cannot create directory ‘testdir’: Operation not supported
#

SLES 12 SP3 - CONFIG_SECURITY enabled:

# mkdir testdir
#

Lustre 2.10 commit 1d44980bcbd10f35b522acc4543a44dcea62eb72 (https://review.whamcloud.com/24426) introduced the problematic code.



 Comments   
Comment by Andreas Dilger [ 18/Oct/17 ]

Sebastien, it looks like this was your patch "LU-8956 llite: set sec ctx on client's inode at create time"?

Comment by Chris Horn [ 18/Oct/17 ]

Looks like there's an assumption that HAVE_SECURITY_DENTRY_INIT_SECURITY implies that the kernel was configured with CONFIG_SECURITY=y.

#ifdef HAVE_SECURITY_DENTRY_INIT_SECURITY
        data->ocd_connect_flags2 |= OBD_CONNECT2_FILE_SECCTX;
#endif /* HAVE_SECURITY_DENTRY_INIT_SECURITY */

So maybe we just need to add an #if defined(CONFIG_SECURITY) there?

Comment by Sebastien Buisson (Inactive) [ 18/Oct/17 ]

Hi,

This reminds me of LU-9578. Now we know the exact reason for the problem, thanks Chris.
I have rebased patch at https://review.whamcloud.com/27364. I think this ticket can be marked as duplicate of LU-9578.

Thanks,
Sebastien.

Comment by Peter Jones [ 18/Oct/17 ]

Thank you both. Chris, please confirm whether the fix from LU-9578 works in your tests

Comment by Chris Horn [ 18/Oct/17 ]

Thank you both. Chris, please confirm whether the fix from LU-9578 works in your tests

Confirmed

Comment by Peter Jones [ 18/Oct/17 ]

Thanks Chris

Generated at Sat Feb 10 02:32:19 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.