* drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:158:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments...
@ 2021-12-08 0:10 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-12-08 0:10 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 38177 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Mario Limonciello <mario.limonciello@dell.com>
CC: Hans de Goede <hdegoede@redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cd8c917a56f20f48748dd43d9ae3caff51d5b987
commit: f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28 platform/x86: Move all dell drivers to their own subdirectory
date: 10 months ago
:::::: branch date: 23 hours ago
:::::: commit date: 10 months ago
config: x86_64-randconfig-c007-20211202 (https://download.01.org/0day-ci/archive/20211208/202112080821.gP9oyZCP-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 4b553297ef3ee4dc2119d5429adf3072e90fac38)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/stat.c:207:9: note: Calling 'vfs_statx'
return vfs_statx(dfd, filename, flags | AT_NO_AUTOMOUNT,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/stat.c:173:2: note: Taking false branch
if (flags & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT | AT_EMPTY_PATH |
^
fs/stat.c:177:2: note: Taking false branch
if (!(flags & AT_SYMLINK_NOFOLLOW))
^
fs/stat.c:179:2: note: Taking false branch
if (!(flags & AT_NO_AUTOMOUNT))
^
fs/stat.c:181:2: note: Taking false branch
if (flags & AT_EMPTY_PATH)
^
fs/stat.c:186:6: note: Assuming 'error' is 0
if (error)
^~~~~
fs/stat.c:186:2: note: Taking false branch
if (error)
^
fs/stat.c:189:10: note: Calling 'vfs_getattr'
error = vfs_getattr(&path, stat, request_mask, flags);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/stat.c:122:6: note: Assuming 'retval' is not equal to 0
if (retval)
^~~~~~
fs/stat.c:122:2: note: Taking true branch
if (retval)
^
fs/stat.c:123:3: note: Returning without writing to '->result_mask'
return retval;
^
fs/stat.c:189:10: note: Returning from 'vfs_getattr'
error = vfs_getattr(&path, stat, request_mask, flags);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/stat.c:191:20: note: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
stat->result_mask |= STATX_MNT_ID;
~~~~~~~~~~~~~~~~~ ^
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
9 warnings generated.
drivers/char/tpm/tpm_tis_core.c:455:2: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]
rc = tpm_tis_write32(priv, TPM_INT_ENABLE(priv->locality), intmask);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/char/tpm/tpm_tis_core.c:455:2: note: Value stored to 'rc' is never read
rc = tpm_tis_write32(priv, TPM_INT_ENABLE(priv->locality), intmask);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 8 warnings (7 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (7 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (7 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (7 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (7 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (7 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (7 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
9 warnings generated.
drivers/char/tpm/tpm_infineon.c:172:3: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores]
status = tpm_data_in(RDFIFO);
^ ~~~~~~~~~~~~~~~~~~~
drivers/char/tpm/tpm_infineon.c:172:3: note: Value stored to 'status' is never read
status = tpm_data_in(RDFIFO);
^ ~~~~~~~~~~~~~~~~~~~
Suppressed 8 warnings (7 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (7 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (7 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (6 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings generated.
>> drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:158:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier,
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:158:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier,
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:160:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier, ";");
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:160:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier, ";");
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:166:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wmi_priv.enumeration_data[instance_id].possible_values,
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:166:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wmi_priv.enumeration_data[instance_id].possible_values,
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:168:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wmi_priv.enumeration_data[instance_id].possible_values, ";");
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:168:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wmi_priv.enumeration_data[instance_id].possible_values, ";");
^~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
drivers/w1/slaves/w1_ds28e17.c:723:2: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(data->adapter.name, sl->name);
^~~~~~
drivers/w1/slaves/w1_ds28e17.c:723:2: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(data->adapter.name, sl->name);
^~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
14 warnings generated.
include/linux/skbuff.h:2071:2: warning: Dereference of null pointer [clang-analyzer-core.NullDereference]
WRITE_ONCE(next->prev, prev);
^
include/asm-generic/rwonce.h:61:2: note: expanded from macro 'WRITE_ONCE'
__WRITE_ONCE(x, val); \
^
include/asm-generic/rwonce.h:55:30: note: expanded from macro '__WRITE_ONCE'
*(volatile typeof(x) *)&(x) = (val); \
^
net/ipv6/ip6_output.c:1799:8: note: Calling '__skb_dequeue'
skb = __skb_dequeue(queue);
^~~~~~~~~~~~~~~~~~~~
include/linux/skbuff.h:2086:6: note: Assuming 'skb' is non-null
if (skb)
--
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
11 warnings generated.
Suppressed 11 warnings (10 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
drivers/media/tuners/r820t.c:1856:2: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]
rc = r820t_section(priv, compare_iq);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/tuners/r820t.c:1856:2: note: Value stored to 'rc' is never read
rc = r820t_section(priv, compare_iq);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
13 warnings generated.
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
13 warnings generated.
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
13 warnings generated.
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
13 warnings generated.
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
13 warnings generated.
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
13 warnings generated.
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
drivers/staging/comedi/drivers/das08.c:181:2: warning: Value stored to 'range' is never read [clang-analyzer-deadcode.DeadStores]
range = CR_RANGE(insn->chanspec);
^
drivers/staging/comedi/drivers/das08.c:181:2: note: Value stored to 'range' is never read
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
>> drivers/platform/x86/dell/dell-laptop.c:1596:4: warning: Value stored to 'unit' is never read [clang-analyzer-deadcode.DeadStores]
unit = KBD_TIMEOUT_SECONDS;
^ ~~~~~~~~~~~~~~~~~~~
drivers/platform/x86/dell/dell-laptop.c:1596:4: note: Value stored to 'unit' is never read
unit = KBD_TIMEOUT_SECONDS;
^ ~~~~~~~~~~~~~~~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
11 warnings generated.
Suppressed 11 warnings (11 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings generated.
Suppressed 10 warnings (10 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings generated.
Suppressed 10 warnings (10 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
11 warnings generated.
Suppressed 11 warnings (11 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings generated.
Suppressed 10 warnings (10 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings generated.
Suppressed 10 warnings (10 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
drivers/staging/comedi/drivers/das800.c:90:8: warning: Excessive padding in 'struct das800_board' (8 padding bytes, where 0 is optimal).
Optimal fields order:
name,
ai_range,
ai_speed,
resolution,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct das800_board {
~~~~~~~^~~~~~~~~~~~~~
drivers/staging/comedi/drivers/das800.c:90:8: note: Excessive padding in 'struct das800_board' (8 padding bytes, where 0 is optimal). Optimal fields order: name, ai_range, ai_speed, resolution, consider reordering the fields or adding explicit padding members
struct das800_board {
~~~~~~~^~~~~~~~~~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
11 warnings generated.
drivers/staging/comedi/drivers/dt2814.c:203:2: warning: Value stored to 'data' is never read [clang-analyzer-deadcode.DeadStores]
data = (hi << 4) | (lo >> 4);
^ ~~~~~~~~~~~~~~~~~~~~~
drivers/staging/comedi/drivers/dt2814.c:203:2: note: Value stored to 'data' is never read
data = (hi << 4) | (lo >> 4);
^ ~~~~~~~~~~~~~~~~~~~~~
drivers/staging/comedi/drivers/dt2814.c:244:2: warning: Value stored to 'i' is never read [clang-analyzer-deadcode.DeadStores]
i = inb(dev->iobase + DT2814_DATA);
^
drivers/staging/comedi/drivers/dt2814.c:244:2: note: Value stored to 'i' is never read
drivers/staging/comedi/drivers/dt2814.c:245:2: warning: Value stored to 'i' is never read [clang-analyzer-deadcode.DeadStores]
i = inb(dev->iobase + DT2814_DATA);
^
drivers/staging/comedi/drivers/dt2814.c:245:2: note: Value stored to 'i' is never read
Suppressed 8 warnings (6 in non-user code, 2 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
vim +158 drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 129
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 130 /**
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 131 * populate_enum_data() - Populate all properties of an instance under enumeration attribute
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 132 * @enumeration_obj: ACPI object with enumeration data
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 133 * @instance_id: The instance to enumerate
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 134 * @attr_name_kobj: The parent kernel object
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 135 */
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 136 int populate_enum_data(union acpi_object *enumeration_obj, int instance_id,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 137 struct kobject *attr_name_kobj)
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 138 {
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 139 int i, next_obj, value_modifier_count, possible_values_count;
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 140
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 141 wmi_priv.enumeration_data[instance_id].attr_name_kobj = attr_name_kobj;
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 142 strlcpy_attr(wmi_priv.enumeration_data[instance_id].attribute_name,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 143 enumeration_obj[ATTR_NAME].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 144 strlcpy_attr(wmi_priv.enumeration_data[instance_id].display_name_language_code,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 145 enumeration_obj[DISPL_NAME_LANG_CODE].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 146 strlcpy_attr(wmi_priv.enumeration_data[instance_id].display_name,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 147 enumeration_obj[DISPLAY_NAME].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 148 strlcpy_attr(wmi_priv.enumeration_data[instance_id].default_value,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 149 enumeration_obj[DEFAULT_VAL].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 150 strlcpy_attr(wmi_priv.enumeration_data[instance_id].dell_modifier,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 151 enumeration_obj[MODIFIER].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 152
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 153 next_obj = MODIFIER + 1;
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 154
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 155 value_modifier_count = (uintptr_t)enumeration_obj[next_obj].string.pointer;
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 156
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 157 for (i = 0; i < value_modifier_count; i++) {
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 @158 strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 159 enumeration_obj[++next_obj].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 160 strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier, ";");
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 161 }
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 162
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 163 possible_values_count = (uintptr_t) enumeration_obj[++next_obj].string.pointer;
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 164
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 165 for (i = 0; i < possible_values_count; i++) {
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 166 strcat(wmi_priv.enumeration_data[instance_id].possible_values,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 167 enumeration_obj[++next_obj].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 168 strcat(wmi_priv.enumeration_data[instance_id].possible_values, ";");
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 169 }
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 170
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 171 return sysfs_create_group(attr_name_kobj, &enumeration_attr_group);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 172 }
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 173
:::::: The code@line 158 was first introduced by commit
:::::: e8a60aa7404bfef37705da5607c97737073ac38d platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems
:::::: TO: Divya Bharathi <divya.bharathi@dell.com>
:::::: CC: Hans de Goede <hdegoede@redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:158:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments...
@ 2021-12-17 13:35 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-12-17 13:35 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 40482 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Mario Limonciello <mario.limonciello@dell.com>
CC: Hans de Goede <hdegoede@redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6441998e2e37131b0a4c310af9156d79d3351c16
commit: f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28 platform/x86: Move all dell drivers to their own subdirectory
date: 11 months ago
:::::: branch date: 14 hours ago
:::::: commit date: 11 months ago
config: x86_64-randconfig-c007-20211202 (https://download.01.org/0day-ci/archive/20211217/202112172134.k3Tg6Pjk-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 4b553297ef3ee4dc2119d5429adf3072e90fac38)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
strcpy(uid->string, obj_desc->string.pointer);
^~~~~~
drivers/acpi/acpica/utids.c:292:4: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(next_id_string, cid_objects[i]->string.pointer);
^~~~~~
drivers/acpi/acpica/utids.c:292:4: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
strcpy(next_id_string, cid_objects[i]->string.pointer);
^~~~~~
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
drivers/iio/light/si1145.c:151:8: warning: Excessive padding in 'struct si1145_part_info' (14 padding bytes, where 6 is optimal).
Optimal fields order:
iio_info,
channels,
num_channels,
num_leds,
part,
uncompressed_meas_rate,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct si1145_part_info {
~~~~~~~^~~~~~~~~~~~~~~~~~
drivers/iio/light/si1145.c:151:8: note: Excessive padding in 'struct si1145_part_info' (14 padding bytes, where 6 is optimal). Optimal fields order: iio_info, channels, num_channels, num_leds, part, uncompressed_meas_rate, consider reordering the fields or adding explicit padding members
struct si1145_part_info {
~~~~~~~^~~~~~~~~~~~~~~~~~
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings generated.
>> drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:158:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier,
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:158:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier,
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:160:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier, ";");
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:160:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier, ";");
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:166:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wmi_priv.enumeration_data[instance_id].possible_values,
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:166:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wmi_priv.enumeration_data[instance_id].possible_values,
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:168:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wmi_priv.enumeration_data[instance_id].possible_values, ";");
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:168:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wmi_priv.enumeration_data[instance_id].possible_values, ";");
^~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
drivers/acpi/ac.c:259:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(acpi_device_name(device), ACPI_AC_DEVICE_NAME);
^~~~~~
drivers/acpi/ac.c:259:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
strcpy(acpi_device_name(device), ACPI_AC_DEVICE_NAME);
^~~~~~
drivers/acpi/ac.c:260:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(acpi_device_class(device), ACPI_AC_CLASS);
^~~~~~
drivers/acpi/ac.c:260:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
strcpy(acpi_device_class(device), ACPI_AC_CLASS);
^~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
drivers/mtd/mtdcore.c:657:3: warning: Value stored to 'error' is never read [clang-analyzer-deadcode.DeadStores]
error = 0;
^ ~
drivers/mtd/mtdcore.c:657:3: note: Value stored to 'error' is never read
error = 0;
^ ~
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings generated.
drivers/mtd/mtdconcat.c:67:4: warning: Value stored to 'size' is never read [clang-analyzer-deadcode.DeadStores]
size = 0;
^ ~
drivers/mtd/mtdconcat.c:67:4: note: Value stored to 'size' is never read
size = 0;
^ ~
drivers/mtd/mtdconcat.c:159:4: warning: Value stored to 'size' is never read [clang-analyzer-deadcode.DeadStores]
size = 0;
^ ~
drivers/mtd/mtdconcat.c:159:4: note: Value stored to 'size' is never read
size = 0;
^ ~
drivers/mtd/mtdconcat.c:492:4: warning: Value stored to 'size' is never read [clang-analyzer-deadcode.DeadStores]
size = 0;
^ ~
drivers/mtd/mtdconcat.c:492:4: note: Value stored to 'size' is never read
size = 0;
^ ~
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
--
7 warnings generated.
drivers/media/dvb-frontends/nxt6000.c:420:2: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores]
val = nxt6000_readreg(state, RF_AGC_STATUS);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/dvb-frontends/nxt6000.c:420:2: note: Value stored to 'val' is never read
val = nxt6000_readreg(state, RF_AGC_STATUS);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings generated.
drivers/misc/eeprom/idt_89hpesx.c:977:3: warning: Value stored to 'csraddr_len' is never read [clang-analyzer-deadcode.DeadStores]
csraddr_len = strnlen(csraddr_str, count);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/misc/eeprom/idt_89hpesx.c:977:3: note: Value stored to 'csraddr_len' is never read
csraddr_len = strnlen(csraddr_str, count);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 9 warnings (6 in non-user code, 3 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
>> drivers/platform/x86/dell/dell-laptop.c:1596:4: warning: Value stored to 'unit' is never read [clang-analyzer-deadcode.DeadStores]
unit = KBD_TIMEOUT_SECONDS;
^ ~~~~~~~~~~~~~~~~~~~
drivers/platform/x86/dell/dell-laptop.c:1596:4: note: Value stored to 'unit' is never read
unit = KBD_TIMEOUT_SECONDS;
^ ~~~~~~~~~~~~~~~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
11 warnings generated.
drivers/iio/imu/inv_mpu6050/inv_mpu_magn.c:290:5: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(str, orient);
^~~~~~
drivers/iio/imu/inv_mpu6050/inv_mpu_magn.c:290:5: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
strcpy(str, orient);
^~~~~~
drivers/iio/imu/inv_mpu6050/inv_mpu_magn.c:292:5: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(str, &orient[1]);
^~~~~~
drivers/iio/imu/inv_mpu6050/inv_mpu_magn.c:292:5: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
strcpy(str, &orient[1]);
^~~~~~
drivers/iio/imu/inv_mpu6050/inv_mpu_magn.c:295:5: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(&str[1], orient);
^~~~~~
drivers/iio/imu/inv_mpu6050/inv_mpu_magn.c:295:5: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
strcpy(&str[1], orient);
^~~~~~
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
9 warnings generated.
drivers/media/dvb-frontends/s5h1432.c:207:4: warning: Value stored to 'dvb_bandwidth' is never read [clang-analyzer-deadcode.DeadStores]
dvb_bandwidth = 6;
^ ~
drivers/media/dvb-frontends/s5h1432.c:207:4: note: Value stored to 'dvb_bandwidth' is never read
dvb_bandwidth = 6;
^ ~
drivers/media/dvb-frontends/s5h1432.c:211:4: warning: Value stored to 'dvb_bandwidth' is never read [clang-analyzer-deadcode.DeadStores]
dvb_bandwidth = 7;
^ ~
drivers/media/dvb-frontends/s5h1432.c:211:4: note: Value stored to 'dvb_bandwidth' is never read
dvb_bandwidth = 7;
^ ~
drivers/media/dvb-frontends/s5h1432.c:215:4: warning: Value stored to 'dvb_bandwidth' is never read [clang-analyzer-deadcode.DeadStores]
dvb_bandwidth = 8;
^ ~
drivers/media/dvb-frontends/s5h1432.c:215:4: note: Value stored to 'dvb_bandwidth' is never read
dvb_bandwidth = 8;
^ ~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
drivers/leds/leds-ss4200.c:363:2: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores]
status = pci_read_config_dword(dev, GPIO_CTRL, &gc);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/leds/leds-ss4200.c:363:2: note: Value stored to 'status' is never read
status = pci_read_config_dword(dev, GPIO_CTRL, &gc);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
vim +158 drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 129
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 130 /**
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 131 * populate_enum_data() - Populate all properties of an instance under enumeration attribute
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 132 * @enumeration_obj: ACPI object with enumeration data
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 133 * @instance_id: The instance to enumerate
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 134 * @attr_name_kobj: The parent kernel object
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 135 */
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 136 int populate_enum_data(union acpi_object *enumeration_obj, int instance_id,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 137 struct kobject *attr_name_kobj)
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 138 {
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 139 int i, next_obj, value_modifier_count, possible_values_count;
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 140
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 141 wmi_priv.enumeration_data[instance_id].attr_name_kobj = attr_name_kobj;
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 142 strlcpy_attr(wmi_priv.enumeration_data[instance_id].attribute_name,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 143 enumeration_obj[ATTR_NAME].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 144 strlcpy_attr(wmi_priv.enumeration_data[instance_id].display_name_language_code,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 145 enumeration_obj[DISPL_NAME_LANG_CODE].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 146 strlcpy_attr(wmi_priv.enumeration_data[instance_id].display_name,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 147 enumeration_obj[DISPLAY_NAME].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 148 strlcpy_attr(wmi_priv.enumeration_data[instance_id].default_value,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 149 enumeration_obj[DEFAULT_VAL].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 150 strlcpy_attr(wmi_priv.enumeration_data[instance_id].dell_modifier,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 151 enumeration_obj[MODIFIER].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 152
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 153 next_obj = MODIFIER + 1;
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 154
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 155 value_modifier_count = (uintptr_t)enumeration_obj[next_obj].string.pointer;
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 156
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 157 for (i = 0; i < value_modifier_count; i++) {
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 @158 strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 159 enumeration_obj[++next_obj].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 160 strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier, ";");
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 161 }
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 162
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 163 possible_values_count = (uintptr_t) enumeration_obj[++next_obj].string.pointer;
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 164
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 165 for (i = 0; i < possible_values_count; i++) {
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 166 strcat(wmi_priv.enumeration_data[instance_id].possible_values,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 167 enumeration_obj[++next_obj].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 168 strcat(wmi_priv.enumeration_data[instance_id].possible_values, ";");
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 169 }
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 170
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 171 return sysfs_create_group(attr_name_kobj, &enumeration_attr_group);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 172 }
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 173
:::::: The code@line 158 was first introduced by commit
:::::: e8a60aa7404bfef37705da5607c97737073ac38d platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems
:::::: TO: Divya Bharathi <divya.bharathi@dell.com>
:::::: CC: Hans de Goede <hdegoede@redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:158:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments...
@ 2021-12-08 2:34 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-12-08 2:34 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 37905 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Mario Limonciello <mario.limonciello@dell.com>
CC: Hans de Goede <hdegoede@redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cd8c917a56f20f48748dd43d9ae3caff51d5b987
commit: f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28 platform/x86: Move all dell drivers to their own subdirectory
date: 10 months ago
:::::: branch date: 26 hours ago
:::::: commit date: 10 months ago
config: x86_64-randconfig-c007-20211202 (https://download.01.org/0day-ci/archive/20211208/202112081026.MZc5V6YO-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 4b553297ef3ee4dc2119d5429adf3072e90fac38)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
23 warnings generated.
drivers/media/tuners/mxl5005s.c:2668:3: warning: Value stored to 'Fmax' is never read [clang-analyzer-deadcode.DeadStores]
Fmax = FmaxBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2668:3: note: Value stored to 'Fmax' is never read
Fmax = FmaxBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2669:3: warning: Value stored to 'Fmin' is never read [clang-analyzer-deadcode.DeadStores]
Fmin = FminBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2669:3: note: Value stored to 'Fmin' is never read
Fmin = FminBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2677:3: warning: Value stored to 'Fmax' is never read [clang-analyzer-deadcode.DeadStores]
Fmax = FmaxBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2677:3: note: Value stored to 'Fmax' is never read
Fmax = FmaxBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2678:3: warning: Value stored to 'Fmin' is never read [clang-analyzer-deadcode.DeadStores]
Fmin = FminBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2678:3: note: Value stored to 'Fmin' is never read
Fmin = FminBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2686:3: warning: Value stored to 'Fmax' is never read [clang-analyzer-deadcode.DeadStores]
Fmax = FmaxBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2686:3: note: Value stored to 'Fmax' is never read
Fmax = FmaxBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2687:3: warning: Value stored to 'Fmin' is never read [clang-analyzer-deadcode.DeadStores]
Fmin = FminBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2687:3: note: Value stored to 'Fmin' is never read
Fmin = FminBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2695:3: warning: Value stored to 'Fmax' is never read [clang-analyzer-deadcode.DeadStores]
Fmax = FmaxBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2695:3: note: Value stored to 'Fmax' is never read
Fmax = FmaxBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2696:3: warning: Value stored to 'Fmin' is never read [clang-analyzer-deadcode.DeadStores]
Fmin = FminBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2696:3: note: Value stored to 'Fmin' is never read
Fmin = FminBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2704:3: warning: Value stored to 'Fmax' is never read [clang-analyzer-deadcode.DeadStores]
Fmax = FmaxBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2704:3: note: Value stored to 'Fmax' is never read
Fmax = FmaxBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2705:3: warning: Value stored to 'Fmin' is never read [clang-analyzer-deadcode.DeadStores]
Fmin = FminBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2705:3: note: Value stored to 'Fmin' is never read
Fmin = FminBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2713:3: warning: Value stored to 'Fmax' is never read [clang-analyzer-deadcode.DeadStores]
Fmax = FmaxBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2713:3: note: Value stored to 'Fmax' is never read
Fmax = FmaxBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2714:3: warning: Value stored to 'Fmin' is never read [clang-analyzer-deadcode.DeadStores]
Fmin = FminBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2714:3: note: Value stored to 'Fmin' is never read
Fmin = FminBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2722:3: warning: Value stored to 'Fmax' is never read [clang-analyzer-deadcode.DeadStores]
Fmax = FmaxBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2722:3: note: Value stored to 'Fmax' is never read
Fmax = FmaxBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2723:3: warning: Value stored to 'Fmin' is never read [clang-analyzer-deadcode.DeadStores]
Fmin = FminBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2723:3: note: Value stored to 'Fmin' is never read
Fmin = FminBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2731:3: warning: Value stored to 'Fmax' is never read [clang-analyzer-deadcode.DeadStores]
Fmax = FmaxBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2731:3: note: Value stored to 'Fmax' is never read
Fmax = FmaxBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2732:3: warning: Value stored to 'Fmin' is never read [clang-analyzer-deadcode.DeadStores]
Fmin = FminBin ;
^ ~~~~~~~
drivers/media/tuners/mxl5005s.c:2732:3: note: Value stored to 'Fmin' is never read
Fmin = FminBin ;
^ ~~~~~~~
Suppressed 7 warnings (6 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings generated.
>> drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:158:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier,
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:158:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier,
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:160:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier, ";");
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:160:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier, ";");
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:166:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wmi_priv.enumeration_data[instance_id].possible_values,
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:166:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wmi_priv.enumeration_data[instance_id].possible_values,
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:168:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wmi_priv.enumeration_data[instance_id].possible_values, ";");
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:168:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wmi_priv.enumeration_data[instance_id].possible_values, ";");
^~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
15 warnings generated.
drivers/char/applicom.c:574:5: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = do_ac_read(i, buf, &st_loc, &mailbox);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/char/applicom.c:574:5: note: Value stored to 'ret' is never read
ret = do_ac_read(i, buf, &st_loc, &mailbox);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/char/applicom.c:734:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = -EFAULT;
^ ~~~~~~~
drivers/char/applicom.c:734:4: note: Value stored to 'ret' is never read
ret = -EFAULT;
^ ~~~~~~~
drivers/char/applicom.c:755:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = -EFAULT;
^ ~~~~~~~
drivers/char/applicom.c:755:4: note: Value stored to 'ret' is never read
ret = -EFAULT;
^ ~~~~~~~
drivers/char/applicom.c:781:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = -EFAULT;
^ ~~~~~~~
drivers/char/applicom.c:781:4: note: Value stored to 'ret' is never read
ret = -EFAULT;
^ ~~~~~~~
drivers/char/applicom.c:836:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = -ENOTTY;
^ ~~~~~~~
drivers/char/applicom.c:836:3: note: Value stored to 'ret' is never read
ret = -ENOTTY;
^ ~~~~~~~
Suppressed 10 warnings (6 in non-user code, 4 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
16 warnings generated.
net/bluetooth/bnep/core.c:641:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(req->device, dev->name);
^~~~~~
net/bluetooth/bnep/core.c:641:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
strcpy(req->device, dev->name);
^~~~~~
net/bluetooth/bnep/core.c:680:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(ci->device, s->dev->name);
--
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:161:22: warning: Value stored to 'sg' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct scatterlist *sg = req->src;
^~ ~~~~~~~~
drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:161:22: note: Value stored to 'sg' during its initialization is never read
struct scatterlist *sg = req->src;
^~ ~~~~~~~~
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
13 warnings generated.
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings generated.
drivers/iio/dac/ad5064.c:105:8: warning: Excessive padding in 'struct ad5064_state' (179 padding bytes, where 51 is optimal).
Optimal fields order:
data,
dac_cache,
use_internal_vref,
pwr_down,
pwr_down_mode,
dev,
chip_info,
write,
vref_reg,
lock,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct ad5064_state {
~~~~~~~^~~~~~~~~~~~~~
drivers/iio/dac/ad5064.c:105:8: note: Excessive padding in 'struct ad5064_state' (179 padding bytes, where 51 is optimal). Optimal fields order: data, dac_cache, use_internal_vref, pwr_down, pwr_down_mode, dev, chip_info, write, vref_reg, lock, consider reordering the fields or adding explicit padding members
struct ad5064_state {
~~~~~~~^~~~~~~~~~~~~~
Suppressed 9 warnings (9 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
9 warnings generated.
Suppressed 9 warnings (9 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
drivers/staging/comedi/drivers/das08.c:181:2: warning: Value stored to 'range' is never read [clang-analyzer-deadcode.DeadStores]
range = CR_RANGE(insn->chanspec);
^
drivers/staging/comedi/drivers/das08.c:181:2: note: Value stored to 'range' is never read
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
>> drivers/platform/x86/dell/dell-laptop.c:1596:4: warning: Value stored to 'unit' is never read [clang-analyzer-deadcode.DeadStores]
unit = KBD_TIMEOUT_SECONDS;
^ ~~~~~~~~~~~~~~~~~~~
drivers/platform/x86/dell/dell-laptop.c:1596:4: note: Value stored to 'unit' is never read
unit = KBD_TIMEOUT_SECONDS;
^ ~~~~~~~~~~~~~~~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (6 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
11 warnings generated.
Suppressed 11 warnings (11 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
drivers/rapidio/rio-scan.c:561:10: warning: Although the value stored to 'tmp' is used in the enclosing expression, the value is never actually read from 'tmp' [clang-analyzer-deadcode.DeadStores]
while ((tmp = rio_get_host_deviceid_lock(port, hopcount))
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/rapidio/rio-scan.c:561:10: note: Although the value stored to 'tmp' is used in the enclosing expression, the value is never actually read from 'tmp'
while ((tmp = rio_get_host_deviceid_lock(port, hopcount))
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
9 warnings generated.
drivers/iio/accel/bmc150-accel-core.c:152:8: warning: Excessive padding in 'struct bmc150_accel_chip_info' (11 padding bytes, where 3 is optimal).
Optimal fields order:
name,
channels,
num_channels,
scale_table,
chip_id,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct bmc150_accel_chip_info {
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/accel/bmc150-accel-core.c:152:8: note: Excessive padding in 'struct bmc150_accel_chip_info' (11 padding bytes, where 3 is optimal). Optimal fields order: name, channels, num_channels, scale_table, chip_id, consider reordering the fields or adding explicit padding members
vim +158 drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 129
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 130 /**
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 131 * populate_enum_data() - Populate all properties of an instance under enumeration attribute
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 132 * @enumeration_obj: ACPI object with enumeration data
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 133 * @instance_id: The instance to enumerate
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 134 * @attr_name_kobj: The parent kernel object
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 135 */
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 136 int populate_enum_data(union acpi_object *enumeration_obj, int instance_id,
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 137 struct kobject *attr_name_kobj)
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 138 {
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 139 int i, next_obj, value_modifier_count, possible_values_count;
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 140
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 141 wmi_priv.enumeration_data[instance_id].attr_name_kobj = attr_name_kobj;
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 142 strlcpy_attr(wmi_priv.enumeration_data[instance_id].attribute_name,
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 143 enumeration_obj[ATTR_NAME].string.pointer);
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 144 strlcpy_attr(wmi_priv.enumeration_data[instance_id].display_name_language_code,
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 145 enumeration_obj[DISPL_NAME_LANG_CODE].string.pointer);
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 146 strlcpy_attr(wmi_priv.enumeration_data[instance_id].display_name,
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 147 enumeration_obj[DISPLAY_NAME].string.pointer);
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 148 strlcpy_attr(wmi_priv.enumeration_data[instance_id].default_value,
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 149 enumeration_obj[DEFAULT_VAL].string.pointer);
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 150 strlcpy_attr(wmi_priv.enumeration_data[instance_id].dell_modifier,
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 151 enumeration_obj[MODIFIER].string.pointer);
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 152
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 153 next_obj = MODIFIER + 1;
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 154
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 155 value_modifier_count = (uintptr_t)enumeration_obj[next_obj].string.pointer;
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 156
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 157 for (i = 0; i < value_modifier_count; i++) {
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 @158 strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier,
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 159 enumeration_obj[++next_obj].string.pointer);
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 160 strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier, ";");
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 161 }
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 162
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 163 possible_values_count = (uintptr_t) enumeration_obj[++next_obj].string.pointer;
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 164
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 165 for (i = 0; i < possible_values_count; i++) {
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 166 strcat(wmi_priv.enumeration_data[instance_id].possible_values,
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 167 enumeration_obj[++next_obj].string.pointer);
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 168 strcat(wmi_priv.enumeration_data[instance_id].possible_values, ";");
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 169 }
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 170
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 171 return sysfs_create_group(attr_name_kobj, &enumeration_attr_group);
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 172 }
e8a60aa7404bfef drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 173
:::::: The code@line 158 was first introduced by commit
:::::: e8a60aa7404bfef37705da5607c97737073ac38d platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems
:::::: TO: Divya Bharathi <divya.bharathi@dell.com>
:::::: CC: Hans de Goede <hdegoede@redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:158:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments...
@ 2021-11-21 12:29 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-11-21 12:29 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 35670 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Mario Limonciello <mario.limonciello@dell.com>
CC: Hans de Goede <hdegoede@redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 923dcc5eb0c111eccd51cc7ce1658537e3c38b25
commit: f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28 platform/x86: Move all dell drivers to their own subdirectory
date: 10 months ago
:::::: branch date: 15 hours ago
:::::: commit date: 10 months ago
config: i386-randconfig-c001-20211016 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a49f5386ce6b091da66ea7c3a1d9a588d53becf7)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
do { \
^
kernel/events/core.c:10042:2: note: Loop condition is true. Entering loop body
list_for_each_entry(filter, &ifh->list, entry) {
^
include/linux/list.h:628:2: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
kernel/events/core.c:10043:7: note: Assuming field 'dentry' is non-null
if (filter->path.dentry) {
^~~~~~~~~~~~~~~~~~~
kernel/events/core.c:10043:3: note: Taking true branch
if (filter->path.dentry) {
^
kernel/events/core.c:10051:35: note: Passing null pointer value via 2nd parameter 'mm'
perf_addr_filter_apply(filter, mm, &event->addr_filter_ranges[count]);
^~
kernel/events/core.c:10051:4: note: Calling 'perf_addr_filter_apply'
perf_addr_filter_apply(filter, mm, &event->addr_filter_ranges[count]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/events/core.c:10004:13: note: Dereference of null pointer
for (vma = mm->mmap; vma; vma = vma->vm_next) {
^~~~~~~~
kernel/events/core.c:11792:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = 0;
^ ~
kernel/events/core.c:11792:2: note: Value stored to 'err' is never read
err = 0;
^ ~
Suppressed 5 warnings (3 in non-user code, 2 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
drivers/iio/light/tsl2772.c:896:40: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult]
chip->settings.prox_thres_high = (max << 1) - mean;
^
drivers/iio/light/tsl2772.c:1057:6: note: Assuming the condition is false
if (kstrtobool(buf, &value) || !value)
^~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/light/tsl2772.c:1057:6: note: Left side of '||' is false
drivers/iio/light/tsl2772.c:1057:33: note: Assuming 'value' is true
if (kstrtobool(buf, &value) || !value)
^~~~~~
drivers/iio/light/tsl2772.c:1057:2: note: Taking false branch
if (kstrtobool(buf, &value) || !value)
^
drivers/iio/light/tsl2772.c:1060:8: note: Calling 'tsl2772_prox_cal'
ret = tsl2772_prox_cal(indio_dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/light/tsl2772.c:875:6: note: Assuming field 'prox_max_samples_cal' is >= 1
if (chip->settings.prox_max_samples_cal < 1 ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/light/tsl2772.c:875:6: note: Left side of '||' is false
drivers/iio/light/tsl2772.c:876:6: note: Assuming field 'prox_max_samples_cal' is <= MAX_SAMPLES_CAL
chip->settings.prox_max_samples_cal > MAX_SAMPLES_CAL)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/light/tsl2772.c:875:2: note: Taking false branch
if (chip->settings.prox_max_samples_cal < 1 ||
^
drivers/iio/light/tsl2772.c:879:14: note: 'i' is < field 'prox_max_samples_cal'
for (i = 0; i < chip->settings.prox_max_samples_cal; i++) {
^
drivers/iio/light/tsl2772.c:879:2: note: Loop condition is true. Entering loop body
for (i = 0; i < chip->settings.prox_max_samples_cal; i++) {
^
drivers/iio/light/tsl2772.c:882:7: note: 'ret' is >= 0
if (ret < 0)
^~~
drivers/iio/light/tsl2772.c:882:3: note: Taking false branch
if (ret < 0)
^
drivers/iio/light/tsl2772.c:879:14: note: Assuming 'i' is >= field 'prox_max_samples_cal'
for (i = 0; i < chip->settings.prox_max_samples_cal; i++) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/light/tsl2772.c:879:2: note: Loop condition is false. Execution continues on line 888
for (i = 0; i < chip->settings.prox_max_samples_cal; i++) {
^
drivers/iio/light/tsl2772.c:889:2: note: The value -2147483648 is assigned to 'max'
max = INT_MIN;
^~~~~~~~~~~~~
drivers/iio/light/tsl2772.c:890:14: note: Assuming 'i' is >= field 'prox_max_samples_cal'
for (i = 0; i < chip->settings.prox_max_samples_cal; i++) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/light/tsl2772.c:890:2: note: Loop condition is false. Execution continues on line 894
for (i = 0; i < chip->settings.prox_max_samples_cal; i++) {
^
drivers/iio/light/tsl2772.c:896:40: note: The result of the left shift is undefined because the left operand is negative
chip->settings.prox_thres_high = (max << 1) - mean;
~~~ ^
Suppressed 4 warnings (3 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
fs/f2fs/super.c:937:4: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(ext[ext_cnt], name);
^~~~~~
fs/f2fs/super.c:937:4: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
strcpy(ext[ext_cnt], name);
^~~~~~
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
>> drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:158:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier,
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:158:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier,
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:160:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier, ";");
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:160:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier, ";");
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:166:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wmi_priv.enumeration_data[instance_id].possible_values,
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:166:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wmi_priv.enumeration_data[instance_id].possible_values,
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:168:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wmi_priv.enumeration_data[instance_id].possible_values, ";");
^~~~~~
drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:168:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wmi_priv.enumeration_data[instance_id].possible_values, ";");
^~~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
drivers/iio/dac/ad5770r.c:133:8: warning: Excessive padding in 'struct ad5770r_state' (86 padding bytes, where 22 is optimal).
Optimal fields order:
transf_buf,
internal_ref,
external_res,
spi,
regmap,
vref_reg,
gpio_reset,
vref,
ch_pwr_down,
output_mode,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct ad5770r_state {
~~~~~~~^~~~~~~~~~~~~~~
drivers/iio/dac/ad5770r.c:133:8: note: Excessive padding in 'struct ad5770r_state' (86 padding bytes, where 22 is optimal). Optimal fields order: transf_buf, internal_ref, external_res, spi, regmap, vref_reg, gpio_reset, vref, ch_pwr_down, output_mode, consider reordering the fields or adding explicit padding members
struct ad5770r_state {
~~~~~~~^~~~~~~~~~~~~~~
drivers/iio/dac/ad5770r.c:544:2: warning: Undefined or garbage value returned to caller [clang-analyzer-core.uninitialized.UndefReturn]
return ret;
^
drivers/iio/dac/ad5770r.c:609:6: note: Assuming 'indio_dev' is non-null
if (!indio_dev)
^~~~~~~~~~
drivers/iio/dac/ad5770r.c:609:2: note: Taking false branch
if (!indio_dev)
^
drivers/iio/dac/ad5770r.c:618:2: note: Taking false branch
if (IS_ERR(regmap)) {
^
drivers/iio/dac/ad5770r.c:626:2: note: Taking false branch
if (!IS_ERR(st->vref_reg)) {
^
drivers/iio/dac/ad5770r.c:646:7: note: Assuming the condition is true
if (PTR_ERR(st->vref_reg) == -ENODEV) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/dac/ad5770r.c:646:3: note: Taking true branch
if (PTR_ERR(st->vref_reg) == -ENODEV) {
^
drivers/iio/dac/ad5770r.c:660:8: note: Calling 'ad5770r_init'
ret = ad5770r_init(st);
^~~~~~~~~~~~~~~~
drivers/iio/dac/ad5770r.c:553:2: note: Taking false branch
if (IS_ERR(st->gpio_reset))
^
drivers/iio/dac/ad5770r.c:558:6: note: 'ret' is 0
if (ret)
^~~
drivers/iio/dac/ad5770r.c:558:2: note: Taking false branch
if (ret)
^
drivers/iio/dac/ad5770r.c:562:8: note: Calling 'ad5770r_channel_config'
ret = ad5770r_channel_config(st);
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/dac/ad5770r.c:516:6: note: 'ret' declared without an initial value
int ret, tmp[2], min, max;
^~~
drivers/iio/dac/ad5770r.c:521:6: note: Assuming 'num' is equal to AD5770R_MAX_CHANNELS
if (num != AD5770R_MAX_CHANNELS)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/dac/ad5770r.c:521:2: note: Taking false branch
if (num != AD5770R_MAX_CHANNELS)
^
drivers/iio/dac/ad5770r.c:524:2: note: Loop condition is false. Execution continues on line 544
device_for_each_child_node(&st->spi->dev, child) {
^
include/linux/property.h:111:2: note: expanded from macro 'device_for_each_child_node'
for (child = device_get_next_child_node(dev, NULL); child; \
--
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
drivers/iio/potentiometer/max5481.c:44:8: warning: Excessive padding in 'struct max5481_data' (117 padding bytes, where 53 is optimal).
Optimal fields order:
msg,
spi,
cfg,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct max5481_data {
~~~~~~~^~~~~~~~~~~~~~
drivers/iio/potentiometer/max5481.c:44:8: note: Excessive padding in 'struct max5481_data' (117 padding bytes, where 53 is optimal). Optimal fields order: msg, spi, cfg, consider reordering the fields or adding explicit padding members
struct max5481_data {
~~~~~~~^~~~~~~~~~~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
drivers/iio/potentiometer/mcp41010.c:58:8: warning: Excessive padding in 'struct mcp41010_data' (86 padding bytes, where 22 is optimal).
Optimal fields order:
buf,
spi,
cfg,
value,
lock,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct mcp41010_data {
~~~~~~~^~~~~~~~~~~~~~~
drivers/iio/potentiometer/mcp41010.c:58:8: note: Excessive padding in 'struct mcp41010_data' (86 padding bytes, where 22 is optimal). Optimal fields order: buf, spi, cfg, value, lock, consider reordering the fields or adding explicit padding members
struct mcp41010_data {
~~~~~~~^~~~~~~~~~~~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
>> drivers/platform/x86/dell/dell-laptop.c:1596:4: warning: Value stored to 'unit' is never read [clang-analyzer-deadcode.DeadStores]
unit = KBD_TIMEOUT_SECONDS;
^ ~~~~~~~~~~~~~~~~~~~
drivers/platform/x86/dell/dell-laptop.c:1596:4: note: Value stored to 'unit' is never read
unit = KBD_TIMEOUT_SECONDS;
^ ~~~~~~~~~~~~~~~~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
drivers/iio/frequency/adf4371.c:157:8: warning: Excessive padding in 'struct adf4371_state' (110 padding bytes, where 46 is optimal).
Optimal fields order:
buf,
spi,
regmap,
clkin,
chip_info,
clkin_freq,
fpfd,
integer,
fract1,
fract2,
mod2,
rf_div_sel,
ref_div_factor,
lock,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct adf4371_state {
~~~~~~~^~~~~~~~~~~~~~~
drivers/iio/frequency/adf4371.c:157:8: note: Excessive padding in 'struct adf4371_state' (110 padding bytes, where 46 is optimal). Optimal fields order: buf, spi, regmap, clkin, chip_info, clkin_freq, fpfd, integer, fract1, fract2, mod2, rf_div_sel, ref_div_factor, lock, consider reordering the fields or adding explicit padding members
struct adf4371_state {
~~~~~~~^~~~~~~~~~~~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
drivers/leds/uleds.c:150:4: warning: Value stored to 'retval' is never read [clang-analyzer-deadcode.DeadStores]
retval = copy_to_user(buffer, &udev->brightness,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/leds/uleds.c:150:4: note: Value stored to 'retval' is never read
retval = copy_to_user(buffer, &udev->brightness,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
vim +158 drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 129
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 130 /**
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 131 * populate_enum_data() - Populate all properties of an instance under enumeration attribute
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 132 * @enumeration_obj: ACPI object with enumeration data
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 133 * @instance_id: The instance to enumerate
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 134 * @attr_name_kobj: The parent kernel object
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 135 */
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 136 int populate_enum_data(union acpi_object *enumeration_obj, int instance_id,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 137 struct kobject *attr_name_kobj)
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 138 {
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 139 int i, next_obj, value_modifier_count, possible_values_count;
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 140
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 141 wmi_priv.enumeration_data[instance_id].attr_name_kobj = attr_name_kobj;
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 142 strlcpy_attr(wmi_priv.enumeration_data[instance_id].attribute_name,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 143 enumeration_obj[ATTR_NAME].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 144 strlcpy_attr(wmi_priv.enumeration_data[instance_id].display_name_language_code,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 145 enumeration_obj[DISPL_NAME_LANG_CODE].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 146 strlcpy_attr(wmi_priv.enumeration_data[instance_id].display_name,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 147 enumeration_obj[DISPLAY_NAME].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 148 strlcpy_attr(wmi_priv.enumeration_data[instance_id].default_value,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 149 enumeration_obj[DEFAULT_VAL].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 150 strlcpy_attr(wmi_priv.enumeration_data[instance_id].dell_modifier,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 151 enumeration_obj[MODIFIER].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 152
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 153 next_obj = MODIFIER + 1;
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 154
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 155 value_modifier_count = (uintptr_t)enumeration_obj[next_obj].string.pointer;
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 156
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 157 for (i = 0; i < value_modifier_count; i++) {
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 @158 strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 159 enumeration_obj[++next_obj].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 160 strcat(wmi_priv.enumeration_data[instance_id].dell_value_modifier, ";");
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 161 }
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 162
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 163 possible_values_count = (uintptr_t) enumeration_obj[++next_obj].string.pointer;
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 164
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 165 for (i = 0; i < possible_values_count; i++) {
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 166 strcat(wmi_priv.enumeration_data[instance_id].possible_values,
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 167 enumeration_obj[++next_obj].string.pointer);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 168 strcat(wmi_priv.enumeration_data[instance_id].possible_values, ";");
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 169 }
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 170
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 171 return sysfs_create_group(attr_name_kobj, &enumeration_attr_group);
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 172 }
e8a60aa7404bfe drivers/platform/x86/dell-wmi-sysman/enum-attributes.c Divya Bharathi 2020-10-27 173
:::::: The code@line 158 was first introduced by commit
:::::: e8a60aa7404bfef37705da5607c97737073ac38d platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems
:::::: TO: Divya Bharathi <divya.bharathi@dell.com>
:::::: CC: Hans de Goede <hdegoede@redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32824 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-12-17 13:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08 0:10 drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c:158:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-12-17 13:35 kernel test robot
2021-12-08 2:34 kernel test robot
2021-11-21 12:29 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.