Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 855722 - app-emulation/virtualbox-modules-6.1.34 pax-kernel flag error during applying patch
Summary: app-emulation/virtualbox-modules-6.1.34 pax-kernel flag error during applying...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: The Gentoo Linux Hardened Team
Keywords: PullRequest
: 855725 (view as bug list)
Depends on:
Reported: 2022-07-02 10:14 UTC by xdev52
Modified: 2022-10-07 07:32 UTC (History)
2 users (show)

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

build.log (v-mod-build.log,2.90 KB, text/x-log)
2022-07-04 15:14 UTC, xdev52
emerge info (info-v-mod.txt,8.02 KB, text/plain)
2022-07-04 15:14 UTC, xdev52

Note You need to log in before you can comment on or make changes to this bug.
Description xdev52 2022-07-02 10:14:35 UTC
>>> Emerging (1 of 2) app-emulation/virtualbox-modules-6.1.34::gentoo
>>> Failed to emerge app-emulation/virtualbox-modules-6.1.34, Log file:
>>>  '/var/tmp/portage/app-emulation/virtualbox-modules-6.1.34/temp/build.log'
>>> Jobs: 0 of 2 complete, 1 failed                 Load avg: 4.14, 4.62, 4.67
 * Package:    app-emulation/virtualbox-modules-6.1.34
 * Repository: gentoo
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux pax-kernel userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     5.17.15-gentoo
 * Checking for suitable kernel configuration options ...
 [ ok ]
>>> Unpacking source...
>>> Unpacking vbox-kernel-module-src-6.1.34.tar.xz to /var/tmp/portage/app-emulation/virtualbox-modules-6.1.34/work
>>> Source unpacked in /var/tmp/portage/app-emulation/virtualbox-modules-6.1.34/work
>>> Preparing source in /var/tmp/portage/app-emulation/virtualbox-modules-6.1.34/work ...
 * Applying virtualbox-modules-5.2.8-pax-const.patch ...
patching file vboxdrv/SUPDrvIDC.h
Hunk #1 succeeded at 163 (offset 3 lines).
patching file vboxnetflt/include/VBox/intnet.h
Hunk #1 succeeded at 873 (offset 90 lines).
patching file vboxnetflt/linux/VBoxNetFlt-linux.c
Hunk #1 succeeded at 339 with fuzz 2 (offset -501 lines).
can't find file to patch at input line 36
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|--- vboxpci/include/VBox/rawpci.h
|+++ vboxpci/include/VBox/rawpci.h
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
 [ !! ]
 * ERROR: app-emulation/virtualbox-modules-6.1.34::gentoo failed (prepare phase):
 *   patch -p1 -p0 failed with /var/tmp/portage/app-emulation/virtualbox-modules-6.1.34/files/virtualbox-modules-5.2.8-pax-const.patch
 * Call stack:
 *     , line  127:  Called src_prepare
 *             environment, line 2175:  Called eapply '-p0' '/var/tmp/portage/app-emulation/virtualbox-modules-6.1.34/files/virtualbox-modules-5.2.8-pax-const.patch'
 *             environment, line  792:  Called _eapply_patch '/var/tmp/portage/app-emulation/virtualbox-modules-6.1.34/files/virtualbox-modules-5.2.8-pax-const.patch'
 *             environment, line  730:  Called __helpers_die 'patch -p1 -p0 failed with /var/tmp/portage/app-emulation/virtualbox-modules-6.1.34/files/virtualbox-modules-5.2.8-pax-const.patch'
 *, line  112:  Called die
 * The specific snippet of code:
 *              die "$@"

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-02 10:18:09 UTC
*** Bug 855725 has been marked as a duplicate of this bug. ***
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-02 10:18:23 UTC
Please include the full build.log and emerge --info.
Comment 3 xdev52 2022-07-04 15:14:04 UTC
Created attachment 790058 [details]
Comment 4 xdev52 2022-07-04 15:14:27 UTC
Created attachment 790061 [details]
emerge info
Comment 5 xdev52 2022-07-04 15:15:51 UTC
(In reply to Sam James from comment #2)
> Please include the full build.log and emerge --info.

Comment 6 Viorel Munteanu gentoo-dev 2022-07-10 06:48:48 UTC
Is the patch still needed?  I tried to compile both 6.1.32 and 6.1.34 on an old box with a grsec kernel and they compile just file without USE=pax-kernel.  Can you please try?
Comment 7 xdev52 2022-07-20 18:15:09 UTC
This patch is for compilation only? I've just set this flag for whole system.

Without this flag compilation is successful but what if we get crash after some time running it or when using specific /dev/ ?

If you think this flag is useless then just turn it off in portage tree or something...
Comment 8 Viorel Munteanu gentoo-dev 2022-10-06 16:50:21 UTC
This flag was for compiling on a grsec kernel, which is no longer supported.  You don't really need it.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-06 16:59:36 UTC
It's possible it's useful with newer grsec kernels but none of us have a copy. We don't know if it's still useful for such users nor can we test.
Comment 10 Larry the Git Cow gentoo-dev 2022-10-07 07:32:26 UTC
The bug has been referenced in the following commit(s):

commit 87e0614f38efdc0051a1e64274f108ca3d231745
Author:     Viorel Munteanu <>
AuthorDate: 2022-10-07 05:29:31 +0000
Commit:     Joonas Niilola <>
CommitDate: 2022-10-07 07:27:13 +0000

    profiles/base: Mask pax-kernel for app-emulation/virtualbox
    I don't have a current official grsec kernel but I wouldn't want to
    simply remove all support either, so just mask it for now because it's
    Signed-off-by: Viorel Munteanu <>
    Signed-off-by: Joonas Niilola <>

 profiles/base/package.use.mask | 7 +++++++
 1 file changed, 7 insertions(+)