mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>, Andy Lutomirski <luto@kernel.org>
Cc: kbuild-all@lists.01.org, Steve Wahl <steve.wahl@hpe.com>,
	Mike Travis <mike.travis@hpe.com>,
	Dimitri Sivanich <dimitri.sivanich@hpe.com>,
	Russ Anderson <russ.anderson@hpe.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin (Intel)" <hpa@zytor.com>
Subject: Re: [PATCH 3/6] x86/idt: remove address argument to idt_invalidate()
Date: Tue, 11 May 2021 12:37:08 +0800	[thread overview]
Message-ID: <202105111222.ZWoYQdL3-lkp@intel.com> (raw)
In-Reply-To: <20210511005531.1065536-4-hpa@zytor.com>

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

Hi Peter,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tip/x86/core]
[also build test WARNING on tip/master linus/master v5.13-rc1 next-20210510]
[cannot apply to bp/for-next]
[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/H-Peter-Anvin/x86-irq-trap-and-interrupt-cleanups/20210511-085650
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 2c88d45edbb89029c1190bb3b136d2602f057c98
config: i386-randconfig-s002-20210511 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/c9c68d8ad1ef0923798c18f7e9a9570fa23aee0e
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review H-Peter-Anvin/x86-irq-trap-and-interrupt-cleanups/20210511-085650
        git checkout c9c68d8ad1ef0923798c18f7e9a9570fa23aee0e
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386 

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


sparse warnings: (new ones prefixed by >>)
>> arch/x86/kernel/machine_kexec_32.c:236:17: sparse: sparse: Using plain integer as NULL pointer

vim +236 arch/x86/kernel/machine_kexec_32.c

   188	
   189		save_ftrace_enabled = __ftrace_enabled_save();
   190	
   191		/* Interrupts aren't acceptable while we reboot */
   192		local_irq_disable();
   193		hw_breakpoint_disable();
   194	
   195		if (image->preserve_context) {
   196	#ifdef CONFIG_X86_IO_APIC
   197			/*
   198			 * We need to put APICs in legacy mode so that we can
   199			 * get timer interrupts in second kernel. kexec/kdump
   200			 * paths already have calls to restore_boot_irq_mode()
   201			 * in one form or other. kexec jump path also need one.
   202			 */
   203			clear_IO_APIC();
   204			restore_boot_irq_mode();
   205	#endif
   206		}
   207	
   208		control_page = page_address(image->control_code_page);
   209		memcpy(control_page, relocate_kernel, KEXEC_CONTROL_CODE_MAX_SIZE);
   210	
   211		relocate_kernel_ptr = control_page;
   212		page_list[PA_CONTROL_PAGE] = __pa(control_page);
   213		page_list[VA_CONTROL_PAGE] = (unsigned long)control_page;
   214		page_list[PA_PGD] = __pa(image->arch.pgd);
   215	
   216		if (image->type == KEXEC_TYPE_DEFAULT)
   217			page_list[PA_SWAP_PAGE] = (page_to_pfn(image->swap_page)
   218							<< PAGE_SHIFT);
   219	
   220		/*
   221		 * The segment registers are funny things, they have both a
   222		 * visible and an invisible part.  Whenever the visible part is
   223		 * set to a specific selector, the invisible part is loaded
   224		 * with from a table in memory.  At no other time is the
   225		 * descriptor table in memory accessed.
   226		 *
   227		 * I take advantage of this here by force loading the
   228		 * segments, before I zap the gdt with an invalid value.
   229		 */
   230		load_segments();
   231		/*
   232		 * The gdt & idt are now invalid.
   233		 * If you want to load them you must set up your own idt & gdt.
   234		 */
   235		idt_invalidate();
 > 236		set_gdt(0, 0);
   237	
   238		/* now call it */
   239		image->start = relocate_kernel_ptr((unsigned long)image->head,
   240						   (unsigned long)page_list,
   241						   image->start,
   242						   boot_cpu_has(X86_FEATURE_PAE),
   243						   image->preserve_context);
   244	

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

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

  reply	other threads:[~2021-05-11  4:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11  0:55 [PATCH 0/6] x86/irq: trap and interrupt cleanups H. Peter Anvin
2021-05-11  0:55 ` [PATCH 1/6] x86/traps: add X86_NR_HW_TRAPS to <asm/trapnr.h> H. Peter Anvin
2021-05-14 22:53   ` Andy Lutomirski
2021-05-11  0:55 ` [PATCH 2/6] x86/irqvector: add NR_EXTERNAL_VECTORS and NR_SYSTEM_VECTORS H. Peter Anvin
2021-05-14 22:53   ` Andy Lutomirski
2021-05-11  0:55 ` [PATCH 3/6] x86/idt: remove address argument to idt_invalidate() H. Peter Anvin
2021-05-11  4:37   ` kernel test robot [this message]
2021-05-11 14:14   ` Thomas Gleixner
2021-05-11 14:43     ` H. Peter Anvin
2021-05-11  0:55 ` [PATCH 4/6] x86/irq: merge common code in DEFINE_IDTENTRY_SYSVEC[_SIMPLE] H. Peter Anvin
2021-05-11 14:22   ` Thomas Gleixner
2021-05-11 17:44     ` H. Peter Anvin
2021-05-12  8:38       ` Ingo Molnar
2021-05-12 18:00         ` H. Peter Anvin
2021-05-12 18:40           ` Ingo Molnar
2021-05-11  0:55 ` [PATCH 5/6] x86/irq: WARN_ONCE() if irq_move_cleanup is called on a pending interrupt H. Peter Anvin
2021-05-11 14:23   ` Thomas Gleixner
2021-05-11 15:55     ` H. Peter Anvin
2021-05-11  0:55 ` [PATCH 6/6] x86/irq: remove unused vectors from <asm/irq_vectors.h> H. Peter Anvin
2021-05-11 17:04   ` Steve Wahl

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=202105111222.ZWoYQdL3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bp@alien8.de \
    --cc=dimitri.sivanich@hpe.com \
    --cc=hpa@zytor.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mike.travis@hpe.com \
    --cc=mingo@redhat.com \
    --cc=russ.anderson@hpe.com \
    --cc=steve.wahl@hpe.com \
    --cc=tglx@linutronix.de \
    /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®