Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypervisor rootkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
flg_bachelors
TS
2024
hypervisor rootkit
Commits
e88b6b87
Commit
e88b6b87
authored
6 months ago
by
iliya.saroukha
Browse files
Options
Downloads
Patches
Plain Diff
debug: trying to a find the reason why vmxon raises the carry flag
parent
f715c49b
No related branches found
No related tags found
Loading
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
proto/region/vmxon_reg.c
+5
-3
5 additions, 3 deletions
proto/region/vmxon_reg.c
proto/region/vxmon_reg.h
+1
-1
1 addition, 1 deletion
proto/region/vxmon_reg.h
with
6 additions
and
4 deletions
proto/region/vmxon_reg.c
+
5
−
3
View file @
e88b6b87
...
@@ -29,7 +29,7 @@ static int alloc_vmxon_internals(struct vmxon_region_t *reg) {
...
@@ -29,7 +29,7 @@ static int alloc_vmxon_internals(struct vmxon_region_t *reg) {
reg
->
size
=
REGION_SIZE
;
reg
->
size
=
REGION_SIZE
;
reg
->
va
=
region
;
reg
->
va
=
region
;
reg
->
pa
=
(
void
*
)
__pa
(
region
);
reg
->
pa
=
__pa
(
region
);
return
0
;
return
0
;
}
}
...
@@ -41,12 +41,13 @@ static int write_vmcs_rev_id_to_vmxon(struct vmxon_region_t *reg) {
...
@@ -41,12 +41,13 @@ static int write_vmcs_rev_id_to_vmxon(struct vmxon_region_t *reg) {
}
}
DEBUG_FMT
(
DEBUG_FMT
(
"Reading IA32_VMX_BASIC MSR for VMCS revision identifier = %ll
u
\n
"
,
"Reading IA32_VMX_BASIC MSR for VMCS revision identifier =
0x
%ll
x
\n
"
,
VMCS_REVISION_ID
);
VMCS_REVISION_ID
);
DEBUG_FMT
(
"Writing VMCS Revision ID to VMXON region
\n
"
);
DEBUG_FMT
(
"Writing VMCS Revision ID to VMXON region
\n
"
);
(
*
(
uint32_t
*
)
reg
->
va
)
=
VMCS_REVISION_ID
;
(
*
(
unsigned
long
*
)
reg
->
va
)
=
VMCS_REVISION_ID
;
(
*
(
unsigned
long
*
)
reg
->
va
)
&=
~
(
1UL
<<
31
);
return
0
;
return
0
;
}
}
...
@@ -57,6 +58,7 @@ int init_vmxon_reg(struct vmxon_region_t *reg) {
...
@@ -57,6 +58,7 @@ int init_vmxon_reg(struct vmxon_region_t *reg) {
}
}
if
(
write_vmcs_rev_id_to_vmxon
(
reg
)
!=
0
)
{
if
(
write_vmcs_rev_id_to_vmxon
(
reg
)
!=
0
)
{
kfree
(
reg
->
va
);
return
-
1
;
return
-
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
proto/region/vxmon_reg.h
+
1
−
1
View file @
e88b6b87
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
struct
vmxon_region_t
{
struct
vmxon_region_t
{
unsigned
long
size
;
unsigned
long
size
;
void
*
va
;
void
*
va
;
void
*
pa
;
unsigned
long
long
pa
;
};
};
int
init_vmxon_reg
(
struct
vmxon_region_t
*
reg
);
int
init_vmxon_reg
(
struct
vmxon_region_t
*
reg
);
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