The following issues were found

arch/powerpc/kvm/booke.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 2210 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              			max_ivor = i;

		handler_len = handler[i + 1] - handler[i];
		memcpy((void *)kvmppc_booke_handlers + ivor[i],
		       (void *)handler[i], handler_len);
	}

	handler_len = handler[max_ivor + 1] - handler[max_ivor];
	flush_icache_range(kvmppc_booke_handlers, kvmppc_booke_handlers +

            

Reported by FlawFinder.

arch/powerpc/kvm/e500.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 526 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              			max_ivor = i;

		handler_len = handler[i + 1] - handler[i];
		memcpy((void *)kvmppc_booke_handlers + ivor[i],
		       (void *)handler[i], handler_len);
	}
	handler_len = handler[max_ivor + 1] - handler[max_ivor];
	flush_icache_range(kvmppc_booke_handlers, kvmppc_booke_handlers +
			   ivor[max_ivor] + handler_len);

            

Reported by FlawFinder.

arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
1 issues
syntax error: { . port_names
Error

Line: 97

              };

static struct dsa_chip_data rd88f5181l_ge_switch_chip_data = {
	.port_names[0]	= "lan2",
	.port_names[1]	= "lan1",
	.port_names[2]	= "wan",
	.port_names[3]	= "cpu",
	.port_names[5]	= "lan4",
	.port_names[7]	= "lan3",

            

Reported by Cppcheck.

arch/powerpc/kernel/smp.c
1 issues
Using argument flags that points at uninitialized variable flags
Error

Line: 410 CWE codes: 908

              
static void nmi_ipi_lock_start(unsigned long *flags)
{
	raw_local_irq_save(*flags);
	hard_irq_disable();
	while (atomic_cmpxchg(&__nmi_ipi_lock, 0, 1) == 1) {
		raw_local_irq_restore(*flags);
		spin_until_cond(atomic_read(&__nmi_ipi_lock) == 0);
		raw_local_irq_save(*flags);

            

Reported by Cppcheck.

arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
1 issues
syntax error: { . port_names
Error

Line: 96

              };

static struct dsa_chip_data rd88f5181l_fxo_switch_chip_data = {
	.port_names[0]	= "lan2",
	.port_names[1]	= "lan1",
	.port_names[2]	= "wan",
	.port_names[3]	= "cpu",
	.port_names[5]	= "lan4",
	.port_names[7]	= "lan3",

            

Reported by Cppcheck.

arch/powerpc/lib/code-patching.c
1 issues
Subtracting pointers that point to different objects
Error

Line: 724 CWE codes: 570

              			    ppc_inst_prefix(OP_PREFIX << 26, 0x00000000),
			    code_patching_test1);

	check(!memcmp(code_patching_test1,
		      code_patching_test1_expected,
		      sizeof(unsigned int) *
		      (end_code_patching_test1 - code_patching_test1)));
}
#else

            

Reported by Cppcheck.

arch/powerpc/kernel/signal_64.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 66 Column: 2 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              	void __user *puc;
	struct siginfo info;
	/* New 64 bit little-endian ABI allows redzone of 512 bytes below sp */
	char abigap[USER_REDZONE_SIZE];
} __attribute__ ((aligned (16)));

/*
 * This computes a quad word aligned pointer inside the vmx_reserve array
 * element. For historical reasons sigcontext might not be quad word aligned,

            

Reported by FlawFinder.

arch/powerpc/lib/pmem.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 84 Column: 2 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              {
	unsigned long start = (unsigned long) dest;

	memcpy(dest, src, size);
	clean_pmem_range(start, start + size);
}
EXPORT_SYMBOL(memcpy_flushcache);

void memcpy_page_flushcache(char *to, struct page *page, size_t offset,

            

Reported by FlawFinder.

arch/alpha/kernel/sys_alcor.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 188 Column: 9 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              static int
alcor_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{
	static char irq_tab[7][5] = {
		/*INT    INTA   INTB   INTC   INTD */
		/* note: IDSEL 17 is XLT only */
		{16+13, 16+13, 16+13, 16+13, 16+13},	/* IdSel 17,  TULIP  */
		{ 16+8,  16+8,  16+9, 16+10, 16+11},	/* IdSel 18,  slot 0 */
		{16+16, 16+16, 16+17, 16+18, 16+19},	/* IdSel 19,  slot 3 */

            

Reported by FlawFinder.

arch/powerpc/lib/rheap.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 64 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              	if (info->max_blocks > 0) {

		/* copy old block area */
		memcpy(block, info->block,
		       sizeof(rh_block_t) * info->max_blocks);

		delta = (char *)block - (char *)info->block;

		/* and fixup list pointers */

            

Reported by FlawFinder.