linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Souptick Joarder <jrdr.linux@gmail.com>
Cc: kbuild-all@01.org, akpm@linux-foundation.org, rppt@linux.ibm.com,
	mhocko@suse.com, dan.j.williams@intel.com, willy@infradead.org,
	kirill.shutemov@linux.intel.com, vbabka@suse.cz, riel@redhat.com,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	william.kucharski@oracle.com
Subject: Re: [PATCH v4] mm: Create the new vm_fault_t type
Date: Wed, 9 Jan 2019 19:50:37 +0800	[thread overview]
Message-ID: <201901091938.efAoCTaE%fengguang.wu@intel.com> (raw)
In-Reply-To: <20190108183041.GA12137@jordon-HP-15-Notebook-PC>

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

Hi Souptick,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.0-rc1 next-20190109]
[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/Souptick-Joarder/mm-Create-the-new-vm_fault_t-type/20190109-154216
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

>> arch/x86/mm/fault.c:1051:39: warning: restricted vm_fault_t degrades to integer
   arch/x86/mm/fault.c:1057:29: warning: restricted vm_fault_t degrades to integer
   arch/x86/mm/fault.c:1059:29: warning: restricted vm_fault_t degrades to integer
>> arch/x86/mm/fault.c:1094:62: warning: incorrect type in argument 4 (different base types)
   arch/x86/mm/fault.c:1094:62:    expected unsigned int fault
   arch/x86/mm/fault.c:1094:62:    got restricted vm_fault_t [usertype] fault

vim +1051 arch/x86/mm/fault.c

92181f190 Nick Piggin       2009-01-20  1031  
2d4a71676 Ingo Molnar       2009-02-20  1032  static void
a6e04aa92 Andi Kleen        2009-09-16  1033  do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
27274f731 Eric W. Biederman 2018-09-18  1034  	  unsigned int fault)
92181f190 Nick Piggin       2009-01-20  1035  {
92181f190 Nick Piggin       2009-01-20  1036  	struct task_struct *tsk = current;
92181f190 Nick Piggin       2009-01-20  1037  
2d4a71676 Ingo Molnar       2009-02-20  1038  	/* Kernel mode? Handle exceptions or die: */
1067f0309 Ricardo Neri      2017-10-27  1039  	if (!(error_code & X86_PF_USER)) {
4fc349011 Andy Lutomirski   2011-11-07  1040  		no_context(regs, error_code, address, SIGBUS, BUS_ADRERR);
960545691 Linus Torvalds    2010-08-13  1041  		return;
960545691 Linus Torvalds    2010-08-13  1042  	}
2d4a71676 Ingo Molnar       2009-02-20  1043  
cd1b68f08 Ingo Molnar       2009-02-20  1044  	/* User-space => ok to do another page fault: */
92181f190 Nick Piggin       2009-01-20  1045  	if (is_prefetch(regs, error_code, address))
92181f190 Nick Piggin       2009-01-20  1046  		return;
2d4a71676 Ingo Molnar       2009-02-20  1047  
e49d3cbef Andy Lutomirski   2018-11-19  1048  	set_signal_archinfo(address, error_code);
2d4a71676 Ingo Molnar       2009-02-20  1049  
a6e04aa92 Andi Kleen        2009-09-16  1050  #ifdef CONFIG_MEMORY_FAILURE
f672b49b0 Andi Kleen        2010-09-27 @1051  	if (fault & (VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE)) {
40e553946 Eric W. Biederman 2018-01-19  1052  		unsigned lsb = 0;
40e553946 Eric W. Biederman 2018-01-19  1053  
40e553946 Eric W. Biederman 2018-01-19  1054  		pr_err(
a6e04aa92 Andi Kleen        2009-09-16  1055  	"MCE: Killing %s:%d due to hardware memory corruption fault at %lx\n",
a6e04aa92 Andi Kleen        2009-09-16  1056  			tsk->comm, tsk->pid, address);
40e553946 Eric W. Biederman 2018-01-19  1057  		if (fault & VM_FAULT_HWPOISON_LARGE)
40e553946 Eric W. Biederman 2018-01-19  1058  			lsb = hstate_index_to_shift(VM_FAULT_GET_HINDEX(fault));
40e553946 Eric W. Biederman 2018-01-19  1059  		if (fault & VM_FAULT_HWPOISON)
40e553946 Eric W. Biederman 2018-01-19  1060  			lsb = PAGE_SHIFT;
40e553946 Eric W. Biederman 2018-01-19  1061  		force_sig_mceerr(BUS_MCEERR_AR, (void __user *)address, lsb, tsk);
40e553946 Eric W. Biederman 2018-01-19  1062  		return;
a6e04aa92 Andi Kleen        2009-09-16  1063  	}
a6e04aa92 Andi Kleen        2009-09-16  1064  #endif
b4fd52f25 Eric W. Biederman 2018-09-18  1065  	force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address, tsk);
92181f190 Nick Piggin       2009-01-20  1066  }
92181f190 Nick Piggin       2009-01-20  1067  
3a13c4d76 Johannes Weiner   2013-09-12  1068  static noinline void
2d4a71676 Ingo Molnar       2009-02-20  1069  mm_fault_error(struct pt_regs *regs, unsigned long error_code,
25c102d80 Eric W. Biederman 2018-09-18  1070  	       unsigned long address, vm_fault_t fault)
92181f190 Nick Piggin       2009-01-20  1071  {
1067f0309 Ricardo Neri      2017-10-27  1072  	if (fatal_signal_pending(current) && !(error_code & X86_PF_USER)) {
4fc349011 Andy Lutomirski   2011-11-07  1073  		no_context(regs, error_code, address, 0, 0);
3a13c4d76 Johannes Weiner   2013-09-12  1074  		return;
b80ef10e8 KOSAKI Motohiro   2011-05-26  1075  	}
b80ef10e8 KOSAKI Motohiro   2011-05-26  1076  
2d4a71676 Ingo Molnar       2009-02-20  1077  	if (fault & VM_FAULT_OOM) {
f86268549 Andrey Vagin      2011-03-09  1078  		/* Kernel mode? Handle exceptions or die: */
1067f0309 Ricardo Neri      2017-10-27  1079  		if (!(error_code & X86_PF_USER)) {
4fc349011 Andy Lutomirski   2011-11-07  1080  			no_context(regs, error_code, address,
4fc349011 Andy Lutomirski   2011-11-07  1081  				   SIGSEGV, SEGV_MAPERR);
3a13c4d76 Johannes Weiner   2013-09-12  1082  			return;
f86268549 Andrey Vagin      2011-03-09  1083  		}
f86268549 Andrey Vagin      2011-03-09  1084  
c2d23f919 David Rientjes    2012-12-12  1085  		/*
c2d23f919 David Rientjes    2012-12-12  1086  		 * We ran out of memory, call the OOM killer, and return the
c2d23f919 David Rientjes    2012-12-12  1087  		 * userspace (which will retry the fault, or kill us if we got
c2d23f919 David Rientjes    2012-12-12  1088  		 * oom-killed):
c2d23f919 David Rientjes    2012-12-12  1089  		 */
c2d23f919 David Rientjes    2012-12-12  1090  		pagefault_out_of_memory();
2d4a71676 Ingo Molnar       2009-02-20  1091  	} else {
f672b49b0 Andi Kleen        2010-09-27  1092  		if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON|
f672b49b0 Andi Kleen        2010-09-27  1093  			     VM_FAULT_HWPOISON_LARGE))
27274f731 Eric W. Biederman 2018-09-18 @1094  			do_sigbus(regs, error_code, address, fault);
33692f275 Linus Torvalds    2015-01-29  1095  		else if (fault & VM_FAULT_SIGSEGV)
768fd9c69 Eric W. Biederman 2018-09-18  1096  			bad_area_nosemaphore(regs, error_code, address);
92181f190 Nick Piggin       2009-01-20  1097  		else
92181f190 Nick Piggin       2009-01-20  1098  			BUG();
92181f190 Nick Piggin       2009-01-20  1099  	}
2d4a71676 Ingo Molnar       2009-02-20  1100  }
92181f190 Nick Piggin       2009-01-20  1101  

:::::: The code at line 1051 was first introduced by commit
:::::: f672b49b07a4a152fc4251f2aec6b4d05164c4cd x86: HWPOISON: Report correct address granuality for huge hwpoison faults

:::::: TO: Andi Kleen <ak@linux.intel.com>
:::::: CC: Andi Kleen <ak@linux.intel.com>

---
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: 67238 bytes --]

      parent reply	other threads:[~2019-01-09 11:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08 18:30 [PATCH v4] mm: Create the new vm_fault_t type Souptick Joarder
2019-01-08 18:29 ` Matthew Wilcox
2019-01-09 11:50 ` kbuild 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=201901091938.efAoCTaE%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=jrdr.linux@gmail.com \
    --cc=kbuild-all@01.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=riel@redhat.com \
    --cc=rppt@linux.ibm.com \
    --cc=vbabka@suse.cz \
    --cc=william.kucharski@oracle.com \
    --cc=willy@infradead.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).