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 C9473C433F5 for ; Mon, 11 Apr 2022 17:53:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 565CC6B0073; Mon, 11 Apr 2022 13:53:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5140C6B0074; Mon, 11 Apr 2022 13:53:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 38F3B6B0075; Mon, 11 Apr 2022 13:53:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0164.hostedemail.com [216.40.44.164]) by kanga.kvack.org (Postfix) with ESMTP id 245F96B0074 for ; Mon, 11 Apr 2022 13:53:32 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id BBA04183CEEFA for ; Mon, 11 Apr 2022 17:53:31 +0000 (UTC) X-FDA: 79345345422.26.89B5893 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by imf06.hostedemail.com (Postfix) with ESMTP id 87A3518000C for ; Mon, 11 Apr 2022 17:53:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649699610; x=1681235610; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ihSl53HmoW8V8tl9x2rDS+FtB+iBQEshKlFoJlDUI2o=; b=UOycPOloNVJ62wexMLHLVJC+LDfsaAubUoqKhzgJYPZMx0NRU1MgY9J6 UlP5YTwAyRjKnR/IQFNFXnAY9LdOnrjfFf78jVkQTWAPl/8dcZ9dlKIwh t2rW9E3wJ9WpxQlpKueEogYGkeFBuPEWtdbC3ndMzPyuJL+s5keAxACw+ hP8f/rCG0wBjJMsSf4eBU1SSkUJLfLTlXLpXqpFE5xHkGmiqJo5hH0r4f vPWESpLHRs4MJSa2AHCDxh/fFy4UGueHprZA+7P0ylPK1lmLLASYIm8Je JDyvfzne+CuuK1oSVtBD/i5aJ147xDEyJXklo7DJgW0xrcskfBxNqEHTT g==; X-IronPort-AV: E=McAfee;i="6400,9594,10314"; a="261923041" X-IronPort-AV: E=Sophos;i="5.90,252,1643702400"; d="scan'208";a="261923041" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2022 10:53:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,252,1643702400"; d="scan'208";a="525632417" Received: from lkp-server02.sh.intel.com (HELO d3fc50ef50de) ([10.239.97.151]) by orsmga002.jf.intel.com with ESMTP; 11 Apr 2022 10:53:26 -0700 Received: from kbuild by d3fc50ef50de with local (Exim 4.95) (envelope-from ) id 1ndyEA-00022F-8o; Mon, 11 Apr 2022 17:53:26 +0000 Date: Tue, 12 Apr 2022 01:53:02 +0800 From: kernel test robot To: Christophe Leroy , Kees Cook , Arnd Bergmann , Greg Kroah-Hartman Cc: kbuild-all@lists.01.org, Christophe Leroy , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] lkdtm/bugs: Don't expect thread termination without CONFIG_UBSAN_TRAP Message-ID: <202204120139.6efSg72F-lkp@intel.com> References: <7c2d2a48034223a95cf4346c5a2255a0b9b25670.1649688637.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c2d2a48034223a95cf4346c5a2255a0b9b25670.1649688637.git.christophe.leroy@csgroup.eu> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: jbc3cyx6huph4e6easfso4a334heputh Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=UOycPOlo; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf06.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.65) smtp.mailfrom=lkp@intel.com X-Rspamd-Queue-Id: 87A3518000C X-HE-Tag: 1649699610-834667 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: Hi Christophe, I love your patch! Yet something to improve: [auto build test ERROR on char-misc/char-misc-testing] [also build test ERROR on kees/for-next/pstore soc/for-next linus/master v5.18-rc2 next-20220411] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/intel-lab-lkp/linux/commits/Christophe-Leroy/lkdtm-bugs-Don-t-expect-thread-termination-without-CONFIG_UBSAN_TRAP/20220411-225758 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 3123109284176b1532874591f7c81f3837bbdc17 config: microblaze-buildonly-randconfig-r002-20220411 (https://download.01.org/0day-ci/archive/20220412/202204120139.6efSg72F-lkp@intel.com/config) compiler: microblaze-linux-gcc (GCC) 11.2.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://github.com/intel-lab-lkp/linux/commit/50ed7d4c37c2080e281638b783a912193a02eed9 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Christophe-Leroy/lkdtm-bugs-Don-t-expect-thread-termination-without-CONFIG_UBSAN_TRAP/20220411-225758 git checkout 50ed7d4c37c2080e281638b783a912193a02eed9 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=microblaze SHELL=/bin/bash drivers/misc/lkdtm/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/misc/lkdtm/bugs.c: In function 'lkdtm_ARRAY_BOUNDS': >> drivers/misc/lkdtm/bugs.c:351:9: error: 'else' without a previous 'if' 351 | else | ^~~~ vim +351 drivers/misc/lkdtm/bugs.c 321 322 void lkdtm_ARRAY_BOUNDS(void) 323 { 324 struct array_bounds_flex_array *not_checked; 325 struct array_bounds *checked; 326 volatile int i; 327 328 not_checked = kmalloc(sizeof(*not_checked) * 2, GFP_KERNEL); 329 checked = kmalloc(sizeof(*checked) * 2, GFP_KERNEL); 330 331 pr_info("Array access within bounds ...\n"); 332 /* For both, touch all bytes in the actual member size. */ 333 for (i = 0; i < sizeof(checked->data); i++) 334 checked->data[i] = 'A'; 335 /* 336 * For the uninstrumented flex array member, also touch 1 byte 337 * beyond to verify it is correctly uninstrumented. 338 */ 339 for (i = 0; i < sizeof(not_checked->data) + 1; i++) 340 not_checked->data[i] = 'A'; 341 342 pr_info("Array access beyond bounds ...\n"); 343 for (i = 0; i < sizeof(checked->data) + 1; i++) 344 checked->data[i] = 'B'; 345 346 kfree(not_checked); 347 kfree(checked); 348 pr_err("FAIL: survived array bounds overflow!\n"); 349 if (IS_ENABLED(CONFIG_UBSAN_BOUNDS)) 350 pr_expected_config(CONFIG_UBSAN_TRAP); > 351 else 352 pr_expected_config(CONFIG_UBSAN_BOUNDS); 353 } 354 -- 0-DAY CI Kernel Test Service https://01.org/lkp