* [hnaz-linux-mm:master 89/340] arch/mips/mm/fault.c:157:27: error: passing argument 1 of 'fault_signal_pending' makes integer from pointer without a cast
@ 2020-03-10 9:37 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-03-10 9:37 UTC (permalink / raw)
To: Peter Xu
Cc: kbuild-all, Johannes Weiner, Andrew Morton, Linux Memory Management List
[-- Attachment #1: Type: text/plain, Size: 5382 bytes --]
tree: https://github.com/hnaz/linux-mm master
head: 5d9ee416b5701096536c7a63c04dbe25012baa9e
commit: 133f884fbe299145671d583f255f71b63d9ad63f [89/340] mm: introduce fault_signal_pending()
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 133f884fbe299145671d583f255f71b63d9ad63f
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
arch/mips/mm/fault.c: In function '__do_page_fault':
>> arch/mips/mm/fault.c:157:27: error: passing argument 1 of 'fault_signal_pending' makes integer from pointer without a cast [-Werror=int-conversion]
157 | if (fault_signal_pending(regs))
| ^~~~
| |
| struct pt_regs *
In file included from include/linux/ptrace.h:7,
from arch/mips/mm/fault.c:16:
include/linux/sched/signal.h:378:54: note: expected 'unsigned int' but argument is of type 'struct pt_regs *'
378 | static inline bool fault_signal_pending(unsigned int fault_flags,
| ~~~~~~~~~~~~~^~~~~~~~~~~
>> arch/mips/mm/fault.c:157:6: error: too few arguments to function 'fault_signal_pending'
157 | if (fault_signal_pending(regs))
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/ptrace.h:7,
from arch/mips/mm/fault.c:16:
include/linux/sched/signal.h:378:20: note: declared here
378 | static inline bool fault_signal_pending(unsigned int fault_flags,
| ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/fault_signal_pending +157 arch/mips/mm/fault.c
89
90 /*
91 * If we're in an interrupt or have no user
92 * context, we must not take the fault..
93 */
94 if (faulthandler_disabled() || !mm)
95 goto bad_area_nosemaphore;
96
97 if (user_mode(regs))
98 flags |= FAULT_FLAG_USER;
99 retry:
100 down_read(&mm->mmap_sem);
101 vma = find_vma(mm, address);
102 if (!vma)
103 goto bad_area;
104 if (vma->vm_start <= address)
105 goto good_area;
106 if (!(vma->vm_flags & VM_GROWSDOWN))
107 goto bad_area;
108 if (expand_stack(vma, address))
109 goto bad_area;
110 /*
111 * Ok, we have a good vm_area for this memory access, so
112 * we can handle it..
113 */
114 good_area:
115 si_code = SEGV_ACCERR;
116
117 if (write) {
118 if (!(vma->vm_flags & VM_WRITE))
119 goto bad_area;
120 flags |= FAULT_FLAG_WRITE;
121 } else {
122 if (cpu_has_rixi) {
123 if (address == regs->cp0_epc && !(vma->vm_flags & VM_EXEC)) {
124 #if 0
125 pr_notice("Cpu%d[%s:%d:%0*lx:%ld:%0*lx] XI violation\n",
126 raw_smp_processor_id(),
127 current->comm, current->pid,
128 field, address, write,
129 field, regs->cp0_epc);
130 #endif
131 goto bad_area;
132 }
133 if (!(vma->vm_flags & VM_READ) &&
134 exception_epc(regs) != address) {
135 #if 0
136 pr_notice("Cpu%d[%s:%d:%0*lx:%ld:%0*lx] RI violation\n",
137 raw_smp_processor_id(),
138 current->comm, current->pid,
139 field, address, write,
140 field, regs->cp0_epc);
141 #endif
142 goto bad_area;
143 }
144 } else {
145 if (unlikely(!vma_is_accessible(vma)))
146 goto bad_area;
147 }
148 }
149
150 /*
151 * If for any reason at all we couldn't handle the fault,
152 * make sure we exit gracefully rather than endlessly redo
153 * the fault.
154 */
155 fault = handle_mm_fault(vma, address, flags);
156
> 157 if (fault_signal_pending(regs))
158 return;
159
160 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
161 if (unlikely(fault & VM_FAULT_ERROR)) {
162 if (fault & VM_FAULT_OOM)
163 goto out_of_memory;
164 else if (fault & VM_FAULT_SIGSEGV)
165 goto bad_area;
166 else if (fault & VM_FAULT_SIGBUS)
167 goto do_sigbus;
168 BUG();
169 }
170 if (flags & FAULT_FLAG_ALLOW_RETRY) {
171 if (fault & VM_FAULT_MAJOR) {
172 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1,
173 regs, address);
174 tsk->maj_flt++;
175 } else {
176 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1,
177 regs, address);
178 tsk->min_flt++;
179 }
180 if (fault & VM_FAULT_RETRY) {
181 flags &= ~FAULT_FLAG_ALLOW_RETRY;
182 flags |= FAULT_FLAG_TRIED;
183
184 /*
185 * No need to up_read(&mm->mmap_sem) as we would
186 * have already released it in __lock_page_or_retry
187 * in mm/filemap.c.
188 */
189
190 goto retry;
191 }
192 }
193
194 up_read(&mm->mmap_sem);
195 return;
196
---
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: 64254 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-10 9:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10 9:37 [hnaz-linux-mm:master 89/340] arch/mips/mm/fault.c:157:27: error: passing argument 1 of 'fault_signal_pending' makes integer from pointer without a cast kbuild test robot
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).