Skip to content

Commit

Permalink
parisc: Remap hugepage-aligned pages in set_kernel_text_rw()
Browse files Browse the repository at this point in the history
commit dfbaecb upstream.

The alternative coding patch for parisc in kernel 4.20 broke booting
machines with PA8500-PA8700 CPUs. The problem is, that for such machines
the parisc kernel automatically utilizes huge pages to access kernel
text code, but the set_kernel_text_rw() function, which is used shortly
before applying any alternative patches, didn't used the correctly
hugepage-aligned addresses to remap the kernel text read-writeable.

Fixes: 3847dab ("parisc: Add alternative coding infrastructure")
Cc: <stable@vger.kernel.org>	[4.20]
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Helge Deller authored and Greg Kroah-Hartman committed Jan 9, 2019
1 parent f6f21f8 commit ff96e6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/parisc/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,8 @@ static void __init map_pages(unsigned long start_vaddr,

void __init set_kernel_text_rw(int enable_read_write)
{
unsigned long start = (unsigned long)__init_begin;
unsigned long end = (unsigned long)_etext;
unsigned long start = (unsigned long) _text;
unsigned long end = (unsigned long) &data_start;

map_pages(start, __pa(start), end-start,
PAGE_KERNEL_RWX, enable_read_write ? 1:0);
Expand Down

0 comments on commit ff96e6a

Please sign in to comment.