We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab51392 commit 27747f8Copy full SHA for 27747f8
arch/x86/kernel/hw_breakpoint.c
@@ -180,7 +180,11 @@ int arch_check_bp_in_kernelspace(struct perf_event *bp)
180
va = info->address;
181
len = bp->attr.bp_len;
182
183
- return (va >= TASK_SIZE) && ((va + len - 1) >= TASK_SIZE);
+ /*
184
+ * We don't need to worry about va + len - 1 overflowing:
185
+ * we already require that va is aligned to a multiple of len.
186
+ */
187
+ return (va >= TASK_SIZE_MAX) || ((va + len - 1) >= TASK_SIZE_MAX);
188
}
189
190
int arch_bp_generic_fields(int x86_len, int x86_type,
0 commit comments