CC: [email protected]
CC: [email protected]
BCC: [email protected]
CC: [email protected]
TO: Arnd Bergmann <[email protected]>
CC: Masahiro Yamada <[email protected]>
CC: Alex Shi <[email protected]>
CC: Nick Desaulniers <[email protected]>
CC: Miguel Ojeda <[email protected]>
CC: Nathan Chancellor <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   b2d229d4ddb17db541098b83524d901257e93845
commit: e8c07082a810fbb9db303a2b66b66b8d7e588b53 Kbuild: move to -std=gnu11
date:   5 weeks ago
:::::: branch date: 31 hours ago
:::::: commit date: 5 weeks ago
config: x86_64-randconfig-c007-20220418 
(https://download.01.org/0day-ci/archive/20220419/[email protected]/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
b27430f9f46b88bcd54d992debc8d72e131e1bd0)
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=e8c07082a810fbb9db303a2b66b66b8d7e588b53
        git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout e8c07082a810fbb9db303a2b66b66b8d7e588b53
        # 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 <[email protected]>


clang-analyzer warnings: (new ones prefixed by >>)
   68 warnings generated.
   Suppressed 68 warnings (68 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   35 warnings generated.
   drivers/hwmon/ltc2945.c:286:2: warning: Value stored to 'ret' is never read 
[clang-analyzer-deadcode.DeadStores]
           ret = regmap_update_bits(regmap, LTC2945_CONTROL, CONTROL_TEST_MODE,
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hwmon/ltc2945.c:286:2: note: Value stored to 'ret' is never read
           ret = regmap_update_bits(regmap, LTC2945_CONTROL, CONTROL_TEST_MODE,
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 34 warnings (34 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   62 warnings generated.
   Suppressed 62 warnings (62 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   77 warnings generated.
   drivers/net/wireless/marvell/libertas/debugfs.c:44:9: warning: Call to 
function 'snprintf' is insecure as it does not provide security checks 
introduced in the C11 standard. Replace with analogous functions that support 
length arguments or provides boundary checks such as 'snprintf_s' in case of 
C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           pos += snprintf(buf+pos, len-pos, "state = %s\n",
                  ^~~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:44:9: note: Call to function 
'snprintf' is insecure as it does not provide security checks introduced in the 
C11 standard. Replace with analogous functions that support length arguments or 
provides boundary checks such as 'snprintf_s' in case of C11
           pos += snprintf(buf+pos, len-pos, "state = %s\n",
                  ^~~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:46:9: warning: Call to 
function 'snprintf' is insecure as it does not provide security checks 
introduced in the C11 standard. Replace with analogous functions that support 
length arguments or provides boundary checks such as 'snprintf_s' in case of 
C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           pos += snprintf(buf+pos, len-pos, "region_code = %02x\n",
                  ^~~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:46:9: note: Call to function 
'snprintf' is insecure as it does not provide security checks introduced in the 
C11 standard. Replace with analogous functions that support length arguments or 
provides boundary checks such as 'snprintf_s' in case of C11
           pos += snprintf(buf+pos, len-pos, "region_code = %02x\n",
                  ^~~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:69:8: warning: Call to 
function 'sscanf' is insecure as it does not provide security checks introduced 
in the C11 standard. Replace with analogous functions that support length 
arguments or provides boundary checks such as 'sscanf_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           ret = sscanf(buf, "%d %d %d %d %d %d", &p1, &p2, &p3, &p4, &p5, &p6);
                 ^~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:69:8: note: Call to function 
'sscanf' is insecure as it does not provide security checks introduced in the 
C11 standard. Replace with analogous functions that support length arguments or 
provides boundary checks such as 'sscanf_s' in case of C11
           ret = sscanf(buf, "%d %d %d %d %d %d", &p1, &p2, &p3, &p4, &p5, &p6);
                 ^~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:108:9: warning: Call to 
function 'snprintf' is insecure as it does not provide security checks 
introduced in the C11 standard. Replace with analogous functions that support 
length arguments or provides boundary checks such as 'snprintf_s' in case of 
C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           pos += snprintf(buf, len, "%d %d %d %d %d %d\n", sp.sp_error,
                  ^~~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:108:9: note: Call to 
function 'snprintf' is insecure as it does not provide security checks 
introduced in the C11 standard. Replace with analogous functions that support 
length arguments or provides boundary checks such as 'snprintf_s' in case of C11
           pos += snprintf(buf, len, "%d %d %d %d %d %d\n", sp.sp_error,
                  ^~~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:133:8: warning: Call to 
function 'sscanf' is insecure as it does not provide security checks introduced 
in the C11 standard. Replace with analogous functions that support length 
arguments or provides boundary checks such as 'sscanf_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           ret = sscanf(buf, "%d", &host_sleep);
                 ^~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:133:8: note: Call to 
function 'sscanf' is insecure as it does not provide security checks introduced 
in the C11 standard. Replace with analogous functions that support length 
arguments or provides boundary checks such as 'sscanf_s' in case of C11
           ret = sscanf(buf, "%d", &host_sleep);
                 ^~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:173:9: warning: Call to 
function 'snprintf' is insecure as it does not provide security checks 
introduced in the C11 standard. Replace with analogous functions that support 
length arguments or provides boundary checks such as 'snprintf_s' in case of 
C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           pos += snprintf(buf, len, "%d\n", priv->is_host_sleep_activated);
                  ^~~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:173:9: note: Call to 
function 'snprintf' is insecure as it does not provide security checks 
introduced in the C11 standard. Replace with analogous functions that support 
length arguments or provides boundary checks such as 'snprintf_s' in case of C11
           pos += snprintf(buf, len, "%d\n", priv->is_host_sleep_activated);
                  ^~~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:254:10: warning: Call to 
function 'snprintf' is insecure as it does not provide security checks 
introduced in the C11 standard. Replace with analogous functions that support 
length arguments or provides boundary checks such as 'snprintf_s' in case of 
C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                   pos += snprintf(buf, len, "%d %d %d\n", value, freq,
                          ^~~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:254:10: note: Call to 
function 'snprintf' is insecure as it does not provide security checks 
introduced in the C11 standard. Replace with analogous functions that support 
length arguments or provides boundary checks such as 'snprintf_s' in case of C11
                   pos += snprintf(buf, len, "%d %d %d\n", value, freq,
                          ^~~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:286:8: warning: Call to 
function 'sscanf' is insecure as it does not provide security checks introduced 
in the C11 standard. Replace with analogous functions that support length 
arguments or provides boundary checks such as 'sscanf_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           ret = sscanf(buf, "%d %d %d", &value, &freq, &new_mask);
                 ^~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:286:8: note: Call to 
function 'sscanf' is insecure as it does not provide security checks introduced 
in the C11 standard. Replace with analogous functions that support length 
arguments or provides boundary checks such as 'sscanf_s' in case of C11
           ret = sscanf(buf, "%d %d %d", &value, &freq, &new_mask);
                 ^~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:449:9: warning: Call to 
function 'snprintf' is insecure as it does not provide security checks 
introduced in the C11 standard. Replace with analogous functions that support 
length arguments or provides boundary checks such as 'snprintf_s' in case of 
C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                   pos = snprintf(buf, len, "MAC[0x%x] = 0x%08x\n",
                         ^~~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:449:9: note: Call to 
function 'snprintf' is insecure as it does not provide security checks 
introduced in the C11 standard. Replace with analogous functions that support 
length arguments or provides boundary checks such as 'snprintf_s' in case of C11
                   pos = snprintf(buf, len, "MAC[0x%x] = 0x%08x\n",
                         ^~~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:487:8: warning: Call to 
function 'sscanf' is insecure as it does not provide security checks introduced 
in the C11 standard. Replace with analogous functions that support length 
arguments or provides boundary checks such as 'sscanf_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           res = sscanf(buf, "%x %x", &offset, &value);
                 ^~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:487:8: note: Call to 
function 'sscanf' is insecure as it does not provide security checks introduced 
in the C11 standard. Replace with analogous functions that support length 
arguments or provides boundary checks such as 'sscanf_s' in case of C11
           res = sscanf(buf, "%x %x", &offset, &value);
                 ^~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:519:9: warning: Call to 
function 'snprintf' is insecure as it does not provide security checks 
introduced in the C11 standard. Replace with analogous functions that support 
length arguments or provides boundary checks such as 'snprintf_s' in case of 
C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                   pos = snprintf(buf, len, "BBP[0x%x] = 0x%08x\n",
                         ^~~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:519:9: note: Call to 
function 'snprintf' is insecure as it does not provide security checks 
introduced in the C11 standard. Replace with analogous functions that support 
length arguments or provides boundary checks such as 'snprintf_s' in case of C11
                   pos = snprintf(buf, len, "BBP[0x%x] = 0x%08x\n",
                         ^~~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:559:8: warning: Call to 
function 'sscanf' is insecure as it does not provide security checks introduced 
in the C11 standard. Replace with analogous functions that support length 
arguments or provides boundary checks such as 'sscanf_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           res = sscanf(buf, "%x %x", &offset, &value);
                 ^~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:559:8: note: Call to 
function 'sscanf' is insecure as it does not provide security checks introduced 
in the C11 standard. Replace with analogous functions that support length 
arguments or provides boundary checks such as 'sscanf_s' in case of C11
           res = sscanf(buf, "%x %x", &offset, &value);
                 ^~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:591:9: warning: Call to 
function 'snprintf' is insecure as it does not provide security checks 
introduced in the C11 standard. Replace with analogous functions that support 
length arguments or provides boundary checks such as 'snprintf_s' in case of 
C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                   pos = snprintf(buf, len, "RF[0x%x] = 0x%08x\n",
                         ^~~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:591:9: note: Call to 
function 'snprintf' is insecure as it does not provide security checks 
introduced in the C11 standard. Replace with analogous functions that support 
length arguments or provides boundary checks such as 'snprintf_s' in case of C11
                   pos = snprintf(buf, len, "RF[0x%x] = 0x%08x\n",
                         ^~~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:630:8: warning: Call to 
function 'sscanf' is insecure as it does not provide security checks introduced 
in the C11 standard. Replace with analogous functions that support length 
arguments or provides boundary checks such as 'sscanf_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           res = sscanf(buf, "%x %x", &offset, &value);
                 ^~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:630:8: note: Call to 
function 'sscanf' is insecure as it does not provide security checks introduced 
in the C11 standard. Replace with analogous functions that support length 
arguments or provides boundary checks such as 'sscanf_s' in case of C11
           res = sscanf(buf, "%x %x", &offset, &value);
                 ^~~~~~
>> drivers/net/wireless/marvell/libertas/debugfs.c:834:10: warning: Call to 
>> function 'sprintf' is insecure as it does not provide bounding of the memory 
>> buffer or security checks introduced in the C11 standard. Replace with 
>> analogous functions that support length arguments or provides boundary 
>> checks such as 'sprintf_s' in case of C11 
>> [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                   pos += sprintf(p + pos, "%s=%d\n", d[i].name, val);
                          ^~~~~~~
   drivers/net/wireless/marvell/libertas/debugfs.c:834:10: note: Call to 
function 'sprintf' is insecure as it does not provide bounding of the memory 
buffer or security checks introduced in the C11 standard. Replace with 
analogous functions that support length arguments or provides boundary checks 
such as 'sprintf_s' in case of C11
                   pos += sprintf(p + pos, "%s=%d\n", d[i].name, val);
                          ^~~~~~~
   Suppressed 62 warnings (62 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   26 warnings generated.
   drivers/char/ipmi/ipmi_si_hotmod.c:205:3: warning: Call to function 'memset' 
is insecure as it does not provide security checks introduced in the C11 
standard. Replace with analogous functions that support length arguments or 
provides boundary checks such as 'memset_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                   memset(&h, 0, sizeof(h));
                   ^~~~~~
   drivers/char/ipmi/ipmi_si_hotmod.c:205:3: note: Call to function 'memset' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memset_s' in case of C11
                   memset(&h, 0, sizeof(h));
                   ^~~~~~
   Suppressed 25 warnings (25 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   27 warnings generated.
   drivers/char/ipmi/ipmi_si_hardcode.c:67:2: warning: Call to function 
'memset' is insecure as it does not provide security checks introduced in the 
C11 standard. Replace with analogous functions that support length arguments or 
provides boundary checks such as 'memset_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           memset(&p, 0, sizeof(p));
           ^~~~~~
   drivers/char/ipmi/ipmi_si_hardcode.c:67:2: note: Call to function 'memset' 
is insecure as it does not provide security checks introduced in the C11 
standard. Replace with analogous functions that support length arguments or 
provides boundary checks such as 'memset_s' in case of C11
           memset(&p, 0, sizeof(p));
           ^~~~~~
   drivers/char/ipmi/ipmi_si_hardcode.c:99:2: warning: Call to function 
'memset' is insecure as it does not provide security checks introduced in the 
C11 standard. Replace with analogous functions that support length arguments or 
provides boundary checks such as 'memset_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           memset(si_type, 0, sizeof(si_type));
           ^~~~~~
   drivers/char/ipmi/ipmi_si_hardcode.c:99:2: note: Call to function 'memset' 
is insecure as it does not provide security checks introduced in the C11 
standard. Replace with analogous functions that support length arguments or 
provides boundary checks such as 'memset_s' in case of C11
           memset(si_type, 0, sizeof(si_type));
           ^~~~~~
   Suppressed 25 warnings (25 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   34 warnings generated.
   Suppressed 34 warnings (34 in non-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.
   Suppressed 16 warnings (16 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   34 warnings generated.
   Suppressed 34 warnings (34 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   60 warnings generated.
   drivers/media/i2c/adv7604.c:1467:3: warning: Call to function 'memset' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memset_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                   memset(stdi, 0, sizeof(struct stdi_readback));
                   ^~~~~~
   drivers/media/i2c/adv7604.c:1467:3: note: Call to function 'memset' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memset_s' in case of C11
                   memset(stdi, 0, sizeof(struct stdi_readback));
                   ^~~~~~
   drivers/media/i2c/adv7604.c:1571:2: warning: Call to function 'memset' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memset_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           memset(timings, 0, sizeof(struct v4l2_dv_timings));
           ^~~~~~
   drivers/media/i2c/adv7604.c:1571:2: note: Call to function 'memset' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memset_s' in case of C11
           memset(timings, 0, sizeof(struct v4l2_dv_timings));
           ^~~~~~
   drivers/media/i2c/adv7604.c:1672:3: warning: Call to function 'memset' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memset_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                   memset(timings, 0, sizeof(struct v4l2_dv_timings));
                   ^~~~~~
   drivers/media/i2c/adv7604.c:1672:3: note: Call to function 'memset' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memset_s' in case of C11
                   memset(timings, 0, sizeof(struct v4l2_dv_timings));
                   ^~~~~~
   drivers/media/i2c/adv7604.c:1852:2: warning: Call to function 'memset' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memset_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           memset(format, 0, sizeof(*format));
           ^~~~~~
   drivers/media/i2c/adv7604.c:1852:2: note: Call to function 'memset' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memset_s' in case of C11
           memset(format, 0, sizeof(*format));
           ^~~~~~
   drivers/media/i2c/adv7604.c:2277:2: warning: Call to function 'memset' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memset_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           memset(edid->reserved, 0, sizeof(edid->reserved));
           ^~~~~~
   drivers/media/i2c/adv7604.c:2277:2: note: Call to function 'memset' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memset_s' in case of C11
           memset(edid->reserved, 0, sizeof(edid->reserved));
           ^~~~~~
   drivers/media/i2c/adv7604.c:2305:2: warning: Call to function 'memcpy' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memcpy_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           memcpy(edid->edid, data + edid->start_block * 128, edid->blocks * 
128);
           ^~~~~~
   drivers/media/i2c/adv7604.c:2305:2: note: Call to function 'memcpy' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memcpy_s' in case of C11
           memcpy(edid->edid, data + edid->start_block * 128, edid->blocks * 
128);
           ^~~~~~
   drivers/media/i2c/adv7604.c:2319:2: warning: Call to function 'memset' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memset_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           memset(edid->reserved, 0, sizeof(edid->reserved));
           ^~~~~~
   drivers/media/i2c/adv7604.c:2319:2: note: Call to function 'memset' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memset_s' in case of C11
           memset(edid->reserved, 0, sizeof(edid->reserved));
           ^~~~~~
   drivers/media/i2c/adv7604.c:2403:2: warning: Call to function 'memcpy' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memcpy_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           memcpy(state->edid.edid, edid->edid, 128 * edid->blocks);
           ^~~~~~
   drivers/media/i2c/adv7604.c:2403:2: note: Call to function 'memcpy' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memcpy_s' in case of C11
           memcpy(state->edid.edid, edid->edid, 128 * edid->blocks);
           ^~~~~~
   drivers/media/i2c/adv7604.c:3478:2: warning: Call to function 'snprintf' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'snprintf_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           snprintf(sd->name, sizeof(sd->name), "%s %d-%04x",
           ^~~~~~~~
   drivers/media/i2c/adv7604.c:3478:2: note: Call to function 'snprintf' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'snprintf_s' in case of C11
           snprintf(sd->name, sizeof(sd->name), "%s %d-%04x",
           ^~~~~~~~
   Suppressed 51 warnings (50 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.
   63 warnings generated.
   net/sched/ematch.c:312:2: warning: Call to function 'memset' is insecure as 
it does not provide security checks introduced in the C11 standard. Replace 
with analogous functions that support length arguments or provides boundary 
checks such as 'memset_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           memset(tree, 0, sizeof(*tree));

vim +834 drivers/net/wireless/marvell/libertas/debugfs.c

876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  795  
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  796  /**
8973a6e770fc89 drivers/net/wireless/libertas/debugfs.c Randy Dunlap    
2011-04-26  797   * lbs_debugfs_read - proc read function
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  798   *
8973a6e770fc89 drivers/net/wireless/libertas/debugfs.c Randy Dunlap    
2011-04-26  799   * @file:       file to read
8973a6e770fc89 drivers/net/wireless/libertas/debugfs.c Randy Dunlap    
2011-04-26  800   * @userbuf:    pointer to buffer
8973a6e770fc89 drivers/net/wireless/libertas/debugfs.c Randy Dunlap    
2011-04-26  801   * @count:      number of bytes to read
8973a6e770fc89 drivers/net/wireless/libertas/debugfs.c Randy Dunlap    
2011-04-26  802   * @ppos:       read data starting position
8973a6e770fc89 drivers/net/wireless/libertas/debugfs.c Randy Dunlap    
2011-04-26  803   *
8973a6e770fc89 drivers/net/wireless/libertas/debugfs.c Randy Dunlap    
2011-04-26  804   * returns:     amount of data read or negative error code
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  805   */
1007832103d016 drivers/net/wireless/libertas/debugfs.c Holger Schurig  
2007-11-15  806  static ssize_t lbs_debugfs_read(struct file *file, char __user 
*userbuf,
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  807                          size_t count, loff_t *ppos)
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  808  {
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  809          int val = 0;
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  810          size_t pos = 0;
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  811          ssize_t res;
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  812          char *p;
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  813          int i;
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  814          struct debug_data *d;
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  815          unsigned long addr = get_zeroed_page(GFP_KERNEL);
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  816          char *buf = (char *)addr;
ad43f8bfb7b9a6 drivers/net/wireless/libertas/debugfs.c Kiran Divekar   
2009-08-28  817          if (!buf)
ad43f8bfb7b9a6 drivers/net/wireless/libertas/debugfs.c Kiran Divekar   
2009-08-28  818                  return -ENOMEM;
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  819  
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  820          p = buf;
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  821  
57674308d00b5e drivers/net/wireless/libertas/debugfs.c Joe Perches     
2010-07-12  822          d = file->private_data;
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  823  
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  824          for (i = 0; i < num_of_items; i++) {
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  825                  if (d[i].size == 1)
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  826                          val = *((u8 *) d[i].addr);
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  827                  else if (d[i].size == 2)
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  828                          val = *((u16 *) d[i].addr);
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  829                  else if (d[i].size == 4)
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  830                          val = *((u32 *) d[i].addr);
4269e2ad83036e drivers/net/wireless/libertas/debugfs.c Dan Williams    
2007-05-10  831                  else if (d[i].size == 8)
4269e2ad83036e drivers/net/wireless/libertas/debugfs.c Dan Williams    
2007-05-10  832                          val = *((u64 *) d[i].addr);
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  833  
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10 @834                  pos += sprintf(p + pos, "%s=%d\n", d[i].name, 
val);
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  835          }
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  836  
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  837          res = simple_read_from_buffer(userbuf, count, ppos, p, 
pos);
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  838  
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  839          free_page(addr);
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  840          return res;
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  841  }
876c9d3aeb989c drivers/net/wireless/libertas/debugfs.c Marcelo Tosatti 
2007-02-10  842  

:::::: The code at line 834 was first introduced by commit
:::::: 876c9d3aeb989cf1961f2c228d309ba5dcfb1172 [PATCH] Marvell Libertas 8388 
802.11b/g USB driver

:::::: TO: Marcelo Tosatti <[email protected]>
:::::: CC: Jeff Garzik <[email protected]>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to