mirror of https://gitee.com/openkylin/linux.git
- fix coredumps on 64bit kernels
- fix for alignment bugs preventing booting - fix checking for failed irq_alloc_desc calls -----BEGIN PGP SIGNATURE----- iQJOBAABCAA4FiEEbt46xwy6kEcDOXoUeZbBVTGwZHAFAmABo3MaHHRzYm9nZW5k QGFscGhhLmZyYW5rZW4uZGUACgkQeZbBVTGwZHDNrRAAgDNLFY5SYFsVUTJm/Lad LfKWUmeMTeFGpmE6a4gdNt1HTyO/aPcpQOmlm5sle2R3UmoWfs0pCsN67m7EQITQ z3ZKx4bUS/VsMUqJQW9/eBgsAvQFhZH1gPtATigdkpF9l/IDKaQ4oQCauU80bLbg fpoX8wMS7UVJskHMUXw/Y67JWjeivhOet6Dg1/3zM55RF25d+O9HM0mNRTfGKDdI GBnPTbLj8f74E/mq9khdfVI9Au7SUc22UtDxrHdJzegBa9aULen69I+43LBWK7QK fqbxxD3YmTpEzgTs7fbIKd76j4qQ5b6gLPeOmDa62GJu1TCNi5rWXQ2bN3RDd8zP tGQOWMPgqq3UnT//YhNdw7M2+a3j1naXRWMFo0dDENkxWFg285bj8hjmcBqPhSVP dz9ycRdS38bp4jD0vnnkHaMSVryS9Q2TJ29kKI5CT85DcWyrShh+gjtH9DFsDLNa o04ED+f4RqMMA49+eBHSp0extZ/958OpvWG6lq5k7wgDPGVFLg1fvwFhLD17G3SO DTfj2vlL64zucDQDFle08LyNeTM5xGy0EL+vvEWCqxY5Q48XtfIxjg6vQKTxFVba BqwENIf0fgMBtG5YENbpkwUd9ZRpv+au0Br6+nlwYdbodK4Da/RpfgrAY/7ofMuX mS6chzvsewxKBjAxKpWWSBc= =Vkor -----END PGP SIGNATURE----- Merge tag 'mips_fixes_5.11.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: - fix coredumps on 64bit kernels - fix for alignment bugs preventing booting - fix checking for failed irq_alloc_desc calls * tag 'mips_fixes_5.11.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: OCTEON: fix unreachable code in octeon_irq_init_ciu MIPS: relocatable: fix possible boot hangup with KASLR enabled MIPS: Fix malformed NT_FILE and NT_SIGINFO in 32bit coredumps MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB
This commit is contained in:
commit
f288c89562
|
@ -13,6 +13,7 @@
|
|||
#include <linux/libfdt.h>
|
||||
|
||||
#include <asm/addrspace.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
/*
|
||||
* These two variables specify the free mem region
|
||||
|
@ -117,7 +118,7 @@ void decompress_kernel(unsigned long boot_heap_start)
|
|||
dtb_size = fdt_totalsize((void *)&__appended_dtb);
|
||||
|
||||
/* last four bytes is always image size in little endian */
|
||||
image_size = le32_to_cpup((void *)&__image_end - 4);
|
||||
image_size = get_unaligned_le32((void *)&__image_end - 4);
|
||||
|
||||
/* copy dtb to where the booted kernel will expect it */
|
||||
memcpy((void *)VMLINUX_LOAD_ADDRESS_ULL + image_size,
|
||||
|
|
|
@ -1444,7 +1444,7 @@ static void octeon_irq_setup_secondary_ciu2(void)
|
|||
static int __init octeon_irq_init_ciu(
|
||||
struct device_node *ciu_node, struct device_node *parent)
|
||||
{
|
||||
unsigned int i, r;
|
||||
int i, r;
|
||||
struct irq_chip *chip;
|
||||
struct irq_chip *chip_edge;
|
||||
struct irq_chip *chip_mbox;
|
||||
|
|
|
@ -103,4 +103,11 @@ jiffies_to_old_timeval32(unsigned long jiffies, struct old_timeval32 *value)
|
|||
#undef ns_to_kernel_old_timeval
|
||||
#define ns_to_kernel_old_timeval ns_to_old_timeval32
|
||||
|
||||
/*
|
||||
* Some data types as stored in coredump.
|
||||
*/
|
||||
#define user_long_t compat_long_t
|
||||
#define user_siginfo_t compat_siginfo_t
|
||||
#define copy_siginfo_to_external copy_siginfo_to_external32
|
||||
|
||||
#include "../../../fs/binfmt_elf.c"
|
||||
|
|
|
@ -106,4 +106,11 @@ jiffies_to_old_timeval32(unsigned long jiffies, struct old_timeval32 *value)
|
|||
#undef ns_to_kernel_old_timeval
|
||||
#define ns_to_kernel_old_timeval ns_to_old_timeval32
|
||||
|
||||
/*
|
||||
* Some data types as stored in coredump.
|
||||
*/
|
||||
#define user_long_t compat_long_t
|
||||
#define user_siginfo_t compat_siginfo_t
|
||||
#define copy_siginfo_to_external copy_siginfo_to_external32
|
||||
|
||||
#include "../../../fs/binfmt_elf.c"
|
||||
|
|
|
@ -187,8 +187,14 @@ static int __init relocate_exception_table(long offset)
|
|||
static inline __init unsigned long rotate_xor(unsigned long hash,
|
||||
const void *area, size_t size)
|
||||
{
|
||||
size_t i;
|
||||
unsigned long *ptr = (unsigned long *)area;
|
||||
const typeof(hash) *ptr = PTR_ALIGN(area, sizeof(hash));
|
||||
size_t diff, i;
|
||||
|
||||
diff = (void *)ptr - area;
|
||||
if (unlikely(size < diff + sizeof(hash)))
|
||||
return hash;
|
||||
|
||||
size = ALIGN_DOWN(size - diff, sizeof(hash));
|
||||
|
||||
for (i = 0; i < size / sizeof(hash); i++) {
|
||||
/* Rotate by odd number of bits and XOR. */
|
||||
|
|
Loading…
Reference in New Issue