File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ static __always_inline void *patch_map(void *addr, const unsigned int fixmap)
54
54
BUG_ON (!page );
55
55
56
56
return (void * )set_fixmap_offset (fixmap , page_to_phys (page ) +
57
- ( uintaddr & ~ PAGE_MASK ));
57
+ offset_in_page ( addr ));
58
58
}
59
59
60
60
static void patch_unmap (int fixmap )
@@ -65,8 +65,8 @@ NOKPROBE_SYMBOL(patch_unmap);
65
65
66
66
static int __patch_insn_set (void * addr , u8 c , size_t len )
67
67
{
68
+ bool across_pages = (offset_in_page (addr ) + len ) > PAGE_SIZE ;
68
69
void * waddr = addr ;
69
- bool across_pages = (((uintptr_t )addr & ~PAGE_MASK ) + len ) > PAGE_SIZE ;
70
70
71
71
/*
72
72
* Only two pages can be mapped at a time for writing.
@@ -102,8 +102,8 @@ NOKPROBE_SYMBOL(__patch_insn_set);
102
102
103
103
static int __patch_insn_write (void * addr , const void * insn , size_t len )
104
104
{
105
+ bool across_pages = (offset_in_page (addr ) + len ) > PAGE_SIZE ;
105
106
void * waddr = addr ;
106
- bool across_pages = (((uintptr_t ) addr & ~PAGE_MASK ) + len ) > PAGE_SIZE ;
107
107
int ret ;
108
108
109
109
/*
You can’t perform that action at this time.
0 commit comments