mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Chao Fan <fanc.fnst@cn.fujitsu.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org, x86@kernel.org,
	hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com,
	bhe@redhat.com, keescook@chromium.org, yasu.isimatu@gmail.com,
	indou.takao@jp.fujitsu.com, caoj.fnst@cn.fujitsu.com,
	douly.fnst@cn.fujitsu.com, Chao Fan <fanc.fnst@cn.fujitsu.com>
Subject: Re: [PATCH v4 2/4] kaslr: calculate the memory region in immovable node
Date: Sat, 16 Dec 2017 19:47:52 +0800	[thread overview]
Message-ID: <201712161901.XK5XB4b2%fengguang.wu@intel.com> (raw)
In-Reply-To: <20171212120705.5591-3-fanc.fnst@cn.fujitsu.com>

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

Hi Chao,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.15-rc3 next-20171215]
[cannot apply to tip/x86/core]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Chao-Fan/aslr-add-parameter-immovable_mem-nn-KMG-ss-KMG-to-make-memory-hotplug-work-well-with-kaslr/20171215-175022
config: x86_64-randconfig-g0-12161605 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   arch/x86/boot/compressed/kaslr.c: In function 'process_mem_region':
>> arch/x86/boot/compressed/kaslr.c:671:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
      for (int i = 0; i < num_immovable_region; i++) {
      ^
   arch/x86/boot/compressed/kaslr.c:671:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code

vim +/for +671 arch/x86/boot/compressed/kaslr.c

   660	
   661	static bool process_mem_region(struct mem_vector region,
   662				       unsigned long long minimum,
   663				       unsigned long long image_size)
   664	{
   665	#ifdef CONFIG_MEMORY_HOTPLUG
   666		/*
   667		 * If immovable_mem= specified, walk all immovable regions, and
   668		 * filter the intersection to slots_count.
   669		 */
   670		if (num_immovable_region > 0) {
 > 671			for (int i = 0; i < num_immovable_region; i++) {
   672				struct mem_vector entry;
   673				unsigned long long start, end, entry_end, region_end;
   674	
   675				start = immovable_mem[i].start;
   676				end = start + immovable_mem[i].size;
   677				region_end = region.start + region.size;
   678	
   679				entry.start = clamp(region.start, start, end);
   680				entry_end = clamp(region_end, start, end);
   681	
   682				if (entry.start < entry_end) {
   683					entry.size = entry_end - entry.start;
   684					slots_count(&entry, minimum, image_size);
   685				}
   686	
   687				if (slot_area_index == MAX_SLOT_AREA) {
   688					debug_putstr("Aborted memmap scan (slot_areas full)!\n");
   689					return 1;
   690				}
   691			}
   692			return 0;
   693		}
   694	#endif
   695	
   696		/*
   697		 * If no immovable_mem stored, or CONFIG_MEMORY_HOTPLUG not specified,
   698		 * use region directly
   699		 */
   700		slots_count(&region, minimum, image_size);
   701		if (slot_area_index == MAX_SLOT_AREA) {
   702			debug_putstr("Aborted memmap scan (slot_areas full)!\n");
   703			return 1;
   704		}
   705		return 0;
   706	}
   707	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

  parent reply	other threads:[~2017-12-16 11:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12 12:07 [PATCH v4 0/4] aslr: add parameter immovable_mem=nn[KMG]@ss[KMG] to make memory hotplug work well with kaslr Chao Fan
2017-12-12 12:07 ` [PATCH v4 1/4] kaslr: add immovable_mem=nn[KMG]@ss[KMG] to specify extracting memory Chao Fan
2017-12-12 12:12   ` Chao Fan
2017-12-12 12:25   ` Chao Fan
2017-12-12 12:07 ` [PATCH v4 2/4] kaslr: calculate the memory region in immovable node Chao Fan
2017-12-12 12:18   ` Chao Fan
2017-12-16 11:47   ` kbuild test robot [this message]
2017-12-18  3:40   ` [PATCH v4.1 " Chao Fan
2017-12-12 12:07 ` [PATCH v4 3/4] kaslr: disable memory mirror feature when movable_node Chao Fan
2017-12-12 12:07 ` [PATCH v4 4/4] document: change the document for immovable_mem Chao Fan

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=201712161901.XK5XB4b2%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=bhe@redhat.com \
    --cc=caoj.fnst@cn.fujitsu.com \
    --cc=douly.fnst@cn.fujitsu.com \
    --cc=fanc.fnst@cn.fujitsu.com \
    --cc=hpa@zytor.com \
    --cc=indou.takao@jp.fujitsu.com \
    --cc=kbuild-all@01.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yasu.isimatu@gmail.com \
    /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

all inboxes | Powered by JetHome®