Commit 2044513f authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'csky-for-linus-5.9-rc1' of https://github.com/c-sky/csky-linux

Pull arch/csky updates from Guo Ren:
 "New features:
   - seccomp-filter
   - err-injection
   - top-down&random mmap-layout
   - irq_work
   - show_ipi
   - context-tracking

  Fixes & Optimizations:
   - kprobe_on_ftrace
   - optimize panic print"

* tag 'csky-for-linus-5.9-rc1' of https://github.com/c-sky/csky-linux:
  csky: Add context tracking support
  csky: Add arch_show_interrupts for IPI interrupts
  csky: Add irq_work support
  csky: Fixup warning by EXPORT_SYMBOL(kmap)
  csky: Set CONFIG_NR_CPU 4 as default
  csky: Use top-down mmap layout
  csky: Optimize the trap processing flow
  csky: Add support for function error injection
  csky: Fixup kprobes handler couldn't change pc
  csky: Fixup duplicated restore sp in RESTORE_REGS_FTRACE
  csky: Add cpu feature register hint for smp
  csky: Add SECCOMP_FILTER supported
  csky: remove unusued thread_saved_pc and *_segments functions/macros
parents bbcf9cd1 bdcd93ef
Loading
Loading
Loading
Loading
+28 −1
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ config CSKY
	select ARCH_USE_BUILTIN_BSWAP
	select ARCH_USE_QUEUED_RWLOCKS if NR_CPUS>2
	select ARCH_WANT_FRAME_POINTERS if !CPU_CK610
	select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
	select COMMON_CLK
	select CLKSRC_MMIO
	select CSKY_MPINTC if CPU_CK860
@@ -38,11 +39,16 @@ config CSKY
	select GX6605S_TIMER if CPU_CK610
	select HAVE_ARCH_TRACEHOOK
	select HAVE_ARCH_AUDITSYSCALL
	select HAVE_ARCH_MMAP_RND_BITS
	select HAVE_ARCH_SECCOMP_FILTER
	select HAVE_CONTEXT_TRACKING
	select HAVE_VIRT_CPU_ACCOUNTING_GEN
	select HAVE_DEBUG_BUGVERBOSE
	select HAVE_DYNAMIC_FTRACE
	select HAVE_DYNAMIC_FTRACE_WITH_REGS
	select HAVE_FUNCTION_TRACER
	select HAVE_FUNCTION_GRAPH_TRACER
	select HAVE_FUNCTION_ERROR_INJECTION
	select HAVE_FTRACE_MCOUNT_RECORD
	select HAVE_KERNEL_GZIP
	select HAVE_KERNEL_LZO
@@ -148,6 +154,14 @@ config L1_CACHE_SHIFT
	default "5"	if (CPU_CK807 || CPU_CK810)
	default "6"	if (CPU_CK860)

config ARCH_MMAP_RND_BITS_MIN
	default 8

# max bits determined by the following formula:
#  VA_BITS - PAGE_SHIFT - 3
config ARCH_MMAP_RND_BITS_MAX
	default 17

menu "Processor type and features"

choice
@@ -266,7 +280,7 @@ config NR_CPUS
	int "Maximum number of CPUs (2-32)"
	range 2 32
	depends on SMP
	default "2"
	default "4"

config HIGHMEM
	bool "High Memory Support"
@@ -295,3 +309,16 @@ endmenu
source "arch/csky/Kconfig.platforms"

source "kernel/Kconfig.hz"

config SECCOMP
	bool "Enable seccomp to safely compute untrusted bytecode"
	help
	  This kernel feature is useful for number crunching applications
	  that may need to compute untrusted bytecode during their
	  execution. By using pipes or other transports made available to
	  the process as file descriptors supporting the read/write
	  syscalls, it's possible to isolate those applications in
	  their own address space using seccomp. Once seccomp is
	  enabled via prctl(PR_SET_SECCOMP), it cannot be disabled
	  and the task is only allowed to execute a few safe syscalls
	  defined by each seccomp mode.
+0 −3
Original line number Diff line number Diff line
@@ -136,8 +136,6 @@

.macro	RESTORE_REGS_FTRACE
	ldw	tls, (sp, 0)
	ldw	a0, (sp, 16)
	mtcr	a0, ss0

#ifdef CONFIG_CPU_HAS_HILO
	ldw	a0, (sp, 140)
@@ -158,7 +156,6 @@
	addi    sp, 40
	ldm     r16-r30, (sp)
	addi    sp, 72
	mfcr	sp, ss0
.endm

.macro SAVE_SWITCH_STACK
+3 −1
Original line number Diff line number Diff line
@@ -55,7 +55,9 @@

.macro mcount_exit_regs
	RESTORE_REGS_FTRACE
	ldw	t1, (sp, 0)
	subi	sp, 152
	ldw	t1, (sp, 4)
	addi	sp, 152
	ldw	r8, (sp, 4)
	ldw	lr, (sp, 8)
	addi	sp, 12
+1 −0
Original line number Diff line number Diff line
@@ -4,5 +4,6 @@ generic-y += gpio.h
generic-y += kvm_para.h
generic-y += local64.h
generic-y += qrwlock.h
generic-y += seccomp.h
generic-y += user.h
generic-y += vmlinux.lds.h
+2 −1
Original line number Diff line number Diff line
@@ -20,7 +20,8 @@ do { \

struct pt_regs;

void die_if_kernel(char *str, struct pt_regs *regs, int nr);
void die(struct pt_regs *regs, const char *str);
void show_regs(struct pt_regs *regs);
void show_code(struct pt_regs *regs);

#endif /* __ASM_CSKY_BUG_H */
Loading