From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751935AbdJAWGi (ORCPT ); Sun, 1 Oct 2017 18:06:38 -0400 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> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1dymNW-0006ex-CQ;;;mid=<87shf2jzfr.fsf@xmission.com>;;;hst=in02.mta.xmission.com;;;ip=67.3.200.44;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX19XU78O/ItB5/0EqmBNx1CAm+jKUM59LxU= X-SA-Exim-Connect-IP: 67.3.200.44 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.7 XMSubLong Long Subject * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4891] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa02 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa02 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;Linus Torvalds X-Spam-Relay-Country: X-Spam-Timing: total 5703 ms - load_scoreonly_sql: 0.06 (0.0%), signal_user_changed: 3.5 (0.1%), b_tie_ro: 2.2 (0.0%), parse: 1.22 (0.0%), extract_message_metadata: 30 (0.5%), get_uri_detail_list: 1.76 (0.0%), tests_pri_-1000: 13 (0.2%), tests_pri_-950: 2.4 (0.0%), tests_pri_-900: 1.83 (0.0%), tests_pri_-400: 27 (0.5%), check_bayes: 25 (0.4%), b_tokenize: 10 (0.2%), b_tok_get_all: 6 (0.1%), b_comp_prob: 3.3 (0.1%), b_tok_touch_all: 2.5 (0.0%), b_finish: 0.79 (0.0%), tests_pri_0: 513 (9.0%), check_dkim_signature: 2.4 (0.0%), check_dkim_adsp: 8 (0.1%), tests_pri_500: 5105 (89.5%), poll_dns_idle: 5093 (89.3%), rewrite_mail: 0.00 (0.0%) Subject: Re: [RFC PATCH 3/3] fs: detect that the i_rwsem has already been taken exclusively X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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