1. 30 Oct, 2021 6 commits
  2. 19 Oct, 2021 2 commits
  3. 16 Oct, 2021 27 commits
  4. 15 Oct, 2021 5 commits
    • Guenter Roeck's avatar
      csky: Make HAVE_TCM depend on !COMPILE_TEST · e21e52ad
      Guenter Roeck authored
      Building csky:allmodconfig results in the following build errors.
      
      arch/csky/mm/tcm.c:9:2: error:
      		#error "You should define ITCM_RAM_BASE"
          9 | #error "You should define ITCM_RAM_BASE"
            |  ^~~~~
      arch/csky/mm/tcm.c:14:2: error:
      		#error "You should define DTCM_RAM_BASE"
         14 | #error "You should define DTCM_RAM_BASE"
            |  ^~~~~
      arch/csky/mm/tcm.c:18:2: error:
      		#error "You should define correct DTCM_RAM_BASE"
         18 | #error "You should define correct DTCM_RAM_BASE"
      
      This is seen with compile tests since those enable HAVE_TCM,
      but do not provide useful default values for ITCM_RAM_BASE or
      DTCM_RAM_BASE. Disable HAVE_TCM for commpile tests to avoid
      the error.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGuo Ren <guoren@kernel.org>
      e21e52ad
    • Guenter Roeck's avatar
      csky: bitops: Remove duplicate __clear_bit define · fb5d69a5
      Guenter Roeck authored
      Building csky:allmodconfig results in the following build error.
      
      In file included from ./include/linux/bitops.h:33,
                       from ./include/linux/log2.h:12,
                       from kernel/bounds.c:13:
      ./arch/csky/include/asm/bitops.h:77: error: "__clear_bit" redefined
      
      Since commit 9248e52f ("locking/atomic: simplify non-atomic wrappers"),
      __clear_bit is defined in include/asm-generic/bitops/non-atomic.h,
      and the define in the csky include file is no longer necessary or useful.
      Remove it.
      
      Fixes: 9248e52f ("locking/atomic: simplify non-atomic wrappers")
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGuo Ren <guoren@kernel.org>
      fb5d69a5
    • Guenter Roeck's avatar
      csky: Select ARCH_WANT_FRAME_POINTERS only if compiler supports it · aeba0b84
      Guenter Roeck authored
      Compiling csky:allmodconfig with an upstream C compiler results
      in the following error.
      
      csky-linux-gcc: error:
      	unrecognized command-line option '-mbacktrace';
      	did you mean '-fbacktrace'?
      
      Select ARCH_WANT_FRAME_POINTERS only if gcc supports it to
      avoid the error.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGuo Ren <guoren@kernel.org>
      aeba0b84
    • Guo Ren's avatar
      csky: Fixup regs.sr broken in ptrace · af89ebaa
      Guo Ren authored
      gpr_get() return the entire pt_regs (include sr) to userspace, if we
      don't restore the C bit in gpr_set, it may break the ALU result in
      that context. So the C flag bit is part of gpr context, that's why
      riscv totally remove the C bit in the ISA. That makes sr reg clear
      from userspace to supervisor privilege.
      Signed-off-by: default avatarGuo Ren <guoren@linux.alibaba.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: stable@vger.kernel.org
      af89ebaa
    • Al Viro's avatar
      csky: don't let sigreturn play with priveleged bits of status register · fbd63c08
      Al Viro authored
      csky restore_sigcontext() blindly overwrites regs->sr with the value
      it finds in sigcontext.  Attacker can store whatever they want in there,
      which includes things like S-bit.  Userland shouldn't be able to set
      that, or anything other than C flag (bit 0).
      
      Do the same thing other architectures with protected bits in flags
      register do - preserve everything that shouldn't be settable in
      user mode, picking the rest from the value saved is sigcontext.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarGuo Ren <guoren@kernel.org>
      Cc: stable@vger.kernel.org
      fbd63c08