1. 09 5月, 2017 5 次提交
  2. 05 5月, 2017 1 次提交
    • S
      powerpc/64e: Don't place the stack beyond TASK_SIZE · 61baf155
      Scott Wood 提交于
      Commit f4ea6dcb ("powerpc/mm: Enable mappings above 128TB") increased
      the task size on book3s, and introduced a mechanism to dynamically
      control whether a task uses these larger addresses.  While the change to
      the task size itself was ifdef-protected to only apply on book3s, the
      change to STACK_TOP_USER64 was not.  On book3e, this had the effect of
      trying to use addresses up to 128TiB for the stack despite a 64TiB task
      size limit -- which broke 64-bit userspace producing the following errors:
      
      Starting init: /sbin/init exists but couldn't execute it (error -14)
      Starting init: /bin/sh exists but couldn't execute it (error -14)
      Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
      
      Fixes: f4ea6dcb ("powerpc/mm: Enable mappings above 128TB")
      Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NScott Wood <oss@buserror.net>
      61baf155
  3. 04 5月, 2017 1 次提交
  4. 03 5月, 2017 9 次提交
  5. 02 5月, 2017 2 次提交
  6. 01 5月, 2017 2 次提交
  7. 30 4月, 2017 1 次提交
    • L
      powerpc/64e: Fix hang when debugging programs with relocated kernel · fd615f69
      LiuHailong 提交于
      Debug interrupts can be taken during interrupt entry, since interrupt
      entry does not automatically turn them off.  The kernel will check
      whether the faulting instruction is between [interrupt_base_book3e,
      __end_interrupts], and if so clear MSR[DE] and return.
      
      However, when the kernel is built with CONFIG_RELOCATABLE, it can't use
      LOAD_REG_IMMEDIATE(r14,interrupt_base_book3e) and
      LOAD_REG_IMMEDIATE(r15,__end_interrupts), as they ignore relocation.
      Thus, if the kernel is actually running at a different address than it
      was built at, the address comparison will fail, and the exception entry
      code will hang at kernel_dbg_exc.
      
      r2(toc) is also not usable here, as r2 still holds data from the
      interrupted context, so LOAD_REG_ADDR() doesn't work either.  So we use
      the *name@got* to get the EV of two labels directly.
      
      Test programs test.c shows as follows:
      int main(int argc, char *argv[])
      {
      	if (access("/proc/sys/kernel/perf_event_paranoid", F_OK) == -1)
      		printf("Kernel doesn't have perf_event support\n");
      }
      
      Steps to reproduce the bug, for example:
       1) ./gdb ./test
       2) (gdb) b access
       3) (gdb) r
       4) (gdb) s
      Signed-off-by: NLiu Hailong <liu.hailong6@zte.com.cn>
      Signed-off-by: NJiang Xuexin <jiang.xuexin@zte.com.cn>
      Reviewed-by: NJiang Biao <jiang.biao2@zte.com.cn>
      Reviewed-by: NLiu Song <liu.song11@zte.com.cn>
      Reviewed-by: NHuang Jian <huang.jian@zte.com.cn>
      [scottwood: cleaned up commit message, and specified bad behavior
       as a hang rather than an oops to correspond to mainline kernel behavior]
      Fixes: 1cb6e064 ("powerpc/book3e: support CONFIG_RELOCATABLE")
      Cc: <stable@vger.kernel.org> # 4.4.x-
      Signed-off-by: NScott Wood <oss@buserror.net>
      fd615f69
  8. 28 4月, 2017 18 次提交
  9. 27 4月, 2017 1 次提交