5

In order to troubleshoot an issue I'm looking in my kernel configuration settings for: CONFIG_SECCOMP, CONFIG_HAVE_ARCH_SECCOMP_FILTER and CONFIG_SECCOMP_FILTER.

The first one is present in the kernel's config file as: CONFIG_SECCOMP=y but the other two are simply not present. This leaves me wondering how to interpret that..

Should settings missing in a kernel's config be interpreted as <setting>=n or are defaults used?

3

For boolean or tristate yes/no/module settings, missing and n are equivalent.

Boolean settings correspond to a C preprocessor macro which is either defined or not. Source files check whether the macro is defined with #ifdef. If the setting is n, the macro is not defined, which is equivalent to the default state.

Yes/no/module tristate settings are expanded in makefiles. Options set to y cause a source file to be compiled and the resulting object file to be linked into the main kernel image. Options set to m cause a source file to be compiled and the resulting object file to be linked as a separate module. Options set to n don't cause anything to be built.

Some configuration options don't have a direct impact on the file, but only cause configuration interfaces to prompt you for a category of settings.

If you have a .config file in the kernel source tree, you can run make oldconfig to regenerate the file with unknown options removed and options not present in the file added with their default setting. Some options are skipped from the resulting file if their category is skipped by setting the category prompt option to n.

  • Upvoted; I am baffled by your clear, elaborate, information-dense answer! Thanks! Naturally it did elicit another question. Also a reference (and/or a confirming second opinion) would be valued! – woosting Aug 25 '16 at 8:22
  • @Gilles I have a situation where I am setting options in my defconfig, but do not see ALL of those options in the resulting .config for my kernel. Is this common?? (the options in question are CONFIG_WEXT_PRIV CONFIG_WIRELESS_EXT with kernel version 2.6.39.4 – BackDoorNoBaby Feb 8 '17 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.