Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kernel cmdline parameter for CCNP measurement #20

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

ruomengh
Copy link
Contributor

  1. ima_template=ima-cgpath is required for CCNP measurement

1. ima_template=ima-cgpath is required for CCNP measurement

Signed-off-by: Hao, Ruomeng <[email protected]>
@ruomengh ruomengh requested a review from dongx1x March 18, 2024 08:58
Copy link
Member

@dongx1x dongx1x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@wenhuizhang wenhuizhang merged commit de581fd into cc-api:main Mar 19, 2024
2 of 3 checks passed
@wenhuizhang
Copy link
Member

wenhuizhang commented Mar 19, 2024

Hi, @ruomengh ,

5.15 does not have some an option, I am evaluating how large the patch would be for this option.
Seems like not big patch, however need to validate with the 5.15 code.

Ref: https://patchwork.kernel.org/project/linux-integrity/patch/[email protected]/

~/linux-image-bsk/security/integrity/ima# vim ima_template.c

static struct ima_template_desc builtin_templates[] = {
        {.name = IMA_TEMPLATE_IMA_NAME, .fmt = IMA_TEMPLATE_IMA_FMT},
        {.name = "ima-ng", .fmt = "d-ng|n-ng"},
        {.name = "ima-sig", .fmt = "d-ng|n-ng|sig"},
        {.name = "ima-buf", .fmt = "d-ng|n-ng|buf"},
        {.name = "ima-modsig", .fmt = "d-ng|n-ng|sig|d-modsig|modsig"},
        {.name = "evm-sig",
         .fmt = "d-ng|n-ng|evmsig|xattrnames|xattrlengths|xattrvalues|iuid|igid|imode"},
        {.name = "", .fmt = ""},        /* placeholder for a custom format */
};

@wenhuizhang
Copy link
Member

wenhuizhang commented Mar 19, 2024

Nor does 6.8-next

static struct [ima_template_desc](https://elixir.bootlin.com/linux/latest/C/ident/ima_template_desc) [builtin_templates](https://elixir.bootlin.com/linux/latest/C/ident/builtin_templates)[] = {
	{.name = [IMA_TEMPLATE_IMA_NAME](https://elixir.bootlin.com/linux/latest/C/ident/IMA_TEMPLATE_IMA_NAME), .[fmt](https://elixir.bootlin.com/linux/latest/C/ident/fmt) = [IMA_TEMPLATE_IMA_FMT](https://elixir.bootlin.com/linux/latest/C/ident/IMA_TEMPLATE_IMA_FMT)},
	{.name = "ima-ng", .[fmt](https://elixir.bootlin.com/linux/latest/C/ident/fmt) = "d-ng|n-ng"},
	{.name = "ima-sig", .[fmt](https://elixir.bootlin.com/linux/latest/C/ident/fmt) = "d-ng|n-ng|sig"},
	{.name = "ima-ngv2", .[fmt](https://elixir.bootlin.com/linux/latest/C/ident/fmt) = "d-ngv2|n-ng"},
	{.name = "ima-sigv2", .[fmt](https://elixir.bootlin.com/linux/latest/C/ident/fmt) = "d-ngv2|n-ng|sig"},
	{.name = "ima-buf", .[fmt](https://elixir.bootlin.com/linux/latest/C/ident/fmt) = "d-ng|n-ng|buf"},
	{.name = "ima-modsig", .[fmt](https://elixir.bootlin.com/linux/latest/C/ident/fmt) = "d-ng|n-ng|sig|d-modsig|modsig"},
	{.name = "evm-sig",
	 .[fmt](https://elixir.bootlin.com/linux/latest/C/ident/fmt) = "d-ng|n-ng|evmsig|xattrnames|xattrlengths|xattrvalues|iuid|igid|imode"},
	{.name = "", .[fmt](https://elixir.bootlin.com/linux/latest/C/ident/fmt) = ""},	/* placeholder for a custom format */
};

@ruomengh
Copy link
Contributor Author

Hi, @ruomengh ,

5.15 does not have some an option, I am evaluating how large the patch would be for this option. Seems like not big patch, however need to validate with the 5.15 code.

Ref: https://patchwork.kernel.org/project/linux-integrity/patch/[email protected]/

~/linux-image-bsk/security/integrity/ima# vim ima_template.c

static struct ima_template_desc builtin_templates[] = {
        {.name = IMA_TEMPLATE_IMA_NAME, .fmt = IMA_TEMPLATE_IMA_FMT},
        {.name = "ima-ng", .fmt = "d-ng|n-ng"},
        {.name = "ima-sig", .fmt = "d-ng|n-ng|sig"},
        {.name = "ima-buf", .fmt = "d-ng|n-ng|buf"},
        {.name = "ima-modsig", .fmt = "d-ng|n-ng|sig|d-modsig|modsig"},
        {.name = "evm-sig",
         .fmt = "d-ng|n-ng|evmsig|xattrnames|xattrlengths|xattrvalues|iuid|igid|imode"},
        {.name = "", .fmt = ""},        /* placeholder for a custom format */
};

This parameter is based on a separated kernel patch for container measurement. The patch will be put in the project later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants