Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

- keep the tail of an unaligned initrd reserved

- adjust ftrace_make_call() to deal with the relative nature of PLTs

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64/module: ftrace: deal with place relative nature of PLTs
arm64: mm: Ensure tail of unaligned initrd is reserved

+8 -3
+7 -2
arch/arm64/kernel/ftrace.c
··· 103 103 * to be revisited if support for multiple ftrace entry points 104 104 * is added in the future, but for now, the pr_err() below 105 105 * deals with a theoretical issue only. 106 + * 107 + * Note that PLTs are place relative, and plt_entries_equal() 108 + * checks whether they point to the same target. Here, we need 109 + * to check if the actual opcodes are in fact identical, 110 + * regardless of the offset in memory so use memcmp() instead. 106 111 */ 107 112 trampoline = get_plt_entry(addr, mod->arch.ftrace_trampoline); 108 - if (!plt_entries_equal(mod->arch.ftrace_trampoline, 109 - &trampoline)) { 113 + if (memcmp(mod->arch.ftrace_trampoline, &trampoline, 114 + sizeof(trampoline))) { 110 115 if (plt_entry_is_initialized(mod->arch.ftrace_trampoline)) { 111 116 pr_err("ftrace: far branches to multiple entry points unsupported inside a single module\n"); 112 117 return -EINVAL;
+1 -1
arch/arm64/mm/init.c
··· 363 363 * Otherwise, this is a no-op 364 364 */ 365 365 u64 base = phys_initrd_start & PAGE_MASK; 366 - u64 size = PAGE_ALIGN(phys_initrd_size); 366 + u64 size = PAGE_ALIGN(phys_initrd_start + phys_initrd_size) - base; 367 367 368 368 /* 369 369 * We can only add back the initrd memory if we don't end up