)]}'
{
  "commit": "90c675b10c5a1ab04fe33ceeb79cd68c8267de2f",
  "tree": "1f389501af6ff3c6a931a0b1d518873bafcf54dc",
  "parents": [
    "0a3250f57abd53a8bbd6b0ffb9bc5133334936d0"
  ],
  "author": {
    "name": "Christoph Hellwig",
    "email": "hch@lst.de",
    "time": "Wed May 10 08:45:07 2017 +0200"
  },
  "committer": {
    "name": "Mimi Zohar",
    "email": "zohar@linux.vnet.ibm.com",
    "time": "Tue Sep 26 14:21:18 2017 -0400"
  },
  "message": "ima: use fs method to read integrity data\n\nWriting extended attributes requires exclusively taking the i_rwsem\nlock.  To synchronize the file hash calculation and writing the file\nhash as security.ima xattr, IMA-appraisal takes the i_rwsem lock\nexclusively before calculating the file hash.  (Once the file hash\nis calculated, the result is cached.  Taking the lock exclusively\nprevents calculating the file hash multiple times.)\n\nSome filesystems have recently replaced their filesystem dependent\nlock with the global i_rwsem to read a file.  As a result, when IMA\nattempts to calculate the file hash, reading the file attempts to\ntake the i_rwsem again.\n\nTo resolve this locking problem, this patch defines a new\n-\u003eintegrity_read file operation method, which is equivalent to\n-\u003eread_iter, except that it will not take the i_rwsem lock, but will\nbe called with the i_rwsem held exclusively.\n\nSince taking the i_rwsem exclusively is not required for reading the\nfile in order to calculate the file hash, the code only verifies\nthat the lock has been taken.\n\n(Based on Christoph\u0027s original patch.)\n\nSigned-off-by: Christoph Hellwig \u003chch@lst.de\u003e\nCc: Matthew Garrett \u003cmjg59@srcf.ucam.org\u003e\nCc: Jan Kara \u003cjack@suse.com\u003e\nCc: \"Theodore Ts\u0027o\" \u003ctytso@mit.edu\u003e\nCc: Andreas Dilger \u003cadilger.kernel@dilger.ca\u003e\nCc: Jaegeuk Kim \u003cjaegeuk@kernel.org\u003e\nCc: Chao Yu \u003cyuchao0@huawei.com\u003e\nCc: Steven Whitehouse \u003cswhiteho@redhat.com\u003e\nCc: Bob Peterson \u003crpeterso@redhat.com\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nCc: Dave Kleikamp \u003cshaggy@kernel.org\u003e\nCc: Ryusuke Konishi \u003ckonishi.ryusuke@lab.ntt.co.jp\u003e\nCc: Mark Fasheh \u003cmfasheh@versity.com\u003e\nCc: Joel Becker \u003cjlbec@evilplan.org\u003e\nCc: Richard Weinberger \u003crichard@nod.at\u003e\nCc: \"Darrick J. Wong\" \u003cdarrick.wong@oracle.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Chris Mason \u003cclm@fb.com\u003e\n\nFixes: Commit 6552321831dc \"xfs: remove i_iolock and use i_rwsem in\nthe VFS inode instead\"\nSigned-off-by: Mimi Zohar \u003czohar@linux.vnet.ibm.com\u003e\nReviewed-by: Jan Kara \u003cjack@suse.cz\u003e\nReviewed-by: Dmitry Kasatkin \u003cdmitry.kasatkin@huawei.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "aafcc785f8408c1714e159ed68e3f0f57847ae2e",
      "old_mode": 33188,
      "old_path": "fs/btrfs/file.c",
      "new_id": "2550adf0f603053e66a43e82504b1cf691289cff",
      "new_mode": 33188,
      "new_path": "fs/btrfs/file.c"
    },
    {
      "type": "modify",
      "old_id": "863f1b10016567a796522132bf3ebffc2b09f84a",
      "old_mode": 33188,
      "old_path": "fs/efivarfs/file.c",
      "new_id": "17955a92a5b3267f5fe89f6b58e29267d7d1da49",
      "new_mode": 33188,
      "new_path": "fs/efivarfs/file.c"
    },
    {
      "type": "modify",
      "old_id": "ff3a3636a5cab588fb05f0644e1892ce6e236c6f",
      "old_mode": 33188,
      "old_path": "fs/ext2/file.c",
      "new_id": "c77e43bf9c7f14a6e0d634633fd2c04e5ba51cc9",
      "new_mode": 33188,
      "new_path": "fs/ext2/file.c"
    },
    {
      "type": "modify",
      "old_id": "b1da660ac3bcf97c8cd799fcc6823a23666c8ea5",
      "old_mode": 33188,
      "old_path": "fs/ext4/file.c",
      "new_id": "22353b79c38a6d0b511bb166953937f8b6632657",
      "new_mode": 33188,
      "new_path": "fs/ext4/file.c"
    },
    {
      "type": "modify",
      "old_id": "517e112c8a9a943467492435c9f15c1668e079a8",
      "old_mode": 33188,
      "old_path": "fs/f2fs/file.c",
      "new_id": "70c67618465b5b3c7ede32f8a9b1f8209f829a6b",
      "new_mode": 33188,
      "new_path": "fs/f2fs/file.c"
    },
    {
      "type": "modify",
      "old_id": "bd0428bebe9b7787089135ddc4094800f86882a0",
      "old_mode": 33188,
      "old_path": "fs/jffs2/file.c",
      "new_id": "58390f2ffeb52dac921c4007362bec8fdcdc3b6f",
      "new_mode": 33188,
      "new_path": "fs/jffs2/file.c"
    },
    {
      "type": "modify",
      "old_id": "36665fd37095ede8da84292e245d4265cf52aabc",
      "old_mode": 33188,
      "old_path": "fs/jfs/file.c",
      "new_id": "c9a81887664f41ee444eae4a066d371cbcec7348",
      "new_mode": 33188,
      "new_path": "fs/jfs/file.c"
    },
    {
      "type": "modify",
      "old_id": "c5fa3dee72fc0b962dec9d3134d8c0d723422134",
      "old_mode": 33188,
      "old_path": "fs/nilfs2/file.c",
      "new_id": "55e058ac487f07297d2bd0208475dccf185e281b",
      "new_mode": 33188,
      "new_path": "fs/nilfs2/file.c"
    },
    {
      "type": "modify",
      "old_id": "12af0490322f9d8d5354258c35f8fe4a4762c9d9",
      "old_mode": 33188,
      "old_path": "fs/ramfs/file-mmu.c",
      "new_id": "4f24d1b589b14a199a8e6f60c0f091de2d0098a4",
      "new_mode": 33188,
      "new_path": "fs/ramfs/file-mmu.c"
    },
    {
      "type": "modify",
      "old_id": "3ac1f23870837a8d5ab0b98338c997aabf4523a1",
      "old_mode": 33188,
      "old_path": "fs/ramfs/file-nommu.c",
      "new_id": "6f42a1a20051abfc3ebc8479fc3f458e0b25bfad",
      "new_mode": 33188,
      "new_path": "fs/ramfs/file-nommu.c"
    },
    {
      "type": "modify",
      "old_id": "a02aa59d1e245124dcead693b15cd128fa2b1f4e",
      "old_mode": 33188,
      "old_path": "fs/ubifs/file.c",
      "new_id": "d2cf55b2edb98d056c557fdc416f65868d329bb4",
      "new_mode": 33188,
      "new_path": "fs/ubifs/file.c"
    },
    {
      "type": "modify",
      "old_id": "ebdd0bd2b2616a7e9052b4da8378721b144dc0af",
      "old_mode": 33188,
      "old_path": "fs/xfs/xfs_file.c",
      "new_id": "53e30fe2e29203705db749a3ca278480c54cf1d7",
      "new_mode": 33188,
      "new_path": "fs/xfs/xfs_file.c"
    },
    {
      "type": "modify",
      "old_id": "a23720787f739563a56cc6f8c07ddf81be50903c",
      "old_mode": 33188,
      "old_path": "include/linux/fs.h",
      "new_id": "84d84eb9b71222446d437a497c2046a2c36a8baa",
      "new_mode": 33188,
      "new_path": "include/linux/fs.h"
    },
    {
      "type": "modify",
      "old_id": "07a1d22807beb7cfb5f85c3343a5eacdc28fb523",
      "old_mode": 33188,
      "old_path": "mm/shmem.c",
      "new_id": "c57628000927ed0f447b274f0b59ad81f6146550",
      "new_mode": 33188,
      "new_path": "mm/shmem.c"
    },
    {
      "type": "modify",
      "old_id": "c84e05866052a068e99b4f30236764e531c38896",
      "old_mode": 33188,
      "old_path": "security/integrity/iint.c",
      "new_id": "c3a07276f7452b6016fe74c29bad2145cc6ce8ee",
      "new_mode": 33188,
      "new_path": "security/integrity/iint.c"
    }
  ]
}
