Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
cccb0efd
Commit
cccb0efd
authored
Feb 10, 2021
by
Mimi Zohar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ima-kexec-fixes' into next-integrity
parents
b3f82afc
f31e3386
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
include/linux/kexec.h
include/linux/kexec.h
+5
-0
kernel/kexec_file.c
kernel/kexec_file.c
+5
-0
security/integrity/ima/ima_kexec.c
security/integrity/ima/ima_kexec.c
+3
-0
No files found.
include/linux/kexec.h
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 */
...
...
kernel/kexec_file.c
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
);
...
...
security/integrity/ima/ima_kexec.c
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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment