Received: by 10.223.176.46 with SMTP id f43csp828633wra; Fri, 19 Jan 2018 02:37:02 -0800 (PST) X-Google-Smtp-Source: ACJfBovx/KoEa97JHBudkxnMozqMV7T/Dc2tPgRn5V5KUiAsBdPsB7htS3jsH5I7hhAPUznWhGml X-Received: by 10.99.3.71 with SMTP id 68mr34679689pgd.334.1516358222884; Fri, 19 Jan 2018 02:37:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516358222; cv=none; d=google.com; s=arc-20160816; b=UtEPl7rM9KlQJ/q9ZuVEwqdVp3bQ9a0eSP+pFzJKU45ISnYvIizlS4pZELwxKvgF3s GRHtXUByrYahvklRm7hJSGU8u5m0l0QW59qNnPcqzvBgdhsImH8RxOY73+QT8OcxStzo cGocib18tawKbPc842A87DlussxbaomnpBmIQD6JACD8fdSaBr+H2UhvuRy0tuB8dTwy 41o1g51D/Amzg7OdCZCXvnVPxVcsE3RIk3LmaCz/L0KS4/+GmNZvKK/IjIgY7E8fWQUe lAPFm40BsLU4CMYQKQ0/ajO3OHdr9pH8xzLnql66qF61Cy5sLQECx42nSC1PgsmjlIgm mkVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=m/+pGkxe5D9HrLU5Jhhpi4n91eCyhmm/LFBdfbgvXTY=; b=BfsXZTpbTQhZ94DLgqiGJ5W1jql0F8v/fOB+DKhKxxcBH1IEUn8LvearqZjGZpHLHu EmlO+zi2iy6gvEwP6AZHCqW7P9kenN2N4VETCYAOKBmj45LgtuGL07uXRFZzge/Ldq9t KKc04LRNJE5AFoTZuH9cwDhtxYczHzXWpX5RiDla+Qc6BLc1wY5Ap4fzsxKV+/ufnQq9 yEHhX5UvnfGT733emARs3tykmylr/b9DtBXeuo4jnYEpUy0vISvwF2jFeNIsUqvV48a7 HsqWoFXye93QEN22Ppx/lJNpFOwxebSqo2Vgf+/9ZmqfxlZS9mk6p+6TIAH81HBkoLvW 15pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kinvolk.io header.s=google header.b=NcHqgwcL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1-v6si728079plb.622.2018.01.19.02.36.48; Fri, 19 Jan 2018 02:37:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kinvolk.io header.s=google header.b=NcHqgwcL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754699AbeASKgD (ORCPT + 99 others); Fri, 19 Jan 2018 05:36:03 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:46332 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751480AbeASKfw (ORCPT ); Fri, 19 Jan 2018 05:35:52 -0500 Received: by mail-pf0-f195.google.com with SMTP id y5so1041532pff.13 for ; Fri, 19 Jan 2018 02:35:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kinvolk.io; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=m/+pGkxe5D9HrLU5Jhhpi4n91eCyhmm/LFBdfbgvXTY=; b=NcHqgwcLaurGJkbsyMHeKv1BTWofUkw1l7j81qfWkpBwtk7+T0XjyD1QE6xOdBqXDh D6ctdpu2buAK9VBbubUN1Kz2QUfI1kqKnFW9kZdqE3qzTepARVt8AUyR3hulJZsFdf5M 7zcNmDLZCii0x7XWyFgbXvcW2DkQHRuREI9Hw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=m/+pGkxe5D9HrLU5Jhhpi4n91eCyhmm/LFBdfbgvXTY=; b=BGbyBdYkHMlCsOJYLp8HzTiXRSzfLuQ5bAoyXEMewtKHTUNXyFlD4Ft08VwxOGOzAS WSTDZXYjK4bY3+TGS3LiBmpmux7AFDHEiWOfMQ6I47vC0tw8a/1e3lx5pczobj9IH5J2 rZouNdjTDSLJsU7oJ8hxDjga09P5FpR9C1tkezoCfopVUtfFqvCBJnk/n4ZNoGuwof/t r6C+ycn0sKLTV7k1QJwJfBbGGjtyJiJ6DKCuQS9kJVEFIgovK1xf+/mUoqMUmNPDMXlg /HPbPRA6wfgYtIYOb4d92yGticafdL5OkWuA9V6/vl2zG70lJBYbvYa9Mq3jh68dT+Cz HNeQ== X-Gm-Message-State: AKGB3mKJDmXhJd4UppQ/V6TrFD3nLa0DPTiBE21tesdz49aYrh0u9+xM GeVKQ7wTrHy5uY6TpzOq69Fcx9WQwkRrfv0HCbp5RA== X-Received: by 10.99.65.133 with SMTP id o127mr37750400pga.13.1516358152186; Fri, 19 Jan 2018 02:35:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.100.169.12 with HTTP; Fri, 19 Jan 2018 02:35:51 -0800 (PST) In-Reply-To: <1516310702.3772.11.camel@linux.vnet.ibm.com> References: <20180116151000.443-1-alban@kinvolk.io> <1516310702.3772.11.camel@linux.vnet.ibm.com> From: Alban Crequy Date: Fri, 19 Jan 2018 11:35:51 +0100 Message-ID: Subject: Re: [RFC PATCH v2] ima,fuse: introduce new fs flag FS_NO_IMA_CACHE To: Mimi Zohar Cc: Alban Crequy , =?UTF-8?Q?Iago_L=C3=B3pez_Galeiras?= , Dongsu Park , LKML , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org, Miklos Szeredi , Alexander Viro , Dmitry Kasatkin , James Morris , "Serge E. Hallyn" , Seth Forshee , Christoph Hellwig Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 18, 2018 at 10:25 PM, Mimi Zohar wrote: > On Tue, 2018-01-16 at 16:10 +0100, Alban Crequy wrote: >> From: Alban Crequy >> >> This patch forces files to be re-measured, re-appraised and re-audited >> on file systems with the feature flag FS_NO_IMA_CACHE. In that way, >> cached integrity results won't be used. >> >> For now, this patch adds the new flag only FUSE filesystems. This is >> needed because the userspace FUSE process can change the underlying >> files at any time. > > Thanks, it's working nicely. > > >> diff --git a/include/linux/fs.h b/include/linux/fs.h >> index 511fbaabf624..2bd7e73ebc2a 100644 >> --- a/include/linux/fs.h >> +++ b/include/linux/fs.h >> @@ -2075,6 +2075,7 @@ struct file_system_type { >> #define FS_BINARY_MOUNTDATA 2 >> #define FS_HAS_SUBTYPE 4 >> #define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */ >> +#define FS_NO_IMA_CACHE 16 /* Force IMA to re-measure, re-appraise, re-audit files */ >> #define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */ >> struct dentry *(*mount) (struct file_system_type *, int, >> const char *, void *); >> > > Since IMA is going to need another flag, we probably should have a > consistent prefix (eg. "FS_IMA"). Maybe rename this flag to > FS_IMA_NO_CACHE. Ok, I can rename it. Is there a discussion about the other IMA flag? > I'm also wondering if this change should be > separated from the IMA change. Do you mean one patch for adding the flag and the IMA change and another patch for using the flag in FUSE? Thanks! Alban