)]}'
{
  "commit": "f5a40711fa58f1c109165a4fec6078bf2dfd2bdc",
  "tree": "5c07133fe140bdd20a8db5fdae3ed9ba8d643aac",
  "parents": [
    "2fd9c41aea47f4ad071accf94b94f94f2c4d31eb"
  ],
  "author": {
    "name": "Andrey Ryabinin",
    "email": "aryabinin@virtuozzo.com",
    "time": "Thu Dec 28 19:06:20 2017 +0300"
  },
  "committer": {
    "name": "Thomas Gleixner",
    "email": "tglx@linutronix.de",
    "time": "Thu Jan 04 23:04:57 2018 +0100"
  },
  "message": "x86/mm: Set MODULES_END to 0xffffffffff000000\n\nSince f06bdd4001c2 (\"x86/mm: Adapt MODULES_END based on fixmap section size\")\nkasan_mem_to_shadow(MODULES_END) could be not aligned to a page boundary.\n\nSo passing page unaligned address to kasan_populate_zero_shadow() have two\npossible effects:\n\n1) It may leave one page hole in supposed to be populated area. After commit\n  21506525fb8d (\"x86/kasan/64: Teach KASAN about the cpu_entry_area\") that\n  hole happens to be in the shadow covering fixmap area and leads to crash:\n\n BUG: unable to handle kernel paging request at fffffbffffe8ee04\n RIP: 0010:check_memory_region+0x5c/0x190\n\n Call Trace:\n  \u003cNMI\u003e\n  memcpy+0x1f/0x50\n  ghes_copy_tofrom_phys+0xab/0x180\n  ghes_read_estatus+0xfb/0x280\n  ghes_notify_nmi+0x2b2/0x410\n  nmi_handle+0x115/0x2c0\n  default_do_nmi+0x57/0x110\n  do_nmi+0xf8/0x150\n  end_repeat_nmi+0x1a/0x1e\n\nNote, the crash likely disappeared after commit 92a0f81d8957, which\nchanged kasan_populate_zero_shadow() call the way it was before\ncommit 21506525fb8d.\n\n2) Attempt to load module near MODULES_END will fail, because\n   __vmalloc_node_range() called from kasan_module_alloc() will hit the\n   WARN_ON(!pte_none(*pte)) in the vmap_pte_range() and bail out with error.\n\nTo fix this we need to make kasan_mem_to_shadow(MODULES_END) page aligned\nwhich means that MODULES_END should be 8*PAGE_SIZE aligned.\n\nThe whole point of commit f06bdd4001c2 was to move MODULES_END down if\nNR_CPUS is big, so the cpu_entry_area takes a lot of space.\nBut since 92a0f81d8957 (\"x86/cpu_entry_area: Move it out of the fixmap\")\nthe cpu_entry_area is no longer in fixmap, so we could just set\nMODULES_END to a fixed 8*PAGE_SIZE aligned address.\n\nFixes: f06bdd4001c2 (\"x86/mm: Adapt MODULES_END based on fixmap section size\")\nReported-by: Jakub Kicinski \u003ckubakici@wp.pl\u003e\nSigned-off-by: Andrey Ryabinin \u003caryabinin@virtuozzo.com\u003e\nSigned-off-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: stable@vger.kernel.org\nCc: Andy Lutomirski \u003cluto@kernel.org\u003e\nCc: Thomas Garnier \u003cthgarnie@google.com\u003e\nLink: https://lkml.kernel.org/r/20171228160620.23818-1-aryabinin@virtuozzo.com\n\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ad41b3813f0a3a3bd5abb32532b42c9b820bbe27",
      "old_mode": 33188,
      "old_path": "Documentation/x86/x86_64/mm.txt",
      "new_id": "ddd5ffd31bd040383a82a1ee39b5c29d1f3e3094",
      "new_mode": 33188,
      "new_path": "Documentation/x86/x86_64/mm.txt"
    },
    {
      "type": "modify",
      "old_id": "b97a539bcdeee8ca47e39e7353b3e9d1757da24b",
      "old_mode": 33188,
      "old_path": "arch/x86/include/asm/pgtable_64_types.h",
      "new_id": "6233e5595389b9435b84f63908cfe71480483135",
      "new_mode": 33188,
      "new_path": "arch/x86/include/asm/pgtable_64_types.h"
    }
  ]
}
