All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 10/10] kfence: add test suite
Date: Wed, 16 Sep 2020 13:13:59 +0800	[thread overview]
Message-ID: <202009161340.reaffL4D%lkp@intel.com> (raw)
In-Reply-To: <20200915132046.3332537-11-elver@google.com>

[-- Attachment #1: Type: text/plain, Size: 4439 bytes --]

Hi Marco,

I love your patch! Perhaps something to improve:

[auto build test WARNING on hnaz-linux-mm/master]
[also build test WARNING on arm64/for-next/core linus/master v5.9-rc5]
[cannot apply to tip/x86/core next-20200915]
[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/0day-ci/linux/commits/Marco-Elver/KFENCE-A-low-overhead-sampling-based-memory-safety-error-detector/20200915-212305
base:   https://github.com/hnaz/linux-mm master
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   mm/kfence/kfence_test.c: In function 'report_matches':
>> mm/kfence/kfence_test.c:150:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     150 | }
         | ^

# https://github.com/0day-ci/linux/commit/e52f64e8d3cbfe2423913871780cf012b2abeb21
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Marco-Elver/KFENCE-A-low-overhead-sampling-based-memory-safety-error-detector/20200915-212305
git checkout e52f64e8d3cbfe2423913871780cf012b2abeb21
vim +150 mm/kfence/kfence_test.c

    74	
    75	/* Check observed report matches information in @r. */
    76	static bool report_matches(const struct expect_report *r)
    77	{
    78		bool ret = false;
    79		unsigned long flags;
    80		typeof(observed.lines) expect;
    81		const char *end;
    82		char *cur;
    83	
    84		/* Doubled-checked locking. */
    85		if (!report_available())
    86			return false;
    87	
    88		/* Generate expected report contents. */
    89	
    90		/* Title */
    91		cur = expect[0];
    92		end = &expect[0][sizeof(expect[0]) - 1];
    93		switch (r->type) {
    94		case KFENCE_ERROR_OOB:
    95			cur += scnprintf(cur, end - cur, "BUG: KFENCE: out-of-bounds");
    96			break;
    97		case KFENCE_ERROR_UAF:
    98			cur += scnprintf(cur, end - cur, "BUG: KFENCE: use-after-free");
    99			break;
   100		case KFENCE_ERROR_CORRUPTION:
   101			cur += scnprintf(cur, end - cur, "BUG: KFENCE: memory corruption");
   102			break;
   103		case KFENCE_ERROR_INVALID:
   104			cur += scnprintf(cur, end - cur, "BUG: KFENCE: invalid access");
   105			break;
   106		case KFENCE_ERROR_INVALID_FREE:
   107			cur += scnprintf(cur, end - cur, "BUG: KFENCE: invalid free");
   108			break;
   109		}
   110	
   111		scnprintf(cur, end - cur, " in %pS", r->fn);
   112		/* The exact offset won't match, remove it; also strip module name. */
   113		cur = strchr(expect[0], '+');
   114		if (cur)
   115			*cur = '\0';
   116	
   117		/* Access information */
   118		cur = expect[1];
   119		end = &expect[1][sizeof(expect[1]) - 1];
   120	
   121		switch (r->type) {
   122		case KFENCE_ERROR_OOB:
   123			cur += scnprintf(cur, end - cur, "Out-of-bounds access at");
   124			break;
   125		case KFENCE_ERROR_UAF:
   126			cur += scnprintf(cur, end - cur, "Use-after-free access at");
   127			break;
   128		case KFENCE_ERROR_CORRUPTION:
   129			cur += scnprintf(cur, end - cur, "Corrupted memory at");
   130			break;
   131		case KFENCE_ERROR_INVALID:
   132			cur += scnprintf(cur, end - cur, "Invalid access at");
   133			break;
   134		case KFENCE_ERROR_INVALID_FREE:
   135			cur += scnprintf(cur, end - cur, "Invalid free of");
   136			break;
   137		}
   138	
   139		cur += scnprintf(cur, end - cur, " 0x" PTR_FMT, (void *)r->addr);
   140	
   141		spin_lock_irqsave(&observed.lock, flags);
   142		if (!report_available())
   143			goto out; /* A new report is being captured. */
   144	
   145		/* Finally match expected output to what we actually observed. */
   146		ret = strstr(observed.lines[0], expect[0]) && strstr(observed.lines[1], expect[1]);
   147	out:
   148		spin_unlock_irqrestore(&observed.lock, flags);
   149		return ret;
 > 150	}
   151	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 74747 bytes --]

  reply	other threads:[~2020-09-16  5:13 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 13:20 [PATCH v2 00/10] KFENCE: A low-overhead sampling-based memory safety error detector Marco Elver
2020-09-15 13:20 ` Marco Elver
2020-09-15 13:20 ` Marco Elver
2020-09-15 13:20 ` [PATCH v2 01/10] mm: add Kernel Electric-Fence infrastructure Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-17 13:26   ` Hillf Danton
2020-09-17 13:26     ` Hillf Danton
2020-09-17 13:36     ` Marco Elver
2020-09-17 13:36       ` Marco Elver
2020-09-17 23:45       ` Hillf Danton
2020-09-17 23:45         ` Hillf Danton
2020-09-15 13:20 ` [PATCH v2 02/10] x86, kfence: enable KFENCE for x86 Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-15 13:20 ` [PATCH v2 03/10] arm64, kfence: enable KFENCE for ARM64 Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-15 13:20 ` [PATCH v2 04/10] mm, kfence: insert KFENCE hooks for SLAB Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-17  9:37   ` Christopher Lameter
2020-09-17  9:37     ` Christopher Lameter
2020-09-17  9:37     ` Christopher Lameter
2020-09-17  9:47     ` Alexander Potapenko
2020-09-17  9:47       ` Alexander Potapenko
2020-09-17  9:47       ` Alexander Potapenko
2020-09-15 13:20 ` [PATCH v2 05/10] mm, kfence: insert KFENCE hooks for SLUB Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-17  9:40   ` Christopher Lameter
2020-09-17  9:40     ` Christopher Lameter
2020-09-17  9:40     ` Christopher Lameter
2020-09-17  9:51     ` Alexander Potapenko
2020-09-17  9:51       ` Alexander Potapenko
2020-09-17  9:51       ` Alexander Potapenko
2020-09-15 13:20 ` [PATCH v2 06/10] kfence, kasan: make KFENCE compatible with KASAN Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-15 13:20 ` [PATCH v2 07/10] kfence, kmemleak: make KFENCE compatible with KMEMLEAK Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-15 13:20 ` [PATCH v2 08/10] kfence, lockdep: make KFENCE compatible with lockdep Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-15 13:20 ` [PATCH v2 09/10] kfence, Documentation: add KFENCE documentation Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-15 13:20 ` [PATCH v2 10/10] kfence: add test suite Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-15 13:20   ` Marco Elver
2020-09-16  5:13   ` kernel test robot [this message]
2020-09-15 13:49 ` [PATCH v2 00/10] KFENCE: A low-overhead sampling-based memory safety error detector Dmitry Vyukov
2020-09-15 13:49   ` Dmitry Vyukov
2020-09-15 13:49   ` Dmitry Vyukov
2020-09-18 11:17 ` Qian Cai
2020-09-18 11:17   ` Qian Cai
2020-09-18 11:17   ` Qian Cai
2020-09-18 11:59   ` Marco Elver
2020-09-18 11:59     ` Marco Elver
2020-09-18 11:59     ` Marco Elver

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=202009161340.reaffL4D%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.