* drivers/staging/media/rkvdec/rkvdec-h264.c:732:45: warning: Value stored to 'dec_params' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-06-27 3:04 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-06-27 3:04 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 19525 bytes --]
::::::
:::::: Manual check reason: "low confidence static check warning: drivers/staging/media/rkvdec/rkvdec-h264.c:732:45: warning: Value stored to 'dec_params' during its initialization is never read [clang-analyzer-deadcode.DeadStores]"
::::::
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Nicolas Dufresne <nicolas.dufresne@collabora.com>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-media(a)vger.kernel.org
CC: Sebastian Fricke <sebastian.fricke@collabora.com>
CC: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
CC: Hans Verkuil <hverkuil@xs4all.nl>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8c23f235a6a8ae43abea215812eb9d8cf4dd165e
commit: 7ab889f09dfa70e8097ec1b9186fd228124112cb media: rkvdec: h264: Fix dpb_valid implementation
date: 6 weeks ago
:::::: branch date: 21 hours ago
:::::: commit date: 6 weeks ago
config: riscv-randconfig-c006-20220622
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8b8d126598ce7bd5243da7f94f69fa1104288bee)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7ab889f09dfa70e8097ec1b9186fd228124112cb
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7ab889f09dfa70e8097ec1b9186fd228124112cb
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
~~~~~~~^~~~~~~~~~~~~~~
Suppressed 51 warnings (51 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
41 warnings generated.
drivers/iio/adc/ti-tsc2046.c:309: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(&xfer, 0, sizeof(xfer));
^
include/linux/fortify-string.h:272:25: note: expanded from macro 'memset'
#define memset(p, c, s) __fortify_memset_chk(p, c, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk'
__underlying_memset(p, c, __fortify_size); \
^~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset'
#define __underlying_memset __builtin_memset
^~~~~~~~~~~~~~~~
drivers/iio/adc/ti-tsc2046.c:309: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(&xfer, 0, sizeof(xfer));
^
include/linux/fortify-string.h:272:25: note: expanded from macro 'memset'
#define memset(p, c, s) __fortify_memset_chk(p, c, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk'
__underlying_memset(p, c, __fortify_size); \
^~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset'
#define __underlying_memset __builtin_memset
^~~~~~~~~~~~~~~~
drivers/iio/adc/ti-tsc2046.c:401:9: warning: Division by zero [clang-analyzer-core.DivideZero]
return DIV_ROUND_UP(val_normalized, valid_count);
^
include/linux/math.h:37:22: note: expanded from macro 'DIV_ROUND_UP'
#define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP
^
include/uapi/linux/const.h:34:54: note: expanded from macro '__KERNEL_DIV_ROUND_UP'
#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
^
drivers/iio/adc/ti-tsc2046.c:440:2: note: Calling 'tsc2046_adc_scan'
tsc2046_adc_scan(indio_dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/adc/ti-tsc2046.c:412:6: note: Assuming 'ret' is >= 0
if (ret < 0) {
^~~~~~~
drivers/iio/adc/ti-tsc2046.c:412:2: note: Taking false branch
if (ret < 0) {
^
drivers/iio/adc/ti-tsc2046.c:417:18: note: Assuming 'group' is < field 'groups'
for (group = 0; group < priv->groups; group++)
^~~~~~~~~~~~~~~~~~~~
drivers/iio/adc/ti-tsc2046.c:417:2: note: Loop condition is true. Entering loop body
for (group = 0; group < priv->groups; group++)
^
drivers/iio/adc/ti-tsc2046.c:418:32: note: Calling 'tsc2046_adc_get_val'
priv->scan_buf.data[group] = tsc2046_adc_get_val(priv, group);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/adc/ti-tsc2046.c:394:2: note: Value assigned to 'valid_count'
valid_count = l->count - l->skip;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/adc/ti-tsc2046.c:396:14: note: Assuming 'i' is >= 'valid_count'
for (i = 0; i < valid_count; i++) {
^~~~~~~~~~~~~~~
drivers/iio/adc/ti-tsc2046.c:396:2: note: Loop condition is false. Execution continues on line 401
for (i = 0; i < valid_count; i++) {
^
drivers/iio/adc/ti-tsc2046.c:401:9: note: Division by zero
return DIV_ROUND_UP(val_normalized, valid_count);
^
include/linux/math.h:37:22: note: expanded from macro 'DIV_ROUND_UP'
#define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP
^
include/uapi/linux/const.h:34:54: note: expanded from macro '__KERNEL_DIV_ROUND_UP'
#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
~~~~~~~~~~~~~~~~^~~~~
Suppressed 39 warnings (39 in non-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.
drivers/staging/media/rkvdec/rkvdec-h264.c:657: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(hw_ps, 0, sizeof(*hw_ps));
^
include/linux/fortify-string.h:272:25: note: expanded from macro 'memset'
#define memset(p, c, s) __fortify_memset_chk(p, c, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk'
__underlying_memset(p, c, __fortify_size); \
^~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset'
#define __underlying_memset __builtin_memset
^~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:657: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(hw_ps, 0, sizeof(*hw_ps));
^
include/linux/fortify-string.h:272:25: note: expanded from macro 'memset'
#define memset(p, c, s) __fortify_memset_chk(p, c, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk'
__underlying_memset(p, c, __fortify_size); \
^~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset'
#define __underlying_memset __builtin_memset
^~~~~~~~~~~~~~~~
>> drivers/staging/media/rkvdec/rkvdec-h264.c:732:45: warning: Value stored to 'dec_params' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
const struct v4l2_ctrl_h264_decode_params *dec_params = run->decode_params;
^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:732:45: note: Value stored to 'dec_params' during its initialization is never read
const struct v4l2_ctrl_h264_decode_params *dec_params = run->decode_params;
^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:763: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(hw_rps, 0, sizeof(priv_tbl->rps));
^
include/linux/fortify-string.h:272:25: note: expanded from macro 'memset'
#define memset(p, c, s) __fortify_memset_chk(p, c, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk'
__underlying_memset(p, c, __fortify_size); \
^~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset'
#define __underlying_memset __builtin_memset
^~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:763: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(hw_rps, 0, sizeof(priv_tbl->rps));
^
include/linux/fortify-string.h:272:25: note: expanded from macro 'memset'
#define memset(p, c, s) __fortify_memset_chk(p, c, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk'
__underlying_memset(p, c, __fortify_size); \
^~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset'
#define __underlying_memset __builtin_memset
^~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:826: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(tbl->scaling_list.scaling_list_4x4,
^
include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
#define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
__underlying_##op(p, q, __fortify_size); \
^~~~~~~~~~~~~~~~~
note: expanded from here
include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
#define __underlying_memcpy __builtin_memcpy
^~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:826: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(tbl->scaling_list.scaling_list_4x4,
^
include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
#define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
__underlying_##op(p, q, __fortify_size); \
^~~~~~~~~~~~~~~~~
note: expanded from here
include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
#define __underlying_memcpy __builtin_memcpy
^~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:830: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(tbl->scaling_list.scaling_list_8x8,
^
include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
#define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
__underlying_##op(p, q, __fortify_size); \
^~~~~~~~~~~~~~~~~
note: expanded from here
include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
#define __underlying_memcpy __builtin_memcpy
^~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:830: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(tbl->scaling_list.scaling_list_8x8,
^
include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
#define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
__underlying_##op(p, q, __fortify_size); \
^~~~~~~~~~~~~~~~~
note: expanded from here
include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
#define __underlying_memcpy __builtin_memcpy
^~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:1058: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(priv_tbl->cabac_table, rkvdec_h264_cabac_table,
^
include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
#define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
__underlying_##op(p, q, __fortify_size); \
^~~~~~~~~~~~~~~~~
note: expanded from here
include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
#define __underlying_memcpy __builtin_memcpy
^~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:1058: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(priv_tbl->cabac_table, rkvdec_h264_cabac_table,
^
include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
#define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/dec_params +732 drivers/staging/media/rkvdec/rkvdec-h264.c
cd33c830448baf Boris Brezillon 2020-04-04 728
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 729 static void lookup_ref_buf_idx(struct rkvdec_ctx *ctx,
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 730 struct rkvdec_h264_run *run)
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 731 {
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 @732 const struct v4l2_ctrl_h264_decode_params *dec_params = run->decode_params;
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 733 u32 i;
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 734
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 735 for (i = 0; i < ARRAY_SIZE(dec_params->dpb); i++) {
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 736 struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 737 const struct v4l2_h264_dpb_entry *dpb = run->decode_params->dpb;
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 738 struct vb2_queue *cap_q = &m2m_ctx->cap_q_ctx.q;
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 739 int buf_idx = -1;
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 740
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 741 if (dpb[i].flags & V4L2_H264_DPB_ENTRY_FLAG_ACTIVE)
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 742 buf_idx = vb2_find_timestamp(cap_q,
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 743 dpb[i].reference_ts, 0);
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 744
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 745 run->ref_buf_idx[i] = buf_idx;
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 746 }
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 747 }
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 748
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
* drivers/staging/media/rkvdec/rkvdec-h264.c:732:45: warning: Value stored to 'dec_params' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-06-27 23:10 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-06-27 23:10 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 21454 bytes --]
::::::
:::::: Manual check reason: "low confidence static check warning: drivers/staging/media/rkvdec/rkvdec-h264.c:732:45: warning: Value stored to 'dec_params' during its initialization is never read [clang-analyzer-deadcode.DeadStores]"
::::::
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Nicolas Dufresne <nicolas.dufresne@collabora.com>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-media(a)vger.kernel.org
CC: Sebastian Fricke <sebastian.fricke@collabora.com>
CC: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
CC: Hans Verkuil <hverkuil@xs4all.nl>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 03c765b0e3b4cb5063276b086c76f7a612856a9a
commit: 7ab889f09dfa70e8097ec1b9186fd228124112cb media: rkvdec: h264: Fix dpb_valid implementation
date: 6 weeks ago
:::::: branch date: 26 hours ago
:::::: commit date: 6 weeks ago
config: riscv-randconfig-c006-20220622 (https://download.01.org/0day-ci/archive/20220628/202206280737.qW8q2gAn-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8b8d126598ce7bd5243da7f94f69fa1104288bee)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7ab889f09dfa70e8097ec1b9186fd228124112cb
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7ab889f09dfa70e8097ec1b9186fd228124112cb
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^~~~~~~~~~~~~~~~~
note: expanded from here
include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
#define __underlying_memcpy __builtin_memcpy
^~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/renesas-nand-controller.c:874:4: 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(&last_bytes, rop.buf + (words * sizeof(u32)), remainder);
^
include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
#define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
__underlying_##op(p, q, __fortify_size); \
^~~~~~~~~~~~~~~~~
note: expanded from here
include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
#define __underlying_memcpy __builtin_memcpy
^~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/renesas-nand-controller.c:874:4: 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(&last_bytes, rop.buf + (words * sizeof(u32)), remainder);
^
include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
#define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
__underlying_##op(p, q, __fortify_size); \
^~~~~~~~~~~~~~~~~
note: expanded from here
include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
#define __underlying_memcpy __builtin_memcpy
^~~~~~~~~~~~~~~~
Suppressed 38 warnings (38 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
52 warnings generated.
drivers/hwmon/adm9240.c:230:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", vid_from_reg(vid, data->vrm));
^~~~~~~
drivers/hwmon/adm9240.c:230:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", vid_from_reg(vid, data->vrm));
^~~~~~~
drivers/hwmon/adm9240.c:245:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n", AOUT_FROM_REG(regval));
^~~~~~~
drivers/hwmon/adm9240.c:245:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11
return sprintf(buf, "%d\n", AOUT_FROM_REG(regval));
^~~~~~~
Suppressed 50 warnings (50 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
51 warnings generated.
drivers/hwmon/ads7828.c:65:9: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(buf, "%d\n",
^~~~~~~
drivers/hwmon/ads7828.c:65:9: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11
return sprintf(buf, "%d\n",
^~~~~~~
Suppressed 50 warnings (50 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
38 warnings generated.
Suppressed 38 warnings (38 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
39 warnings generated.
Suppressed 39 warnings (39 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
50 warnings generated.
Suppressed 50 warnings (50 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
53 warnings generated.
Suppressed 53 warnings (53 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
53 warnings generated.
Suppressed 53 warnings (53 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
53 warnings generated.
Suppressed 53 warnings (53 in non-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.
drivers/staging/media/rkvdec/rkvdec-h264.c:657: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(hw_ps, 0, sizeof(*hw_ps));
^
include/linux/fortify-string.h:272:25: note: expanded from macro 'memset'
#define memset(p, c, s) __fortify_memset_chk(p, c, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk'
__underlying_memset(p, c, __fortify_size); \
^~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset'
#define __underlying_memset __builtin_memset
^~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:657: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(hw_ps, 0, sizeof(*hw_ps));
^
include/linux/fortify-string.h:272:25: note: expanded from macro 'memset'
#define memset(p, c, s) __fortify_memset_chk(p, c, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk'
__underlying_memset(p, c, __fortify_size); \
^~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset'
#define __underlying_memset __builtin_memset
^~~~~~~~~~~~~~~~
>> drivers/staging/media/rkvdec/rkvdec-h264.c:732:45: warning: Value stored to 'dec_params' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
const struct v4l2_ctrl_h264_decode_params *dec_params = run->decode_params;
^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:732:45: note: Value stored to 'dec_params' during its initialization is never read
const struct v4l2_ctrl_h264_decode_params *dec_params = run->decode_params;
^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:763: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(hw_rps, 0, sizeof(priv_tbl->rps));
^
include/linux/fortify-string.h:272:25: note: expanded from macro 'memset'
#define memset(p, c, s) __fortify_memset_chk(p, c, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk'
__underlying_memset(p, c, __fortify_size); \
^~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset'
#define __underlying_memset __builtin_memset
^~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:763: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(hw_rps, 0, sizeof(priv_tbl->rps));
^
include/linux/fortify-string.h:272:25: note: expanded from macro 'memset'
#define memset(p, c, s) __fortify_memset_chk(p, c, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:265:2: note: expanded from macro '__fortify_memset_chk'
__underlying_memset(p, c, __fortify_size); \
^~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:47:29: note: expanded from macro '__underlying_memset'
#define __underlying_memset __builtin_memset
^~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:826: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(tbl->scaling_list.scaling_list_4x4,
^
include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
#define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
__underlying_##op(p, q, __fortify_size); \
^~~~~~~~~~~~~~~~~
note: expanded from here
include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
#define __underlying_memcpy __builtin_memcpy
^~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:826: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(tbl->scaling_list.scaling_list_4x4,
^
include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
#define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
__underlying_##op(p, q, __fortify_size); \
^~~~~~~~~~~~~~~~~
note: expanded from here
include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
#define __underlying_memcpy __builtin_memcpy
^~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:830: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(tbl->scaling_list.scaling_list_8x8,
^
include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
#define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
__underlying_##op(p, q, __fortify_size); \
^~~~~~~~~~~~~~~~~
note: expanded from here
include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
#define __underlying_memcpy __builtin_memcpy
^~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:830: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(tbl->scaling_list.scaling_list_8x8,
^
include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
#define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
__underlying_##op(p, q, __fortify_size); \
^~~~~~~~~~~~~~~~~
note: expanded from here
include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
#define __underlying_memcpy __builtin_memcpy
^~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:1058: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(priv_tbl->cabac_table, rkvdec_h264_cabac_table,
^
include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
#define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
__underlying_##op(p, q, __fortify_size); \
^~~~~~~~~~~~~~~~~
note: expanded from here
include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
#define __underlying_memcpy __builtin_memcpy
^~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:1058: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(priv_tbl->cabac_table, rkvdec_h264_cabac_table,
^
include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
#define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/dec_params +732 drivers/staging/media/rkvdec/rkvdec-h264.c
cd33c830448baf Boris Brezillon 2020-04-04 728
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 729 static void lookup_ref_buf_idx(struct rkvdec_ctx *ctx,
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 730 struct rkvdec_h264_run *run)
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 731 {
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 @732 const struct v4l2_ctrl_h264_decode_params *dec_params = run->decode_params;
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 733 u32 i;
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 734
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 735 for (i = 0; i < ARRAY_SIZE(dec_params->dpb); i++) {
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 736 struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 737 const struct v4l2_h264_dpb_entry *dpb = run->decode_params->dpb;
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 738 struct vb2_queue *cap_q = &m2m_ctx->cap_q_ctx.q;
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 739 int buf_idx = -1;
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 740
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 741 if (dpb[i].flags & V4L2_H264_DPB_ENTRY_FLAG_ACTIVE)
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 742 buf_idx = vb2_find_timestamp(cap_q,
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 743 dpb[i].reference_ts, 0);
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 744
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 745 run->ref_buf_idx[i] = buf_idx;
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 746 }
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 747 }
7ab889f09dfa70 Nicolas Dufresne 2022-05-13 748
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
* drivers/staging/media/rkvdec/rkvdec-h264.c:732:45: warning: Value stored to 'dec_params' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-08-23 6:30 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-08-23 6:30 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 26139 bytes --]
::::::
:::::: Manual check reason: "low confidence static check warning: drivers/staging/media/rkvdec/rkvdec-h264.c:732:45: warning: Value stored to 'dec_params' during its initialization is never read [clang-analyzer-deadcode.DeadStores]"
::::::
BCC: lkp(a)intel.com
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Nicolas Dufresne <nicolas.dufresne@collabora.com>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-media(a)vger.kernel.org
CC: Sebastian Fricke <sebastian.fricke@collabora.com>
CC: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
CC: Hans Verkuil <hverkuil@xs4all.nl>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 072e51356cd5a4a1c12c1020bc054c99b98333df
commit: 7ab889f09dfa70e8097ec1b9186fd228124112cb media: rkvdec: h264: Fix dpb_valid implementation
date: 3 months ago
:::::: branch date: 12 hours ago
:::::: commit date: 3 months ago
config: arm-randconfig-c002-20220819 (https://download.01.org/0day-ci/archive/20220823/202208231452.J1mE9tYi-lkp(a)intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 0ac597f3cacf60479ffd36b03766fa7462dabd78)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7ab889f09dfa70e8097ec1b9186fd228124112cb
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7ab889f09dfa70e8097ec1b9186fd228124112cb
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^~~~~~
drivers/usb/misc/usbsevseg.c:261:4: 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(buf, " ");
^~~~~~
drivers/usb/misc/usbsevseg.c:264: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(buf, "\n");
^~~~~~
drivers/usb/misc/usbsevseg.c:264: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(buf, "\n");
^~~~~~
drivers/usb/misc/usbsevseg.c:289:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MYDEV_ATTR_SIMPLE_UNSIGNED(powered, update_display_powered);
^
drivers/usb/misc/usbsevseg.c:148:9: note: expanded from macro 'MYDEV_ATTR_SIMPLE_UNSIGNED'
return sprintf(buf, "%u\n", mydev->name); \
^~~~~~~
drivers/usb/misc/usbsevseg.c:289:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11
MYDEV_ATTR_SIMPLE_UNSIGNED(powered, update_display_powered);
^
drivers/usb/misc/usbsevseg.c:148:9: note: expanded from macro 'MYDEV_ATTR_SIMPLE_UNSIGNED'
return sprintf(buf, "%u\n", mydev->name); \
^~~~~~~
drivers/usb/misc/usbsevseg.c:290:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MYDEV_ATTR_SIMPLE_UNSIGNED(mode_msb, update_display_mode);
^
drivers/usb/misc/usbsevseg.c:148:9: note: expanded from macro 'MYDEV_ATTR_SIMPLE_UNSIGNED'
return sprintf(buf, "%u\n", mydev->name); \
^~~~~~~
drivers/usb/misc/usbsevseg.c:290:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11
MYDEV_ATTR_SIMPLE_UNSIGNED(mode_msb, update_display_mode);
^
drivers/usb/misc/usbsevseg.c:148:9: note: expanded from macro 'MYDEV_ATTR_SIMPLE_UNSIGNED'
return sprintf(buf, "%u\n", mydev->name); \
^~~~~~~
drivers/usb/misc/usbsevseg.c:291:1: warning: Call to function 'sprintf' 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 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
MYDEV_ATTR_SIMPLE_UNSIGNED(mode_lsb, update_display_mode);
^
drivers/usb/misc/usbsevseg.c:148:9: note: expanded from macro 'MYDEV_ATTR_SIMPLE_UNSIGNED'
return sprintf(buf, "%u\n", mydev->name); \
^~~~~~~
drivers/usb/misc/usbsevseg.c:291:1: note: Call to function 'sprintf' 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 'sprintf_s' in case of C11
MYDEV_ATTR_SIMPLE_UNSIGNED(mode_lsb, update_display_mode);
^
drivers/usb/misc/usbsevseg.c:148:9: note: expanded from macro 'MYDEV_ATTR_SIMPLE_UNSIGNED'
return sprintf(buf, "%u\n", mydev->name); \
^~~~~~~
Suppressed 31 warnings (31 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
43 warnings generated.
drivers/i2c/busses/i2c-iop3xx.c:481: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(new_adapter->name, pdev->name, strlen(pdev->name));
^~~~~~
drivers/i2c/busses/i2c-iop3xx.c:481: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(new_adapter->name, pdev->name, strlen(pdev->name));
^~~~~~
Suppressed 42 warnings (42 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
44 warnings generated.
drivers/i2c/busses/i2c-jz4780.c:573: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(buf, 0, len);
^~~~~~
drivers/i2c/busses/i2c-jz4780.c:573: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(buf, 0, len);
^~~~~~
drivers/i2c/busses/i2c-jz4780.c:784:2: 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]
sprintf(i2c->adap.name, "%s", pdev->name);
^~~~~~~
drivers/i2c/busses/i2c-jz4780.c:784:2: 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
sprintf(i2c->adap.name, "%s", pdev->name);
^~~~~~~
Suppressed 42 warnings (42 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
52 warnings generated.
drivers/staging/media/rkvdec/rkvdec.c:175: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(f, 0, sizeof(*f));
^~~~~~
drivers/staging/media/rkvdec/rkvdec.c:175: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(f, 0, sizeof(*f));
^~~~~~
drivers/staging/media/rkvdec/rkvdec.c:240: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(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
^~~~~~~~
drivers/staging/media/rkvdec/rkvdec.c:240: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(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
^~~~~~~~
drivers/staging/media/rkvdec/rkvdec.c:673: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(run, 0, sizeof(*run));
^~~~~~
drivers/staging/media/rkvdec/rkvdec.c:673: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(run, 0, sizeof(*run));
^~~~~~
Suppressed 49 warnings (48 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.
55 warnings generated.
drivers/staging/media/rkvdec/rkvdec-h264.c:657: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(hw_ps, 0, sizeof(*hw_ps));
^~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:657: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(hw_ps, 0, sizeof(*hw_ps));
^~~~~~
>> drivers/staging/media/rkvdec/rkvdec-h264.c:732:45: warning: Value stored to 'dec_params' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
const struct v4l2_ctrl_h264_decode_params *dec_params = run->decode_params;
^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:732:45: note: Value stored to 'dec_params' during its initialization is never read
const struct v4l2_ctrl_h264_decode_params *dec_params = run->decode_params;
^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:763: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(hw_rps, 0, sizeof(priv_tbl->rps));
^~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:763: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(hw_rps, 0, sizeof(priv_tbl->rps));
^~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:826: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(tbl->scaling_list.scaling_list_4x4,
^~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:826: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(tbl->scaling_list.scaling_list_4x4,
^~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:830: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(tbl->scaling_list.scaling_list_8x8,
^~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:830: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(tbl->scaling_list.scaling_list_8x8,
^~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:1058: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(priv_tbl->cabac_table, rkvdec_h264_cabac_table,
^~~~~~
drivers/staging/media/rkvdec/rkvdec-h264.c:1058: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(priv_tbl->cabac_table, rkvdec_h264_cabac_table,
^~~~~~
Suppressed 49 warnings (48 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.
18 warnings generated.
Suppressed 18 warnings (18 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
33 warnings generated.
drivers/mtd/devices/slram.c:87: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(priv->start + instr->addr, 0xff, instr->len);
^~~~~~
drivers/mtd/devices/slram.c:87: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(priv->start + instr->addr, 0xff, instr->len);
^~~~~~
drivers/mtd/devices/slram.c:112: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(buf, priv->start + from, len);
^~~~~~
drivers/mtd/devices/slram.c:112: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(buf, priv->start + from, len);
^~~~~~
drivers/mtd/devices/slram.c:122: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(priv->start + to, buf, len);
^~~~~~
drivers/mtd/devices/slram.c:122: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(priv->start + to, buf, len);
^~~~~~
Suppressed 30 warnings (30 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
47 warnings generated.
drivers/media/i2c/s5c73m3/s5c73m3-spi.c:72: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(padding, 0, sizeof(padding));
^~~~~~
drivers/media/i2c/s5c73m3/s5c73m3-spi.c:72: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(padding, 0, sizeof(padding));
^~~~~~
Suppressed 46 warnings (45 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.
46 warnings generated.
Suppressed 46 warnings (45 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.
48 warnings generated.
drivers/media/i2c/s5k5baf.c:1905: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), "S5K5BAF-CIS %d-%04x",
^~~~~~~~
drivers/media/i2c/s5k5baf.c:1905: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), "S5K5BAF-CIS %d-%04x",
^~~~~~~~
drivers/media/i2c/s5k5baf.c:1919: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), "S5K5BAF-ISP %d-%04x",
^~~~~~~~
drivers/media/i2c/s5k5baf.c:1919: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), "S5K5BAF-ISP %d-%04x",
^~~~~~~~
Suppressed 46 warnings (45 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.
32 warnings generated.
drivers/rtc/rtc-rs5c348.c:78:2: warning: Value stored to 'txp' is never read [clang-analyzer-deadcode.DeadStores]
txp = txbuf;
^ ~~~~~
drivers/rtc/rtc-rs5c348.c:78:2: note: Value stored to 'txp' is never read
txp = txbuf;
^ ~~~~~
Suppressed 31 warnings (31 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
43 warnings generated.
Suppressed 43 warnings (43 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
31 warnings generated.
Suppressed 31 warnings (31 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
44 warnings generated.
drivers/rtc/rtc-rx8025.c:197:3: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores]
status &= RX8025_BIT_CTRL2_DAFG;
vim +/dec_params +732 drivers/staging/media/rkvdec/rkvdec-h264.c
cd33c830448baf7 Boris Brezillon 2020-04-04 728
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 729 static void lookup_ref_buf_idx(struct rkvdec_ctx *ctx,
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 730 struct rkvdec_h264_run *run)
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 731 {
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 @732 const struct v4l2_ctrl_h264_decode_params *dec_params = run->decode_params;
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 733 u32 i;
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 734
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 735 for (i = 0; i < ARRAY_SIZE(dec_params->dpb); i++) {
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 736 struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 737 const struct v4l2_h264_dpb_entry *dpb = run->decode_params->dpb;
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 738 struct vb2_queue *cap_q = &m2m_ctx->cap_q_ctx.q;
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 739 int buf_idx = -1;
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 740
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 741 if (dpb[i].flags & V4L2_H264_DPB_ENTRY_FLAG_ACTIVE)
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 742 buf_idx = vb2_find_timestamp(cap_q,
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 743 dpb[i].reference_ts, 0);
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 744
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 745 run->ref_buf_idx[i] = buf_idx;
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 746 }
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 747 }
7ab889f09dfa70e Nicolas Dufresne 2022-05-13 748
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-23 6:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-27 3:04 drivers/staging/media/rkvdec/rkvdec-h264.c:732:45: warning: Value stored to 'dec_params' during its initialization is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2022-06-27 23:10 kernel test robot
2022-08-23 6:30 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.