The following issues were found
arch/sparc/kernel/adi_64.c
1 issues
Line: 69
Column: 10
CWE codes:
126
break;
}
plen = strlen(prop) + 1;
prop += plen;
len -= plen;
}
if (!adi_state.enabled)
Reported by FlawFinder.
arch/sparc/kernel/apc.c
1 issues
Line: 49
Column: 29
CWE codes:
126
*/
static int __init apc_setup(char *str)
{
if(!strncmp(str, "noidle", strlen("noidle"))) {
apc_no_idle = 1;
return 1;
}
return 0;
}
Reported by FlawFinder.
arch/mips/include/asm/mips-cpc.h
1 issues
Line: 81
Column: 28
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
CPS_ACCESSOR_RW(cpc, sz, MIPS_CPC_COCB_OFS + off, co_##name)
/* CPC_ACCESS - Control core/IOCU access to CPC registers prior to CM 3 */
CPC_ACCESSOR_RW(32, 0x000, access)
/* CPC_SEQDEL - Configure delays between command sequencer steps */
CPC_ACCESSOR_RW(32, 0x008, seqdel)
/* CPC_RAIL - Configure the delay from rail power-up to stability */
Reported by FlawFinder.
arch/mips/include/asm/mips-cm.h
1 issues
Line: 147
Column: 28
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
#define CM_GCR_BASE_CMDEFTGT_IOCU1 3
/* GCR_ACCESS - Controls core/IOCU access to GCRs */
GCR_ACCESSOR_RW(32, 0x020, access)
#define CM_GCR_ACCESS_ACCESSEN GENMASK(7, 0)
/* GCR_REV - Indicates the Coherence Manager revision */
GCR_ACCESSOR_RO(32, 0x030, rev)
#define CM_GCR_REV_MAJOR GENMASK(15, 8)
Reported by FlawFinder.
arch/sparc/kernel/cpumap.c
1 issues
Line: 202
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return NULL;
new_tree->total_nodes = n;
memcpy(&new_tree->level, tmp_level, sizeof(tmp_level));
prev_cpu = cpu = cpumask_first(cpu_online_mask);
/* Initialize all levels in the tree with the first CPU */
for (level = CPUINFO_LVL_PROC; level >= CPUINFO_LVL_ROOT; level--) {
Reported by FlawFinder.
arch/mips/include/asm/mach-rc32434/rb.h
1 issues
Line: 62
Column: 11
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
struct korina_device {
char *name;
unsigned char mac[6];
struct net_device *dev;
};
struct mpmc_device {
unsigned char state;
Reported by FlawFinder.
arch/sparc/kernel/ebus.c
1 issues
Line: 108
Column: 7
CWE codes:
126
return -EINVAL;
if ((p->flags & EBUS_DMA_FLAG_USE_EBDMA_HANDLER) && !p->callback)
return -EINVAL;
if (!strlen(p->name))
return -EINVAL;
__ebus_dma_reset(p, 1);
csr = EBDMA_CSR_BURST_SZ_16 | EBDMA_CSR_EN_CNT;
Reported by FlawFinder.
arch/sparc/kernel/idprom.c
1 issues
Line: 42
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
static void __init display_system_type(unsigned char machtype)
{
char sysname[128];
register int i;
for (i = 0; i < ARRAY_SIZE(Sun_Machines); i++) {
if (Sun_Machines[i].id_machtype == machtype) {
if (machtype != (SM_SUN4M_OBP | 0x00) ||
Reported by FlawFinder.
arch/mips/include/asm/mach-loongson64/topology.h
1 issues
Line: 17
Column: 17
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
#define cpumask_of_pcibus(bus) (cpu_online_mask)
extern unsigned char __node_distances[MAX_NUMNODES][MAX_NUMNODES];
#define node_distance(from, to) (__node_distances[(from)][(to)])
#endif
Reported by FlawFinder.
arch/mips/include/asm/mach-ip27/topology.h
1 issues
Line: 25
Column: 17
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
#define cpumask_of_pcibus(bus) (cpumask_of_node(pcibus_to_node(bus)))
extern unsigned char __node_distances[MAX_NUMNODES][MAX_NUMNODES];
#define node_distance(from, to) (__node_distances[(from)][(to)])
#include <asm-generic/topology.h>
Reported by FlawFinder.