forked from Minki/linux
ARC fixlets for 5.12-rc7
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOXpuCuR6hedrdLCJadfx3eKKwl4FAmBuEnIACgkQadfx3eKK wl5KfhAAiYbaZ2Sv44Rd2SbjzNdrkG2b1SeVxX/KcFah5FfEtTNgKfQWaxmcEg5r spQ2aRr4hSjWMS4Ss7ia5etq/tZTnwDXwWVRNPpEH7/ws/ZX6B78VG9oo8qxJw54 g4sGBSkbGruIGEy+xVI71bcI4dF88tqv6CkfinMlfazEcXkc9lLEJM8KW/hUGiib jHtgDu2CdvXurHi+gVtVw5vd/Ew1sGH/sZ+eiBJZFSfAIerXxNcz/7pQYyn/yGls a1W0IN2qSGdQVSYL1+zm2sZU930QNQJxKfCh4RDp+fSc0h1EeMTyiRhJbTF7LM3b uE+Jw5EaCIQvuVX50aQFYpZtOYE9LzNv42WFttBuyJL9Ba0S8/9NcGPM21BK8mT/ NVKnWic/tSFiL7N+7cPmad9iPA4fY1HlSP27gH2NrQG5oGBGAl/1X1mQ28S0L7hS kKdN7peP9jFSHwlN55wFRX7Z03KWOfkkgZikRdb7Up8vsUaPA7BtSfnvcTrfwEno bUBR/nLj12vWpdL7D0G/+f9DKqDT4jYpQsZI7L7wePk+b+pzTEZrjkCG3BEMelNi W2bQsoLip9twVn/SAZPvqCLwTecM6HW2M7n1rIHtgzI94O8wqIXBWSQLnub8Ujdl uyQ+FBK4WqyXycNw80CEhU7y9HV5XrJZnow24YyHIQ9M38zdyaU= =LkpI -----END PGP SIGNATURE----- Merge tag 'arc-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixlets from Vineet Gupta: "A few straggler fixes for ARC" * tag 'arc-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: treewide: avoid the pointer addition with NULL pointer arc: kernel: Return -EFAULT if copy_to_user() fails ARC: haps: bump memory to 1 GB
This commit is contained in:
commit
454859c552
@ -16,7 +16,7 @@
|
||||
memory {
|
||||
device_type = "memory";
|
||||
/* CONFIG_LINUX_RAM_BASE needs to match low mem start */
|
||||
reg = <0x0 0x80000000 0x0 0x20000000 /* 512 MB low mem */
|
||||
reg = <0x0 0x80000000 0x0 0x40000000 /* 1 GB low mem */
|
||||
0x1 0x00000000 0x0 0x40000000>; /* 1 GB highmem */
|
||||
};
|
||||
|
||||
|
@ -96,7 +96,7 @@ stash_usr_regs(struct rt_sigframe __user *sf, struct pt_regs *regs,
|
||||
sizeof(sf->uc.uc_mcontext.regs.scratch));
|
||||
err |= __copy_to_user(&sf->uc.uc_sigmask, set, sizeof(sigset_t));
|
||||
|
||||
return err;
|
||||
return err ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static int restore_usr_regs(struct pt_regs *regs, struct rt_sigframe __user *sf)
|
||||
@ -110,7 +110,7 @@ static int restore_usr_regs(struct pt_regs *regs, struct rt_sigframe __user *sf)
|
||||
&(sf->uc.uc_mcontext.regs.scratch),
|
||||
sizeof(sf->uc.uc_mcontext.regs.scratch));
|
||||
if (err)
|
||||
return err;
|
||||
return -EFAULT;
|
||||
|
||||
set_current_blocked(&set);
|
||||
regs->bta = uregs.scratch.bta;
|
||||
|
@ -187,25 +187,26 @@ static void init_unwind_table(struct unwind_table *table, const char *name,
|
||||
const void *table_start, unsigned long table_size,
|
||||
const u8 *header_start, unsigned long header_size)
|
||||
{
|
||||
const u8 *ptr = header_start + 4;
|
||||
const u8 *end = header_start + header_size;
|
||||
|
||||
table->core.pc = (unsigned long)core_start;
|
||||
table->core.range = core_size;
|
||||
table->init.pc = (unsigned long)init_start;
|
||||
table->init.range = init_size;
|
||||
table->address = table_start;
|
||||
table->size = table_size;
|
||||
|
||||
/* See if the linker provided table looks valid. */
|
||||
if (header_size <= 4
|
||||
|| header_start[0] != 1
|
||||
|| (void *)read_pointer(&ptr, end, header_start[1]) != table_start
|
||||
|| header_start[2] == DW_EH_PE_omit
|
||||
|| read_pointer(&ptr, end, header_start[2]) <= 0
|
||||
|| header_start[3] == DW_EH_PE_omit)
|
||||
header_start = NULL;
|
||||
|
||||
/* To avoid the pointer addition with NULL pointer.*/
|
||||
if (header_start != NULL) {
|
||||
const u8 *ptr = header_start + 4;
|
||||
const u8 *end = header_start + header_size;
|
||||
/* See if the linker provided table looks valid. */
|
||||
if (header_size <= 4
|
||||
|| header_start[0] != 1
|
||||
|| (void *)read_pointer(&ptr, end, header_start[1])
|
||||
!= table_start
|
||||
|| header_start[2] == DW_EH_PE_omit
|
||||
|| read_pointer(&ptr, end, header_start[2]) <= 0
|
||||
|| header_start[3] == DW_EH_PE_omit)
|
||||
header_start = NULL;
|
||||
}
|
||||
table->hdrsz = header_size;
|
||||
smp_wmb();
|
||||
table->header = header_start;
|
||||
|
Loading…
Reference in New Issue
Block a user