1. 01 3月, 2016 22 次提交
  2. 28 2月, 2016 1 次提交
    • D
      mm: ASLR: use get_random_long() · 5ef11c35
      Daniel Cashman 提交于
      Replace calls to get_random_int() followed by a cast to (unsigned long)
      with calls to get_random_long().  Also address shifting bug which, in
      case of x86 removed entropy mask for mmap_rnd_bits values > 31 bits.
      Signed-off-by: NDaniel Cashman <dcashman@android.com>
      Acked-by: NKees Cook <keescook@chromium.org>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Nick Kralevich <nnk@google.com>
      Cc: Jeff Vander Stoep <jeffv@google.com>
      Cc: Mark Salyzyn <salyzyn@android.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5ef11c35
  3. 25 2月, 2016 1 次提交
  4. 19 2月, 2016 2 次提交
  5. 17 2月, 2016 1 次提交
  6. 16 2月, 2016 1 次提交
  7. 15 2月, 2016 1 次提交
  8. 12 2月, 2016 1 次提交
  9. 11 2月, 2016 3 次提交
  10. 10 2月, 2016 1 次提交
    • Y
      arm64: disable kasan when accessing frame->fp in unwind_frame · bcaf669b
      Yang Shi 提交于
      When boot arm64 kernel with KASAN enabled, the below error is reported by
      kasan:
      
      BUG: KASAN: out-of-bounds in unwind_frame+0xec/0x260 at addr ffffffc064d57ba0
      Read of size 8 by task pidof/499
      page:ffffffbdc39355c0 count:0 mapcount:0 mapping:          (null) index:0x0
      flags: 0x0()
      page dumped because: kasan: bad access detected
      CPU: 2 PID: 499 Comm: pidof Not tainted 4.5.0-rc1 #119
      Hardware name: Freescale Layerscape 2085a RDB Board (DT)
      Call trace:
      [<ffffffc00008d078>] dump_backtrace+0x0/0x290
      [<ffffffc00008d32c>] show_stack+0x24/0x30
      [<ffffffc0006a981c>] dump_stack+0x8c/0xd8
      [<ffffffc0002e4400>] kasan_report_error+0x558/0x588
      [<ffffffc0002e4958>] kasan_report+0x60/0x70
      [<ffffffc0002e3188>] __asan_load8+0x60/0x78
      [<ffffffc00008c92c>] unwind_frame+0xec/0x260
      [<ffffffc000087e60>] get_wchan+0x110/0x160
      [<ffffffc0003b647c>] do_task_stat+0xb44/0xb68
      [<ffffffc0003b7730>] proc_tgid_stat+0x40/0x50
      [<ffffffc0003ac840>] proc_single_show+0x88/0xd8
      [<ffffffc000345be8>] seq_read+0x370/0x770
      [<ffffffc00030aba0>] __vfs_read+0xc8/0x1d8
      [<ffffffc00030c0ec>] vfs_read+0x94/0x168
      [<ffffffc00030d458>] SyS_read+0xb8/0x128
      [<ffffffc000086530>] el0_svc_naked+0x24/0x28
      Memory state around the buggy address:
       ffffffc064d57a80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f4 f4
       ffffffc064d57b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      >ffffffc064d57b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                                        ^
       ffffffc064d57c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
       ffffffc064d57c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      
      Since the shadow byte pointed by the report is 0, so it may mean it is just hit
      oob in non-current task. So, disable the instrumentation to silence these
      warnings.
      Acked-by: NAndrey Ryabinin <aryabinin@virtuozzo.com>
      Signed-off-by: NYang Shi <yang.shi@linaro.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      bcaf669b
  11. 04 2月, 2016 1 次提交
  12. 02 2月, 2016 3 次提交
  13. 01 2月, 2016 1 次提交
  14. 26 1月, 2016 1 次提交
    • M
      arm64: mm: avoid calling apply_to_page_range on empty range · 57adec86
      Mika Penttilä 提交于
      Calling apply_to_page_range with an empty range results in a BUG_ON
      from the core code. This can be triggered by trying to load the st_drv
      module with CONFIG_DEBUG_SET_MODULE_RONX enabled:
      
        kernel BUG at mm/memory.c:1874!
        Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
        Modules linked in:
        CPU: 3 PID: 1764 Comm: insmod Not tainted 4.5.0-rc1+ #2
        Hardware name: ARM Juno development board (r0) (DT)
        task: ffffffc9763b8000 ti: ffffffc975af8000 task.ti: ffffffc975af8000
        PC is at apply_to_page_range+0x2cc/0x2d0
        LR is at change_memory_common+0x80/0x108
      
      This patch fixes the issue by making change_memory_common (called by the
      set_memory_* functions) a NOP when numpages == 0, therefore avoiding the
      erroneous call to apply_to_page_range and bringing us into line with x86
      and s390.
      
      Cc: <stable@vger.kernel.org>
      Reviewed-by: NLaura Abbott <labbott@redhat.com>
      Acked-by: NDavid Rientjes <rientjes@google.com>
      Signed-off-by: NMika Penttilä <mika.penttila@nextfour.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      57adec86