Skip to content

Commit

Permalink
kINT: P_LKRG_JUMP_LABEL_STEXT_DEBUG: bump log level
Browse files Browse the repository at this point in the history
... for better debuggability. If non standard P_LKRG_JUMP_LABEL_STEXT_DEBUG
is enabled, it means that LKRG is being actively debugged.
In that case, we want to avoid unnecessary noise.
  • Loading branch information
Adam-pi3 committed Oct 24, 2023
1 parent 617cc87 commit 687c479
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/integrity_timer/p_integrity_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ void p_check_integrity(struct work_struct *p_work) {
for (p_tmp = 0; p_tmp < p_db.kernel_stext.p_size; p_tmp++) {
if (p_str2[p_tmp] != p_str1[p_tmp]) {
sprint_symbol_no_offset(p_eh_buf,(unsigned long)((unsigned long)p_db.kernel_stext.p_addr+(unsigned long)p_tmp));
p_print_log(P_LOG_WATCH, "copy[0x%x] vs now[0x%x] offset[%d | 0x%x] symbol[%s]",
p_print_log(P_LOG_ISSUE, "copy[0x%x] vs now[0x%x] offset[%d | 0x%x] symbol[%s]",
p_str2[p_tmp],
p_str1[p_tmp],
p_tmp,
Expand Down

2 comments on commit 687c479

@solardiz
Copy link
Contributor

Choose a reason for hiding this comment

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

@Adam-pi3 I dislike us making such hacks. I think we should instead introduce a different P_LOG_* macro for them, which would use a higher kernel log severity yet a non-misleading message - that is, would not say ISSUE on something that isn't.

@Adam-pi3
Copy link
Collaborator Author

@Adam-pi3 Adam-pi3 commented on 687c479 Oct 25, 2023

Choose a reason for hiding this comment

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

Hm... different P_LOG_* sounds reasonable. Although, there are more places in the code for such behavior (e.g., OFF flag debugging). However, before such bigger review happens it really helps me when it is at least ISSUE and doesn't require me to always edit the source code for each code-base.

Please sign in to comment.