@@ -9,6 +9,7 @@ config CSKY
99 select ARCH_USE_BUILTIN_BSWAP
1010 select ARCH_USE_QUEUED_RWLOCKS if NR_CPUS>2
1111 select ARCH_WANT_FRAME_POINTERS if !CPU_CK610
12+ select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
1213 select COMMON_CLK
1314 select CLKSRC_MMIO
1415 select CSKY_MPINTC if CPU_CK860
@@ -38,11 +39,16 @@ config CSKY
3839 select GX6605S_TIMER if CPU_CK610
3940 select HAVE_ARCH_TRACEHOOK
4041 select HAVE_ARCH_AUDITSYSCALL
42+ select HAVE_ARCH_MMAP_RND_BITS
43+ select HAVE_ARCH_SECCOMP_FILTER
44+ select HAVE_CONTEXT_TRACKING
45+ select HAVE_VIRT_CPU_ACCOUNTING_GEN
4146 select HAVE_DEBUG_BUGVERBOSE
4247 select HAVE_DYNAMIC_FTRACE
4348 select HAVE_DYNAMIC_FTRACE_WITH_REGS
4449 select HAVE_FUNCTION_TRACER
4550 select HAVE_FUNCTION_GRAPH_TRACER
51+ select HAVE_FUNCTION_ERROR_INJECTION
4652 select HAVE_FTRACE_MCOUNT_RECORD
4753 select HAVE_KERNEL_GZIP
4854 select HAVE_KERNEL_LZO
@@ -148,6 +154,14 @@ config L1_CACHE_SHIFT
148154 default "5" if (CPU_CK807 || CPU_CK810)
149155 default "6" if (CPU_CK860)
150156
157+ config ARCH_MMAP_RND_BITS_MIN
158+ default 8
159+
160+ # max bits determined by the following formula:
161+ # VA_BITS - PAGE_SHIFT - 3
162+ config ARCH_MMAP_RND_BITS_MAX
163+ default 17
164+
151165menu "Processor type and features"
152166
153167choice
@@ -266,7 +280,7 @@ config NR_CPUS
266280 int "Maximum number of CPUs (2-32)"
267281 range 2 32
268282 depends on SMP
269- default "2 "
283+ default "4 "
270284
271285config HIGHMEM
272286 bool "High Memory Support"
@@ -295,3 +309,16 @@ endmenu
295309source "arch/csky/Kconfig.platforms"
296310
297311source "kernel/Kconfig.hz"
312+
313+ config SECCOMP
314+ bool "Enable seccomp to safely compute untrusted bytecode"
315+ help
316+ This kernel feature is useful for number crunching applications
317+ that may need to compute untrusted bytecode during their
318+ execution. By using pipes or other transports made available to
319+ the process as file descriptors supporting the read/write
320+ syscalls, it's possible to isolate those applications in
321+ their own address space using seccomp. Once seccomp is
322+ enabled via prctl(PR_SET_SECCOMP), it cannot be disabled
323+ and the task is only allowed to execute a few safe syscalls
324+ defined by each seccomp mode.
0 commit comments