123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415 |
- #
- # General architecture dependent options
- #
- config OPROFILE
- tristate "OProfile system profiling"
- depends on PROFILING
- depends on HAVE_OPROFILE
- select RING_BUFFER
- select RING_BUFFER_ALLOW_SWAP
- help
- OProfile is a profiling system capable of profiling the
- whole system, include the kernel, kernel modules, libraries,
- and applications.
- If unsure, say N.
- config OPROFILE_EVENT_MULTIPLEX
- bool "OProfile multiplexing support (EXPERIMENTAL)"
- default n
- depends on OPROFILE && X86
- help
- The number of hardware counters is limited. The multiplexing
- feature enables OProfile to gather more events than counters
- are provided by the hardware. This is realized by switching
- between events at an user specified time interval.
- If unsure, say N.
- config HAVE_OPROFILE
- bool
- config OPROFILE_NMI_TIMER
- def_bool y
- depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI
- config KPROBES
- bool "Kprobes"
- depends on MODULES
- depends on HAVE_KPROBES
- select KALLSYMS
- help
- Kprobes allows you to trap at almost any kernel address and
- execute a callback function. register_kprobe() establishes
- a probepoint and specifies the callback. Kprobes is useful
- for kernel debugging, non-intrusive instrumentation and testing.
- If in doubt, say "N".
- config JUMP_LABEL
- bool "Optimize very unlikely/likely branches"
- depends on HAVE_ARCH_JUMP_LABEL
- help
- This option enables a transparent branch optimization that
- makes certain almost-always-true or almost-always-false branch
- conditions even cheaper to execute within the kernel.
- Certain performance-sensitive kernel code, such as trace points,
- scheduler functionality, networking code and KVM have such
- branches and include support for this optimization technique.
- If it is detected that the compiler has support for "asm goto",
- the kernel will compile such branches with just a nop
- instruction. When the condition flag is toggled to true, the
- nop will be converted to a jump instruction to execute the
- conditional block of instructions.
- This technique lowers overhead and stress on the branch prediction
- of the processor and generally makes the kernel faster. The update
- of the condition is slower, but those are always very rare.
- ( On 32-bit x86, the necessary options added to the compiler
- flags may increase the size of the kernel slightly. )
- config OPTPROBES
- def_bool y
- depends on KPROBES && HAVE_OPTPROBES
- depends on !PREEMPT
- config HAVE_EFFICIENT_UNALIGNED_ACCESS
- bool
- help
- Some architectures are unable to perform unaligned accesses
- without the use of get_unaligned/put_unaligned. Others are
- unable to perform such accesses efficiently (e.g. trap on
- unaligned access and require fixing it up in the exception
- handler.)
- This symbol should be selected by an architecture if it can
- perform unaligned accesses efficiently to allow different
- code paths to be selected for these cases. Some network
- drivers, for example, could opt to not fix up alignment
- problems with received packets if doing so would not help
- much.
- See Documentation/unaligned-memory-access.txt for more
- information on the topic of unaligned memory accesses.
- config ARCH_USE_BUILTIN_BSWAP
- bool
- help
- Modern versions of GCC (since 4.4) have builtin functions
- for handling byte-swapping. Using these, instead of the old
- inline assembler that the architecture code provides in the
- __arch_bswapXX() macros, allows the compiler to see what's
- happening and offers more opportunity for optimisation. In
- particular, the compiler will be able to combine the byteswap
- with a nearby load or store and use load-and-swap or
- store-and-swap instructions if the architecture has them. It
- should almost *never* result in code which is worse than the
- hand-coded assembler in <asm/swab.h>. But just in case it
- does, the use of the builtins is optional.
- Any architecture with load-and-swap or store-and-swap
- instructions should set this. And it shouldn't hurt to set it
- on architectures that don't have such instructions.
- config HAVE_SYSCALL_WRAPPERS
- bool
- config KRETPROBES
- def_bool y
- depends on KPROBES && HAVE_KRETPROBES
- config USER_RETURN_NOTIFIER
- bool
- depends on HAVE_USER_RETURN_NOTIFIER
- help
- Provide a kernel-internal notification when a cpu is about to
- switch to user mode.
- config HAVE_IOREMAP_PROT
- bool
- config HAVE_KPROBES
- bool
- config HAVE_KRETPROBES
- bool
- config HAVE_OPTPROBES
- bool
- config HAVE_NMI_WATCHDOG
- bool
- #
- # An arch should select this if it provides all these things:
- #
- # task_pt_regs() in asm/processor.h or asm/ptrace.h
- # arch_has_single_step() if there is hardware single-step support
- # arch_has_block_step() if there is hardware block-step support
- # asm/syscall.h supplying asm-generic/syscall.h interface
- # linux/regset.h user_regset interfaces
- # CORE_DUMP_USE_REGSET #define'd in linux/elf.h
- # TIF_SYSCALL_TRACE calls tracehook_report_syscall_{entry,exit}
- # TIF_NOTIFY_RESUME calls tracehook_notify_resume()
- # signal delivery calls tracehook_signal_handler()
- #
- config HAVE_ARCH_TRACEHOOK
- bool
- config HAVE_DMA_ATTRS
- bool
- config HAVE_DMA_CONTIGUOUS
- bool
- config USE_GENERIC_SMP_HELPERS
- bool
- config HAVE_REGS_AND_STACK_ACCESS_API
- bool
- help
- This symbol should be selected by an architecure if it supports
- the API needed to access registers and stack entries from pt_regs,
- declared in asm/ptrace.h
- For example the kprobes-based event tracer needs this API.
- config HAVE_CLK
- bool
- help
- The <linux/clk.h> calls support software clock gating and
- thus are a key power management tool on many systems.
- config HAVE_DMA_API_DEBUG
- bool
- config HAVE_HW_BREAKPOINT
- bool
- depends on PERF_EVENTS
- config HAVE_MIXED_BREAKPOINTS_REGS
- bool
- depends on HAVE_HW_BREAKPOINT
- help
- Depending on the arch implementation of hardware breakpoints,
- some of them have separate registers for data and instruction
- breakpoints addresses, others have mixed registers to store
- them but define the access type in a control register.
- Select this option if your arch implements breakpoints under the
- latter fashion.
- config HAVE_USER_RETURN_NOTIFIER
- bool
- config HAVE_PERF_EVENTS_NMI
- bool
- help
- System hardware can generate an NMI using the perf event
- subsystem. Also has support for calculating CPU cycle events
- to determine how many clock cycles in a given period.
- config HAVE_PERF_REGS
- bool
- help
- Support selective register dumps for perf events. This includes
- bit-mapping of each registers and a unique architecture id.
- config HAVE_PERF_USER_STACK_DUMP
- bool
- help
- Support user stack dumps for perf event samples. This needs
- access to the user stack pointer which is not unified across
- architectures.
- config HAVE_ARCH_JUMP_LABEL
- bool
- config HAVE_ARCH_MUTEX_CPU_RELAX
- bool
- config HAVE_RCU_TABLE_FREE
- bool
- config ARCH_HAVE_NMI_SAFE_CMPXCHG
- bool
- config HAVE_ALIGNED_STRUCT_PAGE
- bool
- help
- This makes sure that struct pages are double word aligned and that
- e.g. the SLUB allocator can perform double word atomic operations
- on a struct page for better performance. However selecting this
- might increase the size of a struct page by a word.
- config HAVE_CMPXCHG_LOCAL
- bool
- config HAVE_CMPXCHG_DOUBLE
- bool
- config ARCH_WANT_OLD_COMPAT_IPC
- bool
- config HAVE_ARCH_MMAP_RND_BITS
- bool
- help
- An arch should select this symbol if it supports setting a variable
- number of bits for use in establishing the base address for mmap
- allocations, has MMU enabled and provides values for both:
- - ARCH_MMAP_RND_BITS_MIN
- - ARCH_MMAP_RND_BITS_MAX
- config ARCH_MMAP_RND_BITS_MIN
- int
- config ARCH_MMAP_RND_BITS_MAX
- int
- config ARCH_MMAP_RND_BITS_DEFAULT
- int
- config ARCH_MMAP_RND_BITS
- int "Number of bits to use for ASLR of mmap base address" if EXPERT
- range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX
- default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT
- default ARCH_MMAP_RND_BITS_MIN
- depends on HAVE_ARCH_MMAP_RND_BITS
- help
- This value can be used to select the number of bits to use to
- determine the random offset to the base address of vma regions
- resulting from mmap allocations. This value will be bounded
- by the architecture's minimum and maximum supported values.
- This value can be changed after boot using the
- /proc/sys/vm/mmap_rnd_bits tunable
- config HAVE_ARCH_MMAP_RND_COMPAT_BITS
- bool
- help
- An arch should select this symbol if it supports running applications
- in compatibility mode, supports setting a variable number of bits for
- use in establishing the base address for mmap allocations, has MMU
- enabled and provides values for both:
- - ARCH_MMAP_RND_COMPAT_BITS_MIN
- - ARCH_MMAP_RND_COMPAT_BITS_MAX
- config ARCH_MMAP_RND_COMPAT_BITS_MIN
- int
- config ARCH_MMAP_RND_COMPAT_BITS_MAX
- int
- config ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
- int
- config ARCH_MMAP_RND_COMPAT_BITS
- int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT
- range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX
- default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
- default ARCH_MMAP_RND_COMPAT_BITS_MIN
- depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS
- help
- This value can be used to select the number of bits to use to
- determine the random offset to the base address of vma regions
- resulting from mmap allocations for compatible applications This
- value will be bounded by the architecture's minimum and maximum
- supported values.
- This value can be changed after boot using the
- /proc/sys/vm/mmap_rnd_compat_bits tunable
- config HAVE_ARCH_SECCOMP_FILTER
- bool
- help
- An arch should select this symbol if it provides all of these things:
- - syscall_get_arch()
- - syscall_get_arguments()
- - syscall_rollback()
- - syscall_set_return_value()
- - SIGSYS siginfo_t support
- - secure_computing is called from a ptrace_event()-safe context
- - secure_computing return value is checked and a return value of -1
- results in the system call being skipped immediately.
- - seccomp syscall wired up
- config SECCOMP_FILTER
- def_bool y
- depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET
- help
- Enable tasks to build secure computing environments defined
- in terms of Berkeley Packet Filter programs which implement
- task-defined system call filtering polices.
- See Documentation/prctl/seccomp_filter.txt for details.
- config HAVE_CC_STACKPROTECTOR
- bool
- help
- An arch should select this symbol if:
- - its compiler supports the -fstack-protector option
- - it has implemented a stack canary (e.g. __stack_chk_guard)
- config CC_STACKPROTECTOR
- def_bool n
- help
- Set when a stack-protector mode is enabled, so that the build
- can enable kernel-side support for the GCC feature.
- choice
- prompt "Stack Protector buffer overflow detection"
- depends on HAVE_CC_STACKPROTECTOR
- default CC_STACKPROTECTOR_NONE
- help
- This option turns on the "stack-protector" GCC feature. This
- feature puts, at the beginning of functions, a canary value on
- the stack just before the return address, and validates
- the value just before actually returning. Stack based buffer
- overflows (that need to overwrite this return address) now also
- overwrite the canary, which gets detected and the attack is then
- neutralized via a kernel panic.
- config CC_STACKPROTECTOR_NONE
- bool "None"
- help
- Disable "stack-protector" GCC feature.
- config CC_STACKPROTECTOR_REGULAR
- bool "Regular"
- select CC_STACKPROTECTOR
- help
- Functions will have the stack-protector canary logic added if they
- have an 8-byte or larger character array on the stack.
- This feature requires gcc version 4.2 or above, or a distribution
- gcc with the feature backported ("-fstack-protector").
- On an x86 "defconfig" build, this feature adds canary checks to
- about 3% of all kernel functions, which increases kernel code size
- by about 0.3%.
- config CC_STACKPROTECTOR_STRONG
- bool "Strong"
- select CC_STACKPROTECTOR
- help
- Functions will have the stack-protector canary logic added in any
- of the following conditions:
- - local variable's address used as part of the right hand side of an
- assignment or function argument
- - local variable is an array (or union containing an array),
- regardless of array type or length
- - uses register local variables
- This feature requires gcc version 4.9 or above, or a distribution
- gcc with the feature backported ("-fstack-protector-strong").
- On an x86 "defconfig" build, this feature adds canary checks to
- about 20% of all kernel functions, which increases the kernel code
- size by about 2%.
- endchoice
- source "kernel/gcov/Kconfig"
|