Commit a84f24230c137a4e0ab14185e9175798ca1b0376
1 parent
49e4e15619
tile: map data region shadow of kernel as R/W
This is necessary for things like reading /proc/kcore, doing ftrace, etc. It happens by default when using huge pages to map the kernel data, but not when using small pages. Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
Showing 1 changed file with 5 additions and 2 deletions Side-by-side Diff
arch/tile/mm/init.c
... | ... | @@ -233,9 +233,12 @@ |
233 | 233 | if (kdata_huge) |
234 | 234 | return construct_pgprot(PAGE_KERNEL, PAGE_HOME_HASH); |
235 | 235 | |
236 | - /* We map the aliased pages of permanent text inaccessible. */ | |
236 | + /* | |
237 | + * We map the aliased pages of permanent text so we can | |
238 | + * update them if necessary, for ftrace, etc. | |
239 | + */ | |
237 | 240 | if (address < (ulong) _sinittext - CODE_DELTA) |
238 | - return PAGE_NONE; | |
241 | + return construct_pgprot(PAGE_KERNEL, PAGE_HOME_HASH); | |
239 | 242 | |
240 | 243 | /* We map read-only data non-coherent for performance. */ |
241 | 244 | if ((address >= (ulong) __start_rodata && |