From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out02.mta.xmission.com ([166.70.13.232]:59682 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750981AbdJAWGf (ORCPT ); Sun, 1 Oct 2017 18:06:35 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Linus Torvalds Cc: Dave Chinner , LSM List , linux-fsdevel , Mimi Zohar , Christoph Hellwig , "Theodore Ts'o" , Jan Kara , Linux Kernel Mailing List , linux-integrity@vger.kernel.org References: <1506602373-4799-1-git-send-email-zohar@linux.vnet.ibm.com> <1506602373-4799-4-git-send-email-zohar@linux.vnet.ibm.com> <20170928220215.GC15067@dastard> <1506643967.5691.46.camel@linux.vnet.ibm.com> <1506649980.5691.100.camel@linux.vnet.ibm.com> <87mv5blki7.fsf@xmission.com> Date: Sun, 01 Oct 2017 17:06:16 -0500 In-Reply-To: (Linus Torvalds's message of "Sat, 30 Sep 2017 18:56:59 -0700") Message-ID: <87shf2jzfr.fsf@xmission.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [RFC PATCH 3/3] fs: detect that the i_rwsem has already been taken exclusively Sender: linux-integrity-owner@vger.kernel.org List-ID: Linus Torvalds writes: > On Sep 30, 2017 18:33, "Eric W. Biederman" wrote:. > > That would require a task_work or another kind of work callback so that > the writes of the xattr are not synchronous with the vfs callback > correct? > > No, why? > > You should just invalidate the IMA on xattr write or other operations that make the measurement invalid. You only need the inner > lock. > > Why are you guys making up all these things just to make it complicated? I am not trying to make things complicated I am just trying to understand the conversation. Unless I misread something it was being pointed out there are some vfs operations today on which ima writes an ima xattr as a side effect. And those operations hold the i_sem. So perhaps I am misunderstanding things or writing the ima xattr needs to happen at some point. Which implies something like queued work. But perhaps I a misunderstanding the conversation and ima. I frequenly misunderstand ima. Eric From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Date: Sun, 01 Oct 2017 17:06:16 -0500 Subject: [RFC PATCH 3/3] fs: detect that the i_rwsem has already been taken exclusively In-Reply-To: (Linus Torvalds's message of "Sat, 30 Sep 2017 18:56:59 -0700") References: <1506602373-4799-1-git-send-email-zohar@linux.vnet.ibm.com> <1506602373-4799-4-git-send-email-zohar@linux.vnet.ibm.com> <20170928220215.GC15067@dastard> <1506643967.5691.46.camel@linux.vnet.ibm.com> <1506649980.5691.100.camel@linux.vnet.ibm.com> <87mv5blki7.fsf@xmission.com> Message-ID: <87shf2jzfr.fsf@xmission.com> To: linux-security-module@vger.kernel.org List-Id: linux-security-module.vger.kernel.org Linus Torvalds writes: > On Sep 30, 2017 18:33, "Eric W. Biederman" wrote:. > > That would require a task_work or another kind of work callback so that > the writes of the xattr are not synchronous with the vfs callback > correct? > > No, why? > > You should just invalidate the IMA on xattr write or other operations that make the measurement invalid. You only need the inner > lock. > > Why are you guys making up all these things just to make it complicated? I am not trying to make things complicated I am just trying to understand the conversation. Unless I misread something it was being pointed out there are some vfs operations today on which ima writes an ima xattr as a side effect. And those operations hold the i_sem. So perhaps I am misunderstanding things or writing the ima xattr needs to happen at some point. Which implies something like queued work. But perhaps I a misunderstanding the conversation and ima. I frequenly misunderstand ima. Eric -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html