|
13 | 13 | #include <linux/seq_file.h>
|
14 | 14 | #include <linux/proc_fs.h>
|
15 | 15 | #include <linux/uaccess.h>
|
| 16 | +#include <linux/ratelimit.h> |
16 | 17 | #include <asm/alignment.h>
|
17 | 18 | #include <asm/processor.h>
|
18 | 19 |
|
@@ -95,13 +96,13 @@ int set_unalign_ctl(struct task_struct *tsk, unsigned int val)
|
95 | 96 | void unaligned_fixups_notify(struct task_struct *tsk, insn_size_t insn,
|
96 | 97 | struct pt_regs *regs)
|
97 | 98 | {
|
98 |
| - if (user_mode(regs) && (se_usermode & UM_WARN) && printk_ratelimit()) |
99 |
| - pr_notice("Fixing up unaligned userspace access " |
| 99 | + if (user_mode(regs) && (se_usermode & UM_WARN)) |
| 100 | + pr_notice_ratelimited("Fixing up unaligned userspace access " |
100 | 101 | "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
|
101 | 102 | tsk->comm, task_pid_nr(tsk),
|
102 | 103 | (void *)instruction_pointer(regs), insn);
|
103 |
| - else if (se_kernmode_warn && printk_ratelimit()) |
104 |
| - pr_notice("Fixing up unaligned kernel access " |
| 104 | + else if (se_kernmode_warn) |
| 105 | + pr_notice_ratelimited("Fixing up unaligned kernel access " |
105 | 106 | "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
|
106 | 107 | tsk->comm, task_pid_nr(tsk),
|
107 | 108 | (void *)instruction_pointer(regs), insn);
|
|
0 commit comments