lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202206220835.2xwbmnW9-lkp@intel.com>
Date:   Wed, 22 Jun 2022 08:19:06 +0800
From:   kernel test robot <lkp@...el.com>
To:     Michael Grzeschik <m.grzeschik@...gutronix.de>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Paul Kocialkowski <paul.kocialkowski@...tlin.com>
Subject: [mgr:v5.19/topic/rk3568-vepu-h264-stateless-bootlin 3/4]
 drivers/staging/media/hantro/hantro_h264.c:1254:27: sparse: sparse:
 incorrect type in assignment (different base types)

tree:   https://git.pengutronix.de/git/mgr/linux v5.19/topic/rk3568-vepu-h264-stateless-bootlin
head:   11fcd09bf7cbe84c3e2e322142e3aff59c5c8402
commit: a373f546c23855d80f8a6be85fc11748ed54413d [3/4] media: hantro: Add H.264 encoding support
config: riscv-randconfig-s031-20220619 (https://download.01.org/0day-ci/archive/20220622/202206220835.2xwbmnW9-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 11.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-31-g4880bd19-dirty
        git remote add mgr https://git.pengutronix.de/git/mgr/linux
        git fetch --no-tags mgr v5.19/topic/rk3568-vepu-h264-stateless-bootlin
        git checkout a373f546c23855d80f8a6be85fc11748ed54413d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/staging/media/hantro/hantro_h264.c:1254:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] @@     got restricted __be64 [usertype] @@
   drivers/staging/media/hantro/hantro_h264.c:1254:27: sparse:     expected unsigned long long [usertype]
   drivers/staging/media/hantro/hantro_h264.c:1254:27: sparse:     got restricted __be64 [usertype]

vim +1254 drivers/staging/media/hantro/hantro_h264.c

  1214	
  1215	static void cabac_table_init(struct hantro_aux_buf *cabac_table,
  1216				     u32 cabac_init_idc)
  1217	{
  1218		u8 *table = cabac_table->cpu;
  1219		u64 *buffer = cabac_table->cpu;
  1220		unsigned int i, j;
  1221		unsigned int size;
  1222		s32 qp;
  1223	
  1224		/* Iterate possible QP values. */
  1225		for (qp = 0; qp < 52; qp++) {
  1226			/* Iterate intra/inter modes. */
  1227			for (j = 0; j < 2; j++) {
  1228				const s32 (*context)[460][2];
  1229	
  1230				if (j == 0)
  1231					context = &h264_context_init_intra;
  1232				else
  1233					context = &h264_context_init[cabac_init_idc];
  1234	
  1235				for (i = 0; i < 460; i++) {
  1236					s32 m = (s32)(*context)[i][0];
  1237					s32 n = (s32)(*context)[i][1];
  1238	
  1239					s32 pre_ctx_st = CLIP3(((m * qp) >> 4) + n,
  1240							       1, 126);
  1241					u32 idx = qp * 464 * 2 + j * 464 + i;
  1242	
  1243					if (pre_ctx_st <= 63)
  1244						table[idx] = (u8)((63 - pre_ctx_st) << 1);
  1245					else
  1246						table[idx] = (u8)(((pre_ctx_st - 64) << 1) | 1);
  1247				}
  1248			}
  1249		}
  1250	
  1251		size = HANTRO_H264_ENC_CABAC_TABLE_SIZE / sizeof(*buffer);
  1252	
  1253		for (i = 0; i < size; i++)
> 1254			buffer[i] = cpu_to_be64(buffer[i]);
  1255	}
  1256	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ