Re: [PATCH 1/3] selinux: make dentry_init_security() return security module name

2018-06-26 Thread Yan, Zheng
> On Jun 26, 2018, at 21:28, Stephen Smalley wrote: > > On 06/26/2018 04:43 AM, Yan, Zheng wrote: >> This is preparation for CephFS security label. CephFS's implementation uses >> dentry_init_security() to get security context before inode is created, >> then sends open/mkdir/mknod request to

Re: [PATCH] python/semanage: Stop logging loginRecords changes

2018-06-26 Thread Stephen Smalley
On 06/18/2018 01:22 PM, Vit Mojzis wrote: > semanage_seuser_modify_local and semanage_seuser_del_local already do > the logging. > Moreover, semanage log for loginRecords.__add was flawed since it > reported old-{seuser,role,range} of default user instead of None. This > was caused by

Re: [PATCH 1/3] selinux: make dentry_init_security() return security module name

2018-06-26 Thread Stephen Smalley
On 06/26/2018 04:43 AM, Yan, Zheng wrote: > This is preparation for CephFS security label. CephFS's implementation uses > dentry_init_security() to get security context before inode is created, > then sends open/mkdir/mknod request to MDS, together with security xattr > "security." Can you

Re: [PATCH] selinux: move user accesses in selinuxfs out of locked regions

2018-06-26 Thread Stephen Smalley
On 06/26/2018 08:42 AM, Jann Horn wrote: > On Tue, Jun 26, 2018 at 2:15 PM Stephen Smalley wrote: >> >> On 06/25/2018 12:34 PM, Jann Horn wrote: >>> If a user is accessing a file in selinuxfs with a pointer to a userspace >>> buffer that is backed by e.g. a userfaultfd, the userspace access can

Re: [PATCH] selinux: move user accesses in selinuxfs out of locked regions

2018-06-26 Thread Jann Horn via Selinux
On Tue, Jun 26, 2018 at 2:15 PM Stephen Smalley wrote: > > On 06/25/2018 12:34 PM, Jann Horn wrote: > > If a user is accessing a file in selinuxfs with a pointer to a userspace > > buffer that is backed by e.g. a userfaultfd, the userspace access can > > stall indefinitely, which can block

Re: [PATCH] selinux: move user accesses in selinuxfs out of locked regions

2018-06-26 Thread Stephen Smalley
On 06/25/2018 12:34 PM, Jann Horn wrote: > If a user is accessing a file in selinuxfs with a pointer to a userspace > buffer that is backed by e.g. a userfaultfd, the userspace access can > stall indefinitely, which can block fsi->mutex if it is held. > > For sel_read_policy(), remove the

Re: [PATCH] selinux: move user accesses in selinuxfs out of locked regions

2018-06-26 Thread Jann Horn via Selinux
On Tue, Jun 26, 2018 at 12:36 AM Paul Moore wrote: > > On Mon, Jun 25, 2018 at 12:34 PM Jann Horn wrote: > > If a user is accessing a file in selinuxfs with a pointer to a userspace > > buffer that is backed by e.g. a userfaultfd, the userspace access can > > stall indefinitely, which can block