Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 900845 - app-containers/docker-23.0.1: Deprecated/non existing kernel features required
Summary: app-containers/docker-23.0.1: Deprecated/non existing kernel features required
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-11 08:16 UTC by Florian Faber
Modified: 2023-03-24 00:52 UTC (History)
8 users (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 Florian Faber 2023-03-11 08:16:30 UTC
Building on 6.2.3.

* Messages for package app-containers/docker-23.0.1:

 *   CONFIG_MEMCG_SWAP:  is not set when it should be.
 *   CONFIG_LEGASY_SYSCALL_emulate:      is not set when it should be.

CONFIG_MEMCG_SWAP is no longer available since kernel 6.1, and what is 'CONFIG_LEGASY_SYSCALL_emulate' supposed to be?

Reproducible: Always
Comment 1 Silvio 2023-03-11 14:01:13 UTC
Also a type error:
LEGASY -> LEGACY

mine gives me these three errors impossibile to find in kernel .confic

*   CONFIG_MEMCG:	 is not set when it should be.
 *   CONFIG_MEMCG_SWAP:	 is not set when it should be.
 *   CONFIG_LEGASY_SYSCALL_emulate:	 is not set when it should be.   [ !! ]
Comment 2 Yury Katuar 2023-03-11 14:29:36 UTC
(In reply to Florian Faber from comment #0)
> Building on 6.2.3.

Same kernel, same warnings and also:
 *   CONFIG_SECURITY_SELINUX:    is not set when it should be.
 *   CONFIG_SECURITY_APPARMOR:   is not set when it should be.

When docker is compiled with USE="-apparmor -selinux".


(In reply to Silvio from comment #1)
> mine gives me these three errors impossibile to find in kernel .confic
> *   CONFIG_MEMCG:	 is not set when it should be.

Please specify your kernel version, this feature is present in kernel 6.2.
Comment 3 Ionuț Leonte 2023-03-11 17:28:09 UTC
I am also seeing 3 (allegedly) missing kernel options being reported by app-containers/docker-23.0.1:

 *   CONFIG_MEMCG_SWAP:  is not set when it should be.
 *   CONFIG_LEGASY_SYSCALL_emulate:      is not set when it should be.
 *   CONFIG_RT_GROUP_SCHED:      is not set when it should be.

I'm running sys-kernel/gentoo-kernel-bin-6.2.3 / virtual/dist-kernel-6.2.3
Comment 4 Larry the Git Cow gentoo-dev 2023-03-11 19:23:24 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03e62a35cc62d4651398e12b92a6a88387b65a2b

commit 03e62a35cc62d4651398e12b92a6a88387b65a2b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-03-11 19:22:39 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-03-11 19:23:12 +0000

    app-containers/docker: fix (some) kernel check options
    
    This doesn't fix all of them, just the misspellings of VSYSCALL.
    
    Bug: https://bugs.gentoo.org/900845
    Signed-off-by: Sam James <sam@gentoo.org>

 app-containers/docker/docker-23.0.1.ebuild | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Comment 5 Florian Faber 2023-03-12 08:23:13 UTC
Why should CONFIG_LEGACY_VSYSCALL_EMULATE be set anyway? I control what runs in my docker containers, and it is most certainly no crappy ancient binaries. This setting would also conflict with GENTOO_KERNEL_SELF_PROTECTION.
Comment 6 Martin Jansa 2023-03-12 08:58:52 UTC
 *   CONFIG_MEMCG:	 is not set when it should be.
 *   CONFIG_RT_GROUP_SCHED: is not set when it should be.

These 2 do exist in linux-6.2.3-gentoo

 *   CONFIG_MEMCG_SWAP:  is not set when it should be.

This one doesn't since v6.1-rc where it was removed with this commit:
https://github.com/torvalds/linux/commit/e55b9f96860f6c6026cff97966a740576285e07b

 *   CONFIG_LEGACY_VSYSCALL_EMULATE

Is also gone since 5.19-rc1 where it was removed with this commit:
https://github.com/torvalds/linux/commit/bf00745e7791fe2ba7941aeead8528075a158bbe

Corresponding section in moby:
https://github.com/moby/moby/blob/master/contrib/check-config.sh#L279
seems to accept CONFIG_LEGACY_VSYSCALL_EMULATE only if it's there (not asking for it to be enabled on kernels which don't support it).
Comment 7 Larry the Git Cow gentoo-dev 2023-03-14 16:50:13 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f78eaca943ed47dbea9a7c44e9f438aa3575438

commit 6f78eaca943ed47dbea9a7c44e9f438aa3575438
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2023-03-14 16:44:19 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2023-03-14 16:49:53 +0000

    app-containers/docker: more kernel option fixes
    
    - put SECURITY_SELINUX and SECURITY_APPARMOR behind the appropriate use flags
    - put MEMCG_SWAP and LEGACY_SYSCALL_EMULATE behind kernel version checks
    
    Bug: https://bugs.gentoo.org/900845
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 app-containers/docker/docker-23.0.1.ebuild | 37 +++++++++++++++++++++++-------
 1 file changed, 29 insertions(+), 8 deletions(-)
Comment 8 William Hubbs gentoo-dev 2023-03-14 16:51:15 UTC
Please resync and rebuild then let me know if this cleans up the
messages you were seeing.

Thanks,

William
Comment 9 Martin Jansa 2023-03-14 17:31:32 UTC
No warnings shown for me with 6.2.6-gentoo, thanks!
Comment 10 Florian Faber 2023-03-14 17:36:11 UTC
*   CONFIG_LEGACY_VSYSCALL_NONE:        should not be set. But it is.   [ !! ]
 
This is not acceptable. There is no need to ask for this setting.
Comment 11 William Hubbs gentoo-dev 2023-03-14 20:19:19 UTC
I'm asking you to disable that setting,not enable it.
But, it looks like the earliest glibc we now have in the tree is 2.19,
so I may not need to worry about it any longer.
I'll take a look and see when glibc-2.13 was removed; I think it was
pretty recent.
Comment 12 Florian Faber 2023-03-14 20:38:59 UTC
I know what you are asking for, I can read. Disabling NONE would make *all* systems less secure and violates GENTOO_KERNEL_SELF_PROTECTION. That one person that wants to run binary only software from the pleistocene can enable it, but do not force everybody else.
Comment 13 Ben Kohler gentoo-dev 2023-03-15 17:37:20 UTC
I looked into this a bit and it would seem that there is a simple ebuild typo which is leading to this misleading warning.  The ebuild sets:

    WARNING_LEGACY_SYSCALL_NONE="CONFIG_LEGACY_VSYSCALL_NONE enabled: \
        Containers with <=glibc-2.13 will not work"

but it's missing the "V" in VSYSCALL, so it reverts to the generic warning for this config check instead.

If we fix the typo, it goes from

*   CONFIG_LEGACY_VSYSCALL_NONE: should not be set. But it is.
(non-fatal eerror call, red with [!!])

to

*   CONFIG_LEGACY_VSYSCALL_NONE enabled: Containers with <=glibc-2.13 will not work
(non-fatal ewarn call, yellow)


I believe William will have a fix for this incoming soon.
Comment 14 Larry the Git Cow gentoo-dev 2023-03-15 17:40:35 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18749359ef244ab3c82a32a66c8cbf9884acc1a4

commit 18749359ef244ab3c82a32a66c8cbf9884acc1a4
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2023-03-15 17:33:39 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2023-03-15 17:39:02 +0000

    app-containers/docker: typo fix for LEGACY_VSYSCALL_NONE warning
    
    The warning was not assigned to the proper configuration check.
    This commit fixes that issue which results in a better warning message.
    
    Bug: https://bugs.gentoo.org/900845
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 app-containers/docker/docker-23.0.1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 15 William Hubbs gentoo-dev 2023-03-15 17:41:47 UTC
Let me know if that makes things more clear for you.
Comment 16 Alex Efros 2023-03-19 07:35:57 UTC
I've custom/hardened kernel config and installed 23.0.1 just fine now, so probably this issue is completed.

Meanwhile, there is another issue with 23.0.1: shell completion needs to be updated. But I'll open another issue for this now.