1. 31 Aug, 2019 12 commits
  2. 30 Aug, 2019 18 commits
  3. 29 Aug, 2019 8 commits
  4. 28 Aug, 2019 2 commits
    • zhaoyang's avatar
      ARM: 8901/1: add a criteria for pfn_valid of arm · 5b3efa4f
      zhaoyang authored
      pfn_valid can be wrong when parsing a invalid pfn whose phys address
      exceeds BITS_PER_LONG as the MSB will be trimed when shifted.
      
      The issue originally arise from bellowing call stack, which corresponding to
      an access of the /proc/kpageflags from userspace with a invalid pfn parameter
      and leads to kernel panic.
      
      [46886.723249] c7 [<c031ff98>] (stable_page_flags) from [<c03203f8>]
      [46886.723264] c7 [<c0320368>] (kpageflags_read) from [<c0312030>]
      [46886.723280] c7 [<c0311fb0>] (proc_reg_read) from [<c02a6e6c>]
      [46886.723290] c7 [<c02a6e24>] (__vfs_read) from [<c02a7018>]
      [46886.723301] c7 [<c02a6f74>] (vfs_read) from [<c02a778c>]
      [46886.723315] c7 [<c02a770c>] (SyS_pread64) from [<c0108620>]
      (ret_fast_syscall+0x0/0x28)
      Signed-off-by: default avatarZhaoyang Huang <zhaoyang.huang@unisoc.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      5b3efa4f
    • Anup Patel's avatar
      RISC-V: Fix FIXMAP area corruption on RV32 systems · a256f2e3
      Anup Patel authored
      Currently, various virtual memory areas of Linux RISC-V are organized
      in increasing order of their virtual addresses is as follows:
      1. User space area (This is lowest area and starts at 0x0)
      2. FIXMAP area
      3. VMALLOC area
      4. Kernel area (This is highest area and starts at PAGE_OFFSET)
      
      The maximum size of user space aread is represented by TASK_SIZE.
      
      On RV32 systems, TASK_SIZE is defined as VMALLOC_START which causes the
      user space area to overlap the FIXMAP area. This allows user space apps
      to potentially corrupt the FIXMAP area and kernel OF APIs will crash
      whenever they access corrupted FDT in the FIXMAP area.
      
      On RV64 systems, TASK_SIZE is set to fixed 256GB and no other areas
      happen to overlap so we don't see any FIXMAP area corruptions.
      
      This patch fixes FIXMAP area corruption on RV32 systems by setting
      TASK_SIZE to FIXADDR_START. We also move FIXADDR_TOP, FIXADDR_SIZE,
      and FIXADDR_START defines to asm/pgtable.h so that we can avoid cyclic
      header includes.
      Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
      Tested-by: default avatarAlistair Francis <alistair.francis@wdc.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
      a256f2e3