)]}'
{
  "commit": "931e80e4b3263db75c8e34f078d22f11bbabd3a3",
  "tree": "47c735f039d2c8623a1fc4d20333a9899ac8e99c",
  "parents": [
    "bc173f7092c76a7967f135c2b3a54052ad99733b"
  ],
  "author": {
    "name": "anfei zhou",
    "email": "anfei.zhou@gmail.com",
    "time": "Tue Feb 02 13:44:02 2010 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Tue Feb 02 18:11:21 2010 -0800"
  },
  "message": "mm: flush dcache before writing into page to avoid alias\n\nThe cache alias problem will happen if the changes of user shared mapping\nis not flushed before copying, then user and kernel mapping may be mapped\ninto two different cache line, it is impossible to guarantee the coherence\nafter iov_iter_copy_from_user_atomic.  So the right steps should be:\n\n\tflush_dcache_page(page);\n\tkmap_atomic(page);\n\twrite to page;\n\tkunmap_atomic(page);\n\tflush_dcache_page(page);\n\nMore precisely, we might create two new APIs flush_dcache_user_page and\nflush_dcache_kern_page to replace the two flush_dcache_page accordingly.\n\nHere is a snippet tested on omap2430 with VIPT cache, and I think it is\nnot ARM-specific:\n\n\tint val \u003d 0x11111111;\n\tfd \u003d open(\"abc\", O_RDWR);\n\taddr \u003d mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);\n\t*(addr+0) \u003d 0x44444444;\n\ttmp \u003d *(addr+0);\n\t*(addr+1) \u003d 0x77777777;\n\twrite(fd, \u0026val, sizeof(int));\n\tclose(fd);\n\nThe results are not always 0x11111111 0x77777777 at the beginning as expected.  Sometimes we see 0x44444444 0x77777777.\n\nSigned-off-by: Anfei \u003canfei.zhou@gmail.com\u003e\nCc: Russell King \u003crmk@arm.linux.org.uk\u003e\nCc: Miklos Szeredi \u003cmiklos@szeredi.hu\u003e\nCc: Nick Piggin \u003cnickpiggin@yahoo.com.au\u003e\nCc: \u003clinux-arch@vger.kernel.org\u003e\nCc: \u003cstable@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c18913a777ae3865148c9bbd679d0c09ff092f4f",
      "old_mode": 33188,
      "old_path": "fs/fuse/file.c",
      "new_id": "a9f5e137f1d31547f86bbfdb87df11c07daf963f",
      "new_mode": 33188,
      "new_path": "fs/fuse/file.c"
    },
    {
      "type": "modify",
      "old_id": "e3736923220e86a6274828e52286c69691ee67be",
      "old_mode": 33188,
      "old_path": "mm/filemap.c",
      "new_id": "698ea80f21022bf709dacc1101c614327109d828",
      "new_mode": 33188,
      "new_path": "mm/filemap.c"
    }
  ]
}
