documentation_complete: true


title: 'User a virtually-mapped stack'

description: |-
    Enable this to use virtually-mapped kernel stacks with guard pages.
    This configuration is available from kernel 4.9.

    {{{ describe_kernel_build_config("CONFIG_VMAP_STACK", "y") | indent(4) }}}

rationale: |-
   This causes kernel stack overflows to be caught immediately rather than causing difficult-to-diagnose corruption.

warnings:
    {{{ warning_kernel_build_config() | indent(4) }}}

severity: medium

identifiers:
    cce@rhel8: CCE-86251-6
    cce@rhel9: CCE-86252-4
    cce@rhel10: CCE-90287-4

ocil_clause: 'the kernel was not built with the required value'

ocil: |-
    {{{ ocil_kernel_build_config("CONFIG_VMAP_STACK", "y") | indent(4) }}}

template:
    name: kernel_build_config
    vars:
        config: CONFIG_VMAP_STACK
        value: 'y'

