Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 476464 - sys-apps/systemd should not check for CONFIG_HOTPLUG
Summary: sys-apps/systemd should not check for CONFIG_HOTPLUG
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
: 484602 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-10 23:22 UTC by Alex Xu (Hello71)
Modified: 2013-09-14 14:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Xu (Hello71) 2013-07-10 23:22:11 UTC
systemd ebuild still checks for CONFIG_HOTPLUG.

This only saves (saved) 200 bytes, was forced on with 45f035ab9b8f (committed to torvalds/linux.git 2012-09-06 20:26:16 (GMT)), and does not exist at all as of 40b313608ad4ea655addd2ec6cdd106477ae8e15 (committed to torvalds/linux.git 2013-06-03 21:20:18 (GMT)).

This check does not block building; thus, it doesn't really matter if existing ebuilds are patched or if it is simply omitted in future ebuilds.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-11 07:14:13 UTC
I don't understand you. I'm using 3.10 and I still have CONFIG_HOTPLUG here.
Comment 2 Alex Xu (Hello71) 2013-07-11 14:15:43 UTC
http://cateee.net/lkddb/web-lkddb/HOTPLUG.html


found in init/Kconfig

The configuration item CONFIG_HOTPLUG:

    prompt:
    type: bool
    depends on: (none)
    defined in init/Kconfig
    found in Linux kernels: 3.7–3.10

Support for hot-pluggable devices found in arch/i386/Kconfig

The configuration item CONFIG_HOTPLUG:

    prompt: Support for hot-pluggable devices
    type: bool
    depends on: (none)
    defined in arch/i386/Kconfig
    found in Linux kernels: 2.6.0–2.6.3

Support for hot-pluggable devices found in init/Kconfig

The configuration item CONFIG_HOTPLUG:

    prompt: Support for hot-pluggable devices
    type: bool
    depends on: CONFIG_EXPERT
    defined in init/Kconfig
    found in Linux kernels: 2.6.4–2.6.39, 3.0–3.6


Compare with: http://cateee.net/lkddb/web-lkddb/SMP.html


Symmetric multi-processing support found in arch/x86/Kconfig

The configuration item CONFIG_SMP:

    prompt: Symmetric multi-processing support
    type: bool
    depends on: (none)
    defined in arch/x86/Kconfig
    found in Linux kernels: 2.6.24–2.6.39, 3.0–3.10, *3.10+HEAD*

(emphasis mine)

Meaning, if I understand correctly, CONFIG_HOTPLUG is in kernels 2.6.4–3.10; after 3.7, it was forced on. In current trees, it does not exist.

(Ctrl-F config HOTPLUG)
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/init/Kconfig
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/init/Kconfig
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/init/Kconfig (won't be in next stable by Greg KH)

Even in current 3.10, if you check init/Kconfig: (https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/init/Kconfig?h=linux-3.10.y)

config HOTPLUG
  def_bool y

make nconfig doesn't even show the option because it's forced on.

So yes, you have CONFIG_HOTPLUG in .config, but nowhere else.
Comment 3 Mike Gilbert gentoo-dev 2013-07-13 20:40:12 UTC
Given that systemd supports kernels older than 3.10, I don't think removing the check is a good idea. According to the systemd ebuild, we support any kernel >=2.6.39.
Comment 4 Alex Xu (Hello71) 2013-09-10 21:03:28 UTC
This is a legitimate bug, even if it blocking builds.

CONFIG_HOTPLUG is not in 3.11 (causing unnecessary warnings) and has been forced on for quite some time.

> From: Greg KH <gregkh@linuxfoundation.org>
>
> The CONFIG_HOTPLUG variable is tough to turn off, and almost all arches
> default to it on.
>
> If you turn it off, it saves you a big 200 or so bytes, and then starts
> to cause all sorts of problems as the code paths if the option is
> disabled is never really tested, and memory segments start to get thrown
> away that driver authors assume will always be present.
Comment 5 Mike Gilbert gentoo-dev 2013-09-13 14:29:15 UTC
*** Bug 484602 has been marked as a duplicate of this bug. ***
Comment 6 Pacho Ramos gentoo-dev 2013-09-14 09:34:13 UTC
And, how are we supposed to solve this? Because I think we are with the usual problem when checking for kernel config: can we assume the kernel config used for the check is the version that will be used at boot? In that case, this should probably be solved at eclass level: the check should only warn about option being disabled if the option exists (if not, it should simply show that the option no longer exists)
Comment 7 Alex Xu (Hello71) 2013-09-14 14:18:47 UTC
(In reply to Alex Xu from comment #4)
> This is a legitimate bug, even if it blocking builds.

*not
Comment 8 Alex Xu (Hello71) 2013-09-14 14:23:49 UTC
config DEVTMPFS
 bool "Maintain a devtmpfs filesystem to mount at /dev"
 depends on HOTPLUG

local CONFIG_CHECK="... ~DEVTMPFS ... ~HOTPLUG"

Ergo, the HOTPLUG check is not necessary.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-09-14 14:29:32 UTC
Fixed in -207.