arch/x86/Kconfig.debug v3.0-rc7


Menu: Kernel hacking

lib/Kconfig.debug

STRICT_DEVMEM

Filter access to /dev/mem

If this option is disabled, you allow userspace (root) access to all
of memory, including kernel and userspace memory. Accidental
access to this is obviously disastrous, but specific access can
be used by people debugging the kernel. Note that with PAT support
enabled, even in this case there are restrictions on /dev/mem
use due to the cache aliasing requirements.

If this option is switched on, the /dev/mem file only allows
userspace access to PCI space and the BIOS code and data regions.
This is sufficient for dosemu and X and all common users of
/dev/mem.

If in doubt, say Y.

X86_VERBOSE_BOOTUP

Enable verbose x86 bootup info messages

Enables the informational output from the decompression stage
(e.g. bzImage) of the boot. If you disable this you will still
see errors. Disable this if you want silent bootup.

EARLY_PRINTK

Early printk

Write kernel log output directly into the VGA buffer or to a serial
port.

This is useful for kernel debugging when your machine crashes very
early before the console code is initialized. For normal operation
it is not recommended because it looks ugly and doesn't cooperate
with klogd/syslogd or the X server. You should normally N here,
unless you want to debug such a crash.

EARLY_PRINTK_DBGP

Early printk via EHCI debug port

Write kernel log output directly into the EHCI debug port.

This is useful for kernel debugging when your machine crashes very
early before the console code is initialized. For normal operation
it is not recommended because it looks ugly and doesn't cooperate
with klogd/syslogd or the X server. You should normally N here,
unless you want to debug such a crash. You need usb debug device.

DEBUG_STACKOVERFLOW

Check for stack overflows

This option will cause messages to be printed if free stack space
drops below a certain limit.

X86_PTDUMP

Export kernel pagetable layout to userspace via debugfs

Say Y here if you want to show the kernel pagetable layout in a
debugfs file. This information is only useful for kernel developers
who are working in architecture specific areas of the kernel.
It is probably not a good idea to enable this feature in a production
kernel.
If in doubt, say "N"

DEBUG_RODATA

Write protect kernel read-only data structures

Mark the kernel read-only data as write-protected in the pagetables,
in order to catch accidental (and incorrect) writes to such const
data. This is recommended so that we can catch kernel bugs sooner.
If in doubt, say "Y".

DEBUG_RODATA_TEST

Testcase for the DEBUG_RODATA feature

This option enables a testcase for the DEBUG_RODATA
feature as well as for the change_page_attr() infrastructure.
If in doubt, say "N"

DEBUG_SET_MODULE_RONX

Set loadable kernel module data as NX and text as RO

This option helps catch unintended modifications to loadable
kernel module's text and read-only data. It also prevents execution
of module data. Such protection may interfere with run-time code
patching and dynamic kernel tracing - and they might also protect
against certain classes of kernel exploits.
If in doubt, say "N".

DEBUG_NX_TEST

Testcase for the NX non-executable stack feature

This option enables a testcase for the CPU NX capability
and the software setup of this feature.
If in doubt, say "N"

DOUBLEFAULT

Enable doublefault exception handler

This option allows trapping of rare doublefault exceptions that
would otherwise cause a system to silently reboot. Disabling this
option saves about 4k and might cause you much additional grey
hair.

IOMMU_DEBUG

Enable IOMMU debugging

Force the IOMMU to on even when you have less than 4GB of
memory and add debugging code. On overflow always panic. And
allow to enable IOMMU leak tracing. Can be disabled at boot
time with iommu=noforce. This will also enable scatter gather
list merging.  Currently not recommended for production
code. When you use it make sure you have a big enough
IOMMU/AGP aperture.  Most of the options enabled by this can
be set more finegrained using the iommu= command line
options. See Documentation/x86_64/boot-options.txt for more
details.

IOMMU_STRESS

Enable IOMMU stress-test mode

This option disables various optimizations in IOMMU related
code to do real stress testing of the IOMMU code. This option
will cause a performance drop and should only be enabled for
testing.

IOMMU_LEAK

IOMMU leak tracing

Add a simple leak tracer to the IOMMU code. This is useful when you
are debugging a buggy device driver that leaks IOMMU mappings.

X86_DECODER_SELFTEST

x86 instruction decoder selftest

Perform x86 instruction decoder selftests at build time.
This option is useful for checking the sanity of x86 instruction
decoder code.
If unsure, say "N".

IO_DELAY_0X80

port 0x80 based port-IO delay [recommended]

This is the traditional Linux IO delay used for in/out_p.
It is the most tested hence safest selection here.

IO_DELAY_0XED

port 0xed based port-IO delay

Use port 0xed as the IO delay. This frees up port 0x80 which is
often used as a hardware-debug port.

IO_DELAY_UDELAY

udelay based port-IO delay

Use udelay(2) as the IO delay method. This provides the delay
while not having any side-effect on the IO port space.

IO_DELAY_NONE

no port-IO delay

No port-IO delay. Will break on old boxes that require port-IO
delay for certain operations. Should work on most new machines.

DEBUG_BOOT_PARAMS

Debug boot parameters

This option will cause struct boot_params to be exported via debugfs.

CPA_DEBUG

CPA self-test code

Do change_page_attr() self-tests every 30 seconds.

OPTIMIZE_INLINING

Allow gcc to uninline functions marked 'inline'

This option determines if the kernel forces gcc to inline the functions
developers have marked 'inline'. Doing so takes away freedom from gcc to
do what it thinks is best, which is desirable for the gcc 3.x series of
compilers. The gcc 4.x series have a rewritten inlining algorithm and
enabling this option will generate a smaller kernel there. Hopefully
this algorithm is so good that allowing gcc 4.x and above to make the
decision will become the default in the future. Until then this option
is there to test gcc for this.

If unsure, say N.

DEBUG_STRICT_USER_COPY_CHECKS

Strict copy size checks

Enabling this option turns a certain set of sanity checks for user
copy operations into compile time failures.

The copy_from_user() etc checks are there to help test if there
are sufficient security checks on the length argument of
the copy operation, by having gcc prove that the argument is
within bounds.

If unsure, or if you run an older (pre 4.4) gcc, say N.