From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5EF4C433EF for ; Wed, 22 Dec 2021 16:15:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233120AbhLVQPA (ORCPT ); Wed, 22 Dec 2021 11:15:00 -0500 Received: from mga07.intel.com ([134.134.136.100]:7469 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230463AbhLVQO6 (ORCPT ); Wed, 22 Dec 2021 11:14:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1640189698; x=1671725698; h=date:from:to:cc:subject:message-id:mime-version; bh=mYdYY+ADtjn6HzBwQue9prErm9yOuvehXfs4ypch/Lw=; b=iUtrtRXy39T/atUv6/8cuR16aFsHs99+4vjifMbig8qd1G82pZaNeZqS 6OIcfb669xZoWd/0Mp1V4vrJuFPWj/9cchoiupPlOcexLGA9hxXrFFmOq 5fbVgPbuYG1dPbxl+8JtkUbjRjGvE4cHNYM2lGmFqgsX/cvvNljeMTeAF nc3rmZMSMgDXPtfF6J0YLT8BzvtGVJMY2ks9wvJmuD19aunWanZ7g4/vx lLMjCM9JIs7eqgTBNNlOHTAF/uSFC3Wmi/Iti7HgX1TtMyyni29kfoPXM y3eWsff2Y9ubz87M6zk7Pcgsm8Ws19Pn5fVegNI/t21LPj6x/q/8mmJHa Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10206"; a="304021845" X-IronPort-AV: E=Sophos;i="5.88,227,1635231600"; d="scan'208";a="304021845" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2021 08:14:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,227,1635231600"; d="scan'208";a="508523641" Received: from lkp-server01.sh.intel.com (HELO e357b3ef1427) ([10.239.97.150]) by orsmga007.jf.intel.com with ESMTP; 22 Dec 2021 08:14:54 -0800 Received: from kbuild by e357b3ef1427 with local (Exim 4.92) (envelope-from ) id 1n04GT-0000kC-HW; Wed, 22 Dec 2021 16:14:53 +0000 Date: Thu, 23 Dec 2021 00:13:57 +0800 From: kernel test robot To: "Russell King (Oracle)" Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org Subject: arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:393:28: sparse: sparse: incorrect type in argument 1 (different base types) Message-ID: <202112230059.QSushf7X-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Russell, First bad commit (maybe != root cause): tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 2f47a9a4dfa3674fad19a49b40c5103a9a8e1589 commit: 11779842dd6f59505f5685bdd6ebaaa7a5bc1d94 Merge branches 'devel-stable' and 'misc' into for-linus date: 7 weeks ago config: arm-randconfig-s032-20211222 (https://download.01.org/0day-ci/archive/20211223/202112230059.QSushf7X-lkp@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=11779842dd6f59505f5685bdd6ebaaa7a5bc1d94 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 11779842dd6f59505f5685bdd6ebaaa7a5bc1d94 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) arch/arm/boot/compressed/decompress.c: note: in included file (through arch/arm/boot/compressed/../../../../lib/decompress_unxz.c): include/linux/decompress/mm.h:31:30: sparse: sparse: symbol 'malloc_ptr' was not declared. Should it be static? include/linux/decompress/mm.h:32:20: sparse: sparse: symbol 'malloc_count' was not declared. Should it be static? arch/arm/boot/compressed/decompress.c: note: in included file (through arch/arm/boot/compressed/../../../../lib/decompress_unxz.c): arch/arm/boot/compressed/decompress.c: note: in included file (through arch/arm/boot/compressed/../../../../lib/decompress_unxz.c): >> arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:393:28: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __le32 const [usertype] *p @@ got unsigned int const [usertype] * @@ arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:393:28: sparse: expected restricted __le32 const [usertype] *p arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:393:28: sparse: got unsigned int const [usertype] * arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:427:48: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __le32 const [usertype] *p @@ got unsigned int const [usertype] * @@ arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:427:48: sparse: expected restricted __le32 const [usertype] *p arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:427:48: sparse: got unsigned int const [usertype] * arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:435:37: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __le32 const [usertype] *p @@ got unsigned int const [usertype] * @@ arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:435:37: sparse: expected restricted __le32 const [usertype] *p arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:435:37: sparse: got unsigned int const [usertype] * arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:459:28: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __le32 const [usertype] *p @@ got unsigned int const [usertype] * @@ arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:459:28: sparse: expected restricted __le32 const [usertype] *p arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:459:28: sparse: got unsigned int const [usertype] * vim +393 arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c 24fa0402a9b6a5 Lasse Collin 2011-01-12 385 24fa0402a9b6a5 Lasse Collin 2011-01-12 386 /* Decode the Stream Header field (the first 12 bytes of the .xz Stream). */ 24fa0402a9b6a5 Lasse Collin 2011-01-12 387 static enum xz_ret dec_stream_header(struct xz_dec *s) 24fa0402a9b6a5 Lasse Collin 2011-01-12 388 { 24fa0402a9b6a5 Lasse Collin 2011-01-12 389 if (!memeq(s->temp.buf, HEADER_MAGIC, HEADER_MAGIC_SIZE)) 24fa0402a9b6a5 Lasse Collin 2011-01-12 390 return XZ_FORMAT_ERROR; 24fa0402a9b6a5 Lasse Collin 2011-01-12 391 24fa0402a9b6a5 Lasse Collin 2011-01-12 392 if (xz_crc32(s->temp.buf + HEADER_MAGIC_SIZE, 2, 0) 24fa0402a9b6a5 Lasse Collin 2011-01-12 @393 != get_le32(s->temp.buf + HEADER_MAGIC_SIZE + 2)) 24fa0402a9b6a5 Lasse Collin 2011-01-12 394 return XZ_DATA_ERROR; 24fa0402a9b6a5 Lasse Collin 2011-01-12 395 24fa0402a9b6a5 Lasse Collin 2011-01-12 396 if (s->temp.buf[HEADER_MAGIC_SIZE] != 0) 24fa0402a9b6a5 Lasse Collin 2011-01-12 397 return XZ_OPTIONS_ERROR; 24fa0402a9b6a5 Lasse Collin 2011-01-12 398 24fa0402a9b6a5 Lasse Collin 2011-01-12 399 /* 24fa0402a9b6a5 Lasse Collin 2011-01-12 400 * Of integrity checks, we support only none (Check ID = 0) and 24fa0402a9b6a5 Lasse Collin 2011-01-12 401 * CRC32 (Check ID = 1). However, if XZ_DEC_ANY_CHECK is defined, 24fa0402a9b6a5 Lasse Collin 2011-01-12 402 * we will accept other check types too, but then the check won't 24fa0402a9b6a5 Lasse Collin 2011-01-12 403 * be verified and a warning (XZ_UNSUPPORTED_CHECK) will be given. 24fa0402a9b6a5 Lasse Collin 2011-01-12 404 */ 24fa0402a9b6a5 Lasse Collin 2011-01-12 405 s->check_type = s->temp.buf[HEADER_MAGIC_SIZE + 1]; 24fa0402a9b6a5 Lasse Collin 2011-01-12 406 :::::: The code at line 393 was first introduced by commit :::::: 24fa0402a9b6a537e87e38341e78b7da86486846 decompressors: add XZ decompressor module :::::: TO: Lasse Collin :::::: CC: Linus Torvalds --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============7861332320435223790==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:393:28: sparse: sparse: incorrect type in argument 1 (different base types) Date: Thu, 23 Dec 2021 00:13:57 +0800 Message-ID: <202112230059.QSushf7X-lkp@intel.com> List-Id: --===============7861332320435223790== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Russell, First bad commit (maybe !=3D root cause): tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git = master head: 2f47a9a4dfa3674fad19a49b40c5103a9a8e1589 commit: 11779842dd6f59505f5685bdd6ebaaa7a5bc1d94 Merge branches 'devel-stab= le' and 'misc' into for-linus date: 7 weeks ago config: arm-randconfig-s032-20211222 (https://download.01.org/0day-ci/archi= ve/20211223/202112230059.QSushf7X-lkp(a)intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.gi= t/commit/?id=3D11779842dd6f59505f5685bdd6ebaaa7a5bc1d94 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/gi= t/torvalds/linux.git git fetch --no-tags linus master git checkout 11779842dd6f59505f5685bdd6ebaaa7a5bc1d94 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=3Dbuild_dir ARCH=3Da= rm SHELL=3D/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) arch/arm/boot/compressed/decompress.c: note: in included file (through a= rch/arm/boot/compressed/../../../../lib/decompress_unxz.c): include/linux/decompress/mm.h:31:30: sparse: sparse: symbol 'malloc_ptr'= was not declared. Should it be static? include/linux/decompress/mm.h:32:20: sparse: sparse: symbol 'malloc_coun= t' was not declared. Should it be static? arch/arm/boot/compressed/decompress.c: note: in included file (through a= rch/arm/boot/compressed/../../../../lib/decompress_unxz.c): arch/arm/boot/compressed/decompress.c: note: in included file (through a= rch/arm/boot/compressed/../../../../lib/decompress_unxz.c): >> arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:393:28: spar= se: sparse: incorrect type in argument 1 (different base types) @@ expe= cted restricted __le32 const [usertype] *p @@ got unsigned int const [u= sertype] * @@ arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:393:28: spar= se: expected restricted __le32 const [usertype] *p arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:393:28: spar= se: got unsigned int const [usertype] * arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:427:48: spar= se: sparse: incorrect type in argument 1 (different base types) @@ expe= cted restricted __le32 const [usertype] *p @@ got unsigned int const [u= sertype] * @@ arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:427:48: spar= se: expected restricted __le32 const [usertype] *p arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:427:48: spar= se: got unsigned int const [usertype] * arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:435:37: spar= se: sparse: incorrect type in argument 1 (different base types) @@ expe= cted restricted __le32 const [usertype] *p @@ got unsigned int const [u= sertype] * @@ arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:435:37: spar= se: expected restricted __le32 const [usertype] *p arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:435:37: spar= se: got unsigned int const [usertype] * arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:459:28: spar= se: sparse: incorrect type in argument 1 (different base types) @@ expe= cted restricted __le32 const [usertype] *p @@ got unsigned int const [u= sertype] * @@ arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:459:28: spar= se: expected restricted __le32 const [usertype] *p arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:459:28: spar= se: got unsigned int const [usertype] * vim +393 arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c 24fa0402a9b6a5 Lasse Collin 2011-01-12 385 = 24fa0402a9b6a5 Lasse Collin 2011-01-12 386 /* Decode the Stream Header fi= eld (the first 12 bytes of the .xz Stream). */ 24fa0402a9b6a5 Lasse Collin 2011-01-12 387 static enum xz_ret dec_stream_= header(struct xz_dec *s) 24fa0402a9b6a5 Lasse Collin 2011-01-12 388 { 24fa0402a9b6a5 Lasse Collin 2011-01-12 389 if (!memeq(s->temp.buf, HEADE= R_MAGIC, HEADER_MAGIC_SIZE)) 24fa0402a9b6a5 Lasse Collin 2011-01-12 390 return XZ_FORMAT_ERROR; 24fa0402a9b6a5 Lasse Collin 2011-01-12 391 = 24fa0402a9b6a5 Lasse Collin 2011-01-12 392 if (xz_crc32(s->temp.buf + HE= ADER_MAGIC_SIZE, 2, 0) 24fa0402a9b6a5 Lasse Collin 2011-01-12 @393 !=3D get_le32(s->temp.buf += HEADER_MAGIC_SIZE + 2)) 24fa0402a9b6a5 Lasse Collin 2011-01-12 394 return XZ_DATA_ERROR; 24fa0402a9b6a5 Lasse Collin 2011-01-12 395 = 24fa0402a9b6a5 Lasse Collin 2011-01-12 396 if (s->temp.buf[HEADER_MAGIC_= SIZE] !=3D 0) 24fa0402a9b6a5 Lasse Collin 2011-01-12 397 return XZ_OPTIONS_ERROR; 24fa0402a9b6a5 Lasse Collin 2011-01-12 398 = 24fa0402a9b6a5 Lasse Collin 2011-01-12 399 /* 24fa0402a9b6a5 Lasse Collin 2011-01-12 400 * Of integrity checks, we su= pport only none (Check ID =3D 0) and 24fa0402a9b6a5 Lasse Collin 2011-01-12 401 * CRC32 (Check ID =3D 1). Ho= wever, if XZ_DEC_ANY_CHECK is defined, 24fa0402a9b6a5 Lasse Collin 2011-01-12 402 * we will accept other check= types too, but then the check won't 24fa0402a9b6a5 Lasse Collin 2011-01-12 403 * be verified and a warning = (XZ_UNSUPPORTED_CHECK) will be given. 24fa0402a9b6a5 Lasse Collin 2011-01-12 404 */ 24fa0402a9b6a5 Lasse Collin 2011-01-12 405 s->check_type =3D s->temp.buf= [HEADER_MAGIC_SIZE + 1]; 24fa0402a9b6a5 Lasse Collin 2011-01-12 406 = :::::: The code at line 393 was first introduced by commit :::::: 24fa0402a9b6a537e87e38341e78b7da86486846 decompressors: add XZ decom= pressor module :::::: TO: Lasse Collin :::::: CC: Linus Torvalds --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============7861332320435223790==--