Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d494a57

Browse files
author
Fox Snowpatch
committedFeb 13, 2024
1 parent 5165c17 commit d494a57

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎arch/powerpc/lib/code-patching.c

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright 2008 Michael Ellerman, IBM Corporation.
44
*/
55

6+
#include <linux/kasan.h>
67
#include <linux/kprobes.h>
78
#include <linux/mmu_context.h>
89
#include <linux/random.h>
@@ -377,6 +378,7 @@ static int __patch_instructions(u32 *patch_addr, u32 *code, size_t len, bool rep
377378
unsigned long start = (unsigned long)patch_addr;
378379

379380
/* Repeat instruction */
381+
kasan_disable_current();
380382
if (repeat_instr) {
381383
ppc_inst_t instr = ppc_inst_read(code);
382384

@@ -392,6 +394,7 @@ static int __patch_instructions(u32 *patch_addr, u32 *code, size_t len, bool rep
392394
} else {
393395
memcpy(patch_addr, code, len);
394396
}
397+
kasan_enable_current();
395398

396399
smp_wmb(); /* smp write barrier */
397400
flush_icache_range(start, start + len);

0 commit comments

Comments
 (0)
Please sign in to comment.