Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martyn Welch
linux
Commits
cccb0efd
Commit
cccb0efd
authored
4 years ago
by
Mimi Zohar
Browse files
Options
Downloads
Plain Diff
Merge branch 'ima-kexec-fixes' into next-integrity
parents
b3f82afc
f31e3386
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/linux/kexec.h
+5
-0
5 additions, 0 deletions
include/linux/kexec.h
kernel/kexec_file.c
+5
-0
5 additions, 0 deletions
kernel/kexec_file.c
security/integrity/ima/ima_kexec.c
+3
-0
3 additions, 0 deletions
security/integrity/ima/ima_kexec.c
with
13 additions
and
0 deletions
include/linux/kexec.h
+
5
−
0
View file @
cccb0efd
...
...
@@ -300,6 +300,11 @@ struct kimage {
/* Information for loading purgatory */
struct
purgatory_info
purgatory_info
;
#endif
#ifdef CONFIG_IMA_KEXEC
/* Virtual address of IMA measurement buffer for kexec syscall */
void
*
ima_buffer
;
#endif
};
/* kexec interface functions */
...
...
This diff is collapsed.
Click to expand it.
kernel/kexec_file.c
+
5
−
0
View file @
cccb0efd
...
...
@@ -166,6 +166,11 @@ void kimage_file_post_load_cleanup(struct kimage *image)
vfree
(
pi
->
sechdrs
);
pi
->
sechdrs
=
NULL
;
#ifdef CONFIG_IMA_KEXEC
vfree
(
image
->
ima_buffer
);
image
->
ima_buffer
=
NULL
;
#endif
/* CONFIG_IMA_KEXEC */
/* See if architecture has anything to cleanup post load */
arch_kimage_file_post_load_cleanup
(
image
);
...
...
This diff is collapsed.
Click to expand it.
security/integrity/ima/ima_kexec.c
+
3
−
0
View file @
cccb0efd
...
...
@@ -119,6 +119,7 @@ void ima_add_kexec_buffer(struct kimage *image)
ret
=
kexec_add_buffer
(
&
kbuf
);
if
(
ret
)
{
pr_err
(
"Error passing over kexec measurement buffer.
\n
"
);
vfree
(
kexec_buffer
);
return
;
}
...
...
@@ -128,6 +129,8 @@ void ima_add_kexec_buffer(struct kimage *image)
return
;
}
image
->
ima_buffer
=
kexec_buffer
;
pr_debug
(
"kexec measurement buffer for the loaded kernel at 0x%lx.
\n
"
,
kbuf
.
mem
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment