linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
	Kees Cook <keescook@chromium.org>, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: kbuild-all@lists.01.org,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] lkdtm/bugs: Don't expect thread termination without CONFIG_UBSAN_TRAP
Date: Tue, 12 Apr 2022 01:53:02 +0800	[thread overview]
Message-ID: <202204120139.6efSg72F-lkp@intel.com> (raw)
In-Reply-To: <7c2d2a48034223a95cf4346c5a2255a0b9b25670.1649688637.git.christophe.leroy@csgroup.eu>

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 <lkp@intel.com>

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


      reply	other threads:[~2022-04-11 17:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 14:56 [PATCH] lkdtm/bugs: Don't expect thread termination without CONFIG_UBSAN_TRAP Christophe Leroy
2022-04-11 17:53 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202204120139.6efSg72F-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arnd@arndb.de \
    --cc=christophe.leroy@csgroup.eu \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).