1. 19 4月, 2017 1 次提交
  2. 18 4月, 2017 1 次提交
  3. 14 4月, 2017 1 次提交
  4. 28 3月, 2017 6 次提交
  5. 23 3月, 2017 1 次提交
  6. 22 3月, 2017 2 次提交
    • N
      arm64: kaslr: Fix up the kernel image alignment · afd0e5a8
      Neeraj Upadhyay 提交于
      If kernel image extends across alignment boundary, existing
      code increases the KASLR offset by size of kernel image. The
      offset is masked after resizing. There are cases, where after
      masking, we may still have kernel image extending across
      boundary. This eventually results in only 2MB block getting
      mapped while creating the page tables. This results in data aborts
      while accessing unmapped regions during second relocation (with
      kaslr offset) in __primary_switch. To fix this problem, round up the
      kernel image size, by swapper block size, before adding it for
      correction.
      
      For example consider below case, where kernel image still crosses
      1GB alignment boundary, after masking the offset, which is fixed
      by rounding up kernel image size.
      
      SWAPPER_TABLE_SHIFT = 30
      Swapper using section maps with section size 2MB.
      CONFIG_PGTABLE_LEVELS = 3
      VA_BITS = 39
      
      _text  : 0xffffff8008080000
      _end   : 0xffffff800aa1b000
      offset : 0x1f35600000
      mask = ((1UL << (VA_BITS - 2)) - 1) & ~(SZ_2M - 1)
      
      (_text + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7c
      (_end + offset) >> SWAPPER_TABLE_SHIFT  = 0x3fffffe7d
      
      offset after existing correction (before mask) = 0x1f37f9b000
      (_text + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7d
      (_end + offset) >> SWAPPER_TABLE_SHIFT  = 0x3fffffe7d
      
      offset (after mask) = 0x1f37e00000
      (_text + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7c
      (_end + offset) >> SWAPPER_TABLE_SHIFT  = 0x3fffffe7d
      
      new offset w/ rounding up = 0x1f38000000
      (_text + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7d
      (_end + offset) >> SWAPPER_TABLE_SHIFT  = 0x3fffffe7d
      
      Fixes: f80fb3a3 ("arm64: add support for kernel ASLR")
      Cc: <stable@vger.kernel.org>
      Reviewed-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NNeeraj Upadhyay <neeraju@codeaurora.org>
      Signed-off-by: NSrinivas Ramana <sramana@codeaurora.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      afd0e5a8
    • W
      arm64: compat: Update compat syscalls · 713cc9df
      Will Deacon 提交于
      Hook up three pkey syscalls (which we don't implement) and the new statx
      syscall, as has been done for arch/arm/.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      713cc9df
  7. 21 3月, 2017 1 次提交
  8. 20 3月, 2017 6 次提交
  9. 19 3月, 2017 2 次提交
  10. 18 3月, 2017 1 次提交
  11. 17 3月, 2017 5 次提交
  12. 16 3月, 2017 6 次提交
  13. 15 3月, 2017 6 次提交
    • S
      openrisc: Export symbols needed by modules · 363dad58
      Stafford Horne 提交于
      This was detected by allmodconfig, errors reported:
      
       ERROR: "empty_zero_page" [net/ceph/libceph.ko] undefined!
       ERROR: "__ucmpdi2" [lib/842/842_decompress.ko] undefined!
       ERROR: "empty_zero_page" [fs/nfs/objlayout/objlayoutdriver.ko] undefined!
       ERROR: "empty_zero_page" [fs/exofs/exofs.ko] undefined!
       ERROR: "empty_zero_page" [fs/crypto/fscrypto.ko] undefined!
       ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined!
       ERROR: "pm_power_off" [drivers/regulator/act8865-regulator.ko] undefined!
       ERROR: "__ucmpdi2" [drivers/media/i2c/adv7842.ko] undefined!
       ERROR: "__clear_user" [drivers/md/dm-mod.ko] undefined!
       ERROR: "__clear_user" [net/netfilter/x_tables.ko] undefined!
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      363dad58
    • S
      openrisc: fix issue handling 8 byte get_user calls · 154e67cd
      Stafford Horne 提交于
      Was getting the following error with allmodconfig:
      
        ERROR: "__get_user_bad" [lib/test_user_copy.ko] undefined!
      
      This was simply a missing break statement, causing an unwanted fall
      through.
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      154e67cd
    • S
      openrisc: xchg: fix `computed is not used` warning · 8af42949
      Stafford Horne 提交于
      When building allmodconfig this warning shows.
      
        fs/ocfs2/file.c: In function 'ocfs2_file_write_iter':
        ./arch/openrisc/include/asm/cmpxchg.h:81:3: warning: value computed is
        not used [-Wunused-value]
          ((typeof(*(ptr)))__xchg((unsigned long)(with), (ptr), sizeof(*(ptr))))
           ^
      
      Applying the same patch logic that was done to the cmpxchg macro.
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      8af42949
    • J
      x86/intel_rdt: Put group node in rdtgroup_kn_unlock · 49ec8f5b
      Jiri Olsa 提交于
      The rdtgroup_kn_unlock waits for the last user to release and put its
      node. But it's calling kernfs_put on the node which calls the
      rdtgroup_kn_unlock, which might not be the group's directory node, but
      another group's file node.
      
      This race could be easily reproduced by running 2 instances
      of following script:
      
        mount -t resctrl resctrl /sys/fs/resctrl/
        pushd /sys/fs/resctrl/
        mkdir krava
        echo "krava" > krava/schemata
        rmdir krava
        popd
        umount  /sys/fs/resctrl
      
      It triggers the slub debug error message with following command
      line config: slub_debug=,kernfs_node_cache.
      
      Call kernfs_put on the group's node to fix it.
      
      Fixes: 60cf5e10 ("x86/intel_rdt: Add mkdir to resctrl file system")
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Shaohua Li <shli@fb.com>
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/r/1489501253-20248-1-git-send-email-jolsa@kernel.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      49ec8f5b
    • J
      x86/unwind: Fix last frame check for aligned function stacks · 87a6b297
      Josh Poimboeuf 提交于
      Pavel Machek reported the following warning on x86-32:
      
        WARNING: kernel stack frame pointer at f50cdf98 in swapper/2:0 has bad value   (null)
      
      The warning is caused by the unwinder not realizing that it reached the
      end of the stack, due to an unusual prologue which gcc sometimes
      generates for aligned stacks.  The prologue is based on a gcc feature
      called the Dynamic Realign Argument Pointer (DRAP).  It's almost always
      enabled for aligned stacks when -maccumulate-outgoing-args isn't set.
      
      This issue is similar to the one fixed by the following commit:
      
        8023e0e2 ("x86/unwind: Adjust last frame check for aligned function stacks")
      
      ... but that fix was specific to x86-64.
      
      Make the fix more generic to cover x86-32 as well, and also ensure that
      the return address referred to by the frame pointer is a copy of the
      original return address.
      
      Fixes: acb4608a ("x86/unwind: Create stack frames for saved syscall registers")
      Reported-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com>
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/r/50d4924db716c264b14f1633037385ec80bf89d2.1489465609.git.jpoimboe@redhat.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      87a6b297
    • A
      mm, x86: Fix native_pud_clear build error · d434936e
      Arnd Bergmann 提交于
      We still get a build error in random configurations, after this has been
      modified a few times:
      
      In file included from include/linux/mm.h:68:0,
                       from include/linux/suspend.h:8,
                       from arch/x86/kernel/asm-offsets.c:12:
      arch/x86/include/asm/pgtable.h:66:26: error: redefinition of 'native_pud_clear'
       #define pud_clear(pud)   native_pud_clear(pud)
      
      My interpretation is that the build error comes from a typo in __PAGETABLE_PUD_FOLDED,
      so fix that typo now, and remove the incorrect #ifdef around the native_pud_clear
      definition.
      
      Fixes: 3e761a42 ("mm, x86: fix HIGHMEM64 && PARAVIRT build config for native_pud_clear()")
      Fixes: a00cc7d9 ("mm, x86: add support for PUD-sized transparent hugepages")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NDave Jiang <dave.jiang@intel.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Thomas Garnier <thgarnie@google.com>
      Link: http://lkml.kernel.org/r/20170314121330.182155-1-arnd@arndb.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      d434936e
  14. 14 3月, 2017 1 次提交
    • N
      ARM: at91: pm: cpu_idle: switch DDR to power-down mode · 60b89f19
      Nicolas Ferre 提交于
      On some DDR controllers, compatible with the sama5d3 one,
      the sequence to enter/exit/re-enter the self-refresh mode adds
      more constrains than what is currently written in the at91_idle
      driver. An actual access to the DDR chip is needed between exit
      and re-enter of this mode which is somehow difficult to implement.
      This sequence can completely hang the SoC. It is particularly
      experienced on parts which embed a L2 cache if the code run
      between IDLE calls fits in it...
      
      Moreover, as the intention is to enter and exit pretty rapidly
      from IDLE, the power-down mode is a good candidate.
      
      So now we use power-down instead of self-refresh. As we can
      simplify the code for sama5d3 compatible DDR controllers,
      we instantiate a new sama5d3_ddr_standby() function.
      Signed-off-by: NNicolas Ferre <nicolas.ferre@microchip.com>
      Cc: <stable@vger.kernel.org> # v4.1+
      Fixes: 017b5522 ("ARM: at91: Add new binding for sama5d3-ddramc")
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      60b89f19