Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1621825

Re: [PATCH v2 2/3] fs: ubifs: update i_version on inode changes

From Oleksij Rempel <ore@pengutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/3] fs: ubifs: update i_version on inode changes
Date 2017-04-12 08:10 +0200
Message-ID <tvjDA-Xu-7@gated-at.bofh.it> (permalink)
References <tv0KC-5hT-13@gated-at.bofh.it> <tv0KD-5hT-35@gated-at.bofh.it> <tv6wG-NB-15@gated-at.bofh.it> <tvbmF-3WD-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Apr 11, 2017 at 11:13:24PM +0200, Richard Weinberger wrote:
> Am 11.04.2017 um 18:05 schrieb Christoph Hellwig:
> > On Tue, Apr 11, 2017 at 11:50:54AM +0200, Oleksij Rempel wrote:
> >> increment i_version to notify security/IMA about changes
> >> made in inode.
> >>
> >> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > 
> > And how is this stored on disk?
> > 
> 
> Hehe, I was about to ask the same question. :-)

No. it is not stored to fs.
Heh, the same question i asked my self. On linux-ima-user i found
this post (2009-07-23):
https://sourceforge.net/p/linux-ima/mailman/message/23152923/
---
When an inode entry is removed from dcache, the corresponding iint entry
is removed from the radix tree. Unmounting an fs will cause the inodes,
and by extension iint's, to be freed.  When the fs is remounted, any
file accessed will result in allocating a new iint structure with the
i_version set to 0.
---

The code seems to confirm it. So i assumed that IMA don't care if
i_version is stored to disk or not. And i_version is the only way
to notify IMA about inode changes.
Since IMA documentation explecitley set i_version as reqieremt, so this
option was provided as well.

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/3] make ubifs compatible with IMA and EVM. Oleksij Rempel <o.rempel@pengutronix.de> - 2017-04-11 12:00 +0200
  [PATCH v2 3/3] fs: ubifs: set s_uuid in super block Oleksij Rempel <o.rempel@pengutronix.de> - 2017-04-11 12:00 +0200
    Re: [PATCH v2 3/3] fs: ubifs: set s_uuid in super block Richard Weinberger <richard@nod.at> - 2017-04-11 22:50 +0200
      Re: [PATCH v2 3/3] fs: ubifs: set s_uuid in super block Christoph Hellwig <hch@infradead.org> - 2017-04-12 07:50 +0200
        Re: [PATCH v2 3/3] fs: ubifs: set s_uuid in super block Oleksij Rempel <ore@pengutronix.de> - 2017-04-12 09:20 +0200
          Re: [PATCH v2 3/3] fs: ubifs: set s_uuid in super block Richard Weinberger <richard@nod.at> - 2017-04-24 17:50 +0200
  [PATCH v2 2/3] fs: ubifs: update i_version on inode changes Oleksij Rempel <o.rempel@pengutronix.de> - 2017-04-11 12:00 +0200
    Re: [PATCH v2 2/3] fs: ubifs: update i_version on inode changes Christoph Hellwig <hch@infradead.org> - 2017-04-11 18:10 +0200
      Re: [PATCH v2 2/3] fs: ubifs: update i_version on inode changes Richard Weinberger <richard@nod.at> - 2017-04-11 23:20 +0200
        Re: [PATCH v2 2/3] fs: ubifs: update i_version on inode changes Oleksij Rempel <ore@pengutronix.de> - 2017-04-12 08:10 +0200
          Re: [PATCH v2 2/3] fs: ubifs: update i_version on inode changes Christoph Hellwig <hch@infradead.org> - 2017-04-12 08:10 +0200
            Re: [PATCH v2 2/3] fs: ubifs: update i_version on inode changes Oleksij Rempel <ore@pengutronix.de> - 2017-04-12 09:10 +0200
              Re: [PATCH v2 2/3] fs: ubifs: update i_version on inode changes Richard Weinberger <richard@nod.at> - 2017-04-24 17:50 +0200
  [PATCH v2 1/3] fs: ubifs: parse iversion mount option Oleksij Rempel <o.rempel@pengutronix.de> - 2017-04-11 12:00 +0200

csiph-web