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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58B79C32771 for ; Fri, 16 Sep 2022 03:40:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E448680009; Thu, 15 Sep 2022 23:40:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DF4968D0001; Thu, 15 Sep 2022 23:40:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C956280009; Thu, 15 Sep 2022 23:40:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id B997C8D0001 for ; Thu, 15 Sep 2022 23:40:36 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 91A331C6BD5 for ; Fri, 16 Sep 2022 03:40:36 +0000 (UTC) X-FDA: 79916546472.24.D2E128C Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by imf05.hostedemail.com (Postfix) with ESMTP id 02A551000BB for ; Fri, 16 Sep 2022 03:40:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663299636; x=1694835636; h=date:from:to:cc:subject:message-id:mime-version; bh=12e/ZkCQWlZUatp7RALNSI7tU4/o6vchHQo+aSEW4Uo=; b=hmFbgb48FxudObKtvW7xlURx79/9cWGDvprmpooU5SlHUCCJ5w1Ss1t5 tcui27NYIr+9afc8bqM0qacYYF1jH30HyELg/eOeeHnYY6JRc/e4h7Rvm nOAL4yFYYqEpcXBaEhqYZyvLhhsEeddW/Vg9T7x8TMaubJMbUQWoQ2EVF 76lJnsJc58lBROYkA6M3s/6NBM5QftO9FMWm5yNaq2gGyIfL9w1phVBsL 5EDBRwW1Wu/hnVwrY+AqwHZSoP73pghCttXSxOsUUzgWR0RrCzVmKbaog EbCDh/x9DYfQ8wpGfd3N42aykndjYpWljVB/nuAh54itwU73YtQGrimXx Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10471"; a="385193239" X-IronPort-AV: E=Sophos;i="5.93,319,1654585200"; d="scan'208";a="385193239" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2022 20:40:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,319,1654585200"; d="scan'208";a="595092128" Received: from lkp-server02.sh.intel.com (HELO 41300c7200ea) ([10.239.97.151]) by orsmga006.jf.intel.com with ESMTP; 15 Sep 2022 20:40:33 -0700 Received: from kbuild by 41300c7200ea with local (Exim 4.96) (envelope-from ) id 1oZ2DQ-0001P0-2k; Fri, 16 Sep 2022 03:40:32 +0000 Date: Fri, 16 Sep 2022 11:40:02 +0800 From: kernel test robot To: Kees Cook Cc: kbuild-all@lists.01.org, Linux Memory Management List Subject: [linux-next:master 5023/7393] arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:917: undefined reference to `warn_slowpath_fmt' Message-ID: <202209161144.x9xSqNQZ-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663299636; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=cI5bUqLQvYf4Vhq9GHV3Z18rYuxHQBC8RO2HjTiEG5M=; b=xt1xITqJjLz+T2nqOZGMAy8ZllqmwaiAEubBV/D1nmxPkaayBqr4U5jonWIspumrULsA7L TXPTSDe7hoBQ4twQ/Du8e5XEKMkSNTjiAu2psXQ+G7UaluKLNfedQcLYIGKjNEUN/MzDcj 8KzfffqBWCyoPyCmulaHZc6wx6TQ55A= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=hmFbgb48; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf05.hostedemail.com: domain of lkp@intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663299636; a=rsa-sha256; cv=none; b=DkgTGBtOm9YlTxel12BS0lge0BcNwcMx+/ly07hhdjiIT7PvdnMght8ricGgoC9LBSdi3U 3OQTBUP8O/FNFjp6q/RolVmWbHMfw9XAqc9gW1695tqmg+UWwK382QflUl8q1eHliIMiEQ MYqINpxgGo1bFH3l6vLrL58rlFcQrJ8= X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 02A551000BB X-Rspam-User: X-Stat-Signature: 9pth1bwoduoypick759z9y6xdgbochkm Authentication-Results: imf05.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=hmFbgb48; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf05.hostedemail.com: domain of lkp@intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=lkp@intel.com X-HE-Tag: 1663299635-325822 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 6ce5d01e7011b32600656bf90a626b1e51fb192a commit: 54d9469bc515dc5fcbc20eecbe19cea868b70d68 [5023/7393] fortify: Add run-time WARN for cross-field memcpy() config: mips-buildonly-randconfig-r006-20220915 (https://download.01.org/0day-ci/archive/20220916/202209161144.x9xSqNQZ-lkp@intel.com/config) compiler: mips64el-linux-gcc (GCC) 12.1.0 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/next/linux-next.git/commit/?id=54d9469bc515dc5fcbc20eecbe19cea868b70d68 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 54d9469bc515dc5fcbc20eecbe19cea868b70d68 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>): mips64el-linux-ld: arch/mips/boot/compressed/decompress.o: in function `lzma2_lzma': >> arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:917: undefined reference to `warn_slowpath_fmt' vim +917 arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c 24fa0402a9b6a5 Lasse Collin 2011-01-12 862 24fa0402a9b6a5 Lasse Collin 2011-01-12 863 /********* 24fa0402a9b6a5 Lasse Collin 2011-01-12 864 * LZMA2 * 24fa0402a9b6a5 Lasse Collin 2011-01-12 865 *********/ 24fa0402a9b6a5 Lasse Collin 2011-01-12 866 24fa0402a9b6a5 Lasse Collin 2011-01-12 867 /* 24fa0402a9b6a5 Lasse Collin 2011-01-12 868 * The LZMA decoder assumes that if the input limit (s->rc.in_limit) hasn't 24fa0402a9b6a5 Lasse Collin 2011-01-12 869 * been exceeded, it is safe to read up to LZMA_IN_REQUIRED bytes. This 24fa0402a9b6a5 Lasse Collin 2011-01-12 870 * wrapper function takes care of making the LZMA decoder's assumption safe. 24fa0402a9b6a5 Lasse Collin 2011-01-12 871 * 24fa0402a9b6a5 Lasse Collin 2011-01-12 872 * As long as there is plenty of input left to be decoded in the current LZMA 24fa0402a9b6a5 Lasse Collin 2011-01-12 873 * chunk, we decode directly from the caller-supplied input buffer until 24fa0402a9b6a5 Lasse Collin 2011-01-12 874 * there's LZMA_IN_REQUIRED bytes left. Those remaining bytes are copied into 24fa0402a9b6a5 Lasse Collin 2011-01-12 875 * s->temp.buf, which (hopefully) gets filled on the next call to this 24fa0402a9b6a5 Lasse Collin 2011-01-12 876 * function. We decode a few bytes from the temporary buffer so that we can 24fa0402a9b6a5 Lasse Collin 2011-01-12 877 * continue decoding from the caller-supplied input buffer again. 24fa0402a9b6a5 Lasse Collin 2011-01-12 878 */ 24fa0402a9b6a5 Lasse Collin 2011-01-12 879 static bool lzma2_lzma(struct xz_dec_lzma2 *s, struct xz_buf *b) 24fa0402a9b6a5 Lasse Collin 2011-01-12 880 { 24fa0402a9b6a5 Lasse Collin 2011-01-12 881 size_t in_avail; 24fa0402a9b6a5 Lasse Collin 2011-01-12 882 uint32_t tmp; 24fa0402a9b6a5 Lasse Collin 2011-01-12 883 24fa0402a9b6a5 Lasse Collin 2011-01-12 884 in_avail = b->in_size - b->in_pos; 24fa0402a9b6a5 Lasse Collin 2011-01-12 885 if (s->temp.size > 0 || s->lzma2.compressed == 0) { 24fa0402a9b6a5 Lasse Collin 2011-01-12 886 tmp = 2 * LZMA_IN_REQUIRED - s->temp.size; 24fa0402a9b6a5 Lasse Collin 2011-01-12 887 if (tmp > s->lzma2.compressed - s->temp.size) 24fa0402a9b6a5 Lasse Collin 2011-01-12 888 tmp = s->lzma2.compressed - s->temp.size; 24fa0402a9b6a5 Lasse Collin 2011-01-12 889 if (tmp > in_avail) 24fa0402a9b6a5 Lasse Collin 2011-01-12 890 tmp = in_avail; 24fa0402a9b6a5 Lasse Collin 2011-01-12 891 24fa0402a9b6a5 Lasse Collin 2011-01-12 892 memcpy(s->temp.buf + s->temp.size, b->in + b->in_pos, tmp); 24fa0402a9b6a5 Lasse Collin 2011-01-12 893 24fa0402a9b6a5 Lasse Collin 2011-01-12 894 if (s->temp.size + tmp == s->lzma2.compressed) { 24fa0402a9b6a5 Lasse Collin 2011-01-12 895 memzero(s->temp.buf + s->temp.size + tmp, 24fa0402a9b6a5 Lasse Collin 2011-01-12 896 sizeof(s->temp.buf) 24fa0402a9b6a5 Lasse Collin 2011-01-12 897 - s->temp.size - tmp); 24fa0402a9b6a5 Lasse Collin 2011-01-12 898 s->rc.in_limit = s->temp.size + tmp; 24fa0402a9b6a5 Lasse Collin 2011-01-12 899 } else if (s->temp.size + tmp < LZMA_IN_REQUIRED) { 24fa0402a9b6a5 Lasse Collin 2011-01-12 900 s->temp.size += tmp; 24fa0402a9b6a5 Lasse Collin 2011-01-12 901 b->in_pos += tmp; 24fa0402a9b6a5 Lasse Collin 2011-01-12 902 return true; 24fa0402a9b6a5 Lasse Collin 2011-01-12 903 } else { 24fa0402a9b6a5 Lasse Collin 2011-01-12 904 s->rc.in_limit = s->temp.size + tmp - LZMA_IN_REQUIRED; 24fa0402a9b6a5 Lasse Collin 2011-01-12 905 } 24fa0402a9b6a5 Lasse Collin 2011-01-12 906 24fa0402a9b6a5 Lasse Collin 2011-01-12 907 s->rc.in = s->temp.buf; 24fa0402a9b6a5 Lasse Collin 2011-01-12 908 s->rc.in_pos = 0; 24fa0402a9b6a5 Lasse Collin 2011-01-12 909 24fa0402a9b6a5 Lasse Collin 2011-01-12 910 if (!lzma_main(s) || s->rc.in_pos > s->temp.size + tmp) 24fa0402a9b6a5 Lasse Collin 2011-01-12 911 return false; 24fa0402a9b6a5 Lasse Collin 2011-01-12 912 24fa0402a9b6a5 Lasse Collin 2011-01-12 913 s->lzma2.compressed -= s->rc.in_pos; 24fa0402a9b6a5 Lasse Collin 2011-01-12 914 24fa0402a9b6a5 Lasse Collin 2011-01-12 915 if (s->rc.in_pos < s->temp.size) { 24fa0402a9b6a5 Lasse Collin 2011-01-12 916 s->temp.size -= s->rc.in_pos; 24fa0402a9b6a5 Lasse Collin 2011-01-12 @917 memmove(s->temp.buf, s->temp.buf + s->rc.in_pos, 24fa0402a9b6a5 Lasse Collin 2011-01-12 918 s->temp.size); 24fa0402a9b6a5 Lasse Collin 2011-01-12 919 return true; 24fa0402a9b6a5 Lasse Collin 2011-01-12 920 } 24fa0402a9b6a5 Lasse Collin 2011-01-12 921 24fa0402a9b6a5 Lasse Collin 2011-01-12 922 b->in_pos += s->rc.in_pos - s->temp.size; 24fa0402a9b6a5 Lasse Collin 2011-01-12 923 s->temp.size = 0; 24fa0402a9b6a5 Lasse Collin 2011-01-12 924 } 24fa0402a9b6a5 Lasse Collin 2011-01-12 925 24fa0402a9b6a5 Lasse Collin 2011-01-12 926 in_avail = b->in_size - b->in_pos; 24fa0402a9b6a5 Lasse Collin 2011-01-12 927 if (in_avail >= LZMA_IN_REQUIRED) { 24fa0402a9b6a5 Lasse Collin 2011-01-12 928 s->rc.in = b->in; 24fa0402a9b6a5 Lasse Collin 2011-01-12 929 s->rc.in_pos = b->in_pos; 24fa0402a9b6a5 Lasse Collin 2011-01-12 930 24fa0402a9b6a5 Lasse Collin 2011-01-12 931 if (in_avail >= s->lzma2.compressed + LZMA_IN_REQUIRED) 24fa0402a9b6a5 Lasse Collin 2011-01-12 932 s->rc.in_limit = b->in_pos + s->lzma2.compressed; 24fa0402a9b6a5 Lasse Collin 2011-01-12 933 else 24fa0402a9b6a5 Lasse Collin 2011-01-12 934 s->rc.in_limit = b->in_size - LZMA_IN_REQUIRED; 24fa0402a9b6a5 Lasse Collin 2011-01-12 935 24fa0402a9b6a5 Lasse Collin 2011-01-12 936 if (!lzma_main(s)) 24fa0402a9b6a5 Lasse Collin 2011-01-12 937 return false; 24fa0402a9b6a5 Lasse Collin 2011-01-12 938 24fa0402a9b6a5 Lasse Collin 2011-01-12 939 in_avail = s->rc.in_pos - b->in_pos; 24fa0402a9b6a5 Lasse Collin 2011-01-12 940 if (in_avail > s->lzma2.compressed) 24fa0402a9b6a5 Lasse Collin 2011-01-12 941 return false; 24fa0402a9b6a5 Lasse Collin 2011-01-12 942 24fa0402a9b6a5 Lasse Collin 2011-01-12 943 s->lzma2.compressed -= in_avail; 24fa0402a9b6a5 Lasse Collin 2011-01-12 944 b->in_pos = s->rc.in_pos; 24fa0402a9b6a5 Lasse Collin 2011-01-12 945 } 24fa0402a9b6a5 Lasse Collin 2011-01-12 946 24fa0402a9b6a5 Lasse Collin 2011-01-12 947 in_avail = b->in_size - b->in_pos; 24fa0402a9b6a5 Lasse Collin 2011-01-12 948 if (in_avail < LZMA_IN_REQUIRED) { 24fa0402a9b6a5 Lasse Collin 2011-01-12 949 if (in_avail > s->lzma2.compressed) 24fa0402a9b6a5 Lasse Collin 2011-01-12 950 in_avail = s->lzma2.compressed; 24fa0402a9b6a5 Lasse Collin 2011-01-12 951 24fa0402a9b6a5 Lasse Collin 2011-01-12 952 memcpy(s->temp.buf, b->in + b->in_pos, in_avail); 24fa0402a9b6a5 Lasse Collin 2011-01-12 953 s->temp.size = in_avail; 24fa0402a9b6a5 Lasse Collin 2011-01-12 954 b->in_pos += in_avail; 24fa0402a9b6a5 Lasse Collin 2011-01-12 955 } 24fa0402a9b6a5 Lasse Collin 2011-01-12 956 24fa0402a9b6a5 Lasse Collin 2011-01-12 957 return true; 24fa0402a9b6a5 Lasse Collin 2011-01-12 958 } 24fa0402a9b6a5 Lasse Collin 2011-01-12 959 :::::: The code at line 917 was first introduced by commit :::::: 24fa0402a9b6a537e87e38341e78b7da86486846 decompressors: add XZ decompressor module :::::: TO: Lasse Collin :::::: CC: Linus Torvalds -- 0-DAY CI Kernel Test Service https://01.org/lkp