CC: [email protected]
TO: Michael Ellerman <[email protected]>
CC: "Greg Kroah-Hartman" <[email protected]>
CC: Nick Desaulniers <[email protected]>
CC: Sasha Levin <[email protected]>

Hi Michael,

FYI, the error/warning still remains.

tree:   
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git 
linux-4.19.y
head:   5a3ba2f90f8789162a03e07a37224bab4c643d1d
commit: 57ac40ee09cea2ec90f71c6f49b15d0d82667b38 [2397/4040] powerpc: Drop 
-me200 addition to build flags
:::::: branch date: 28 hours ago
:::::: commit date: 4 months ago
config: powerpc-randconfig-s031-20210506 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=57ac40ee09cea2ec90f71c6f49b15d0d82667b38
        git remote add linux-stable-rc 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
        git fetch --no-tags linux-stable-rc linux-4.19.y
        git checkout 57ac40ee09cea2ec90f71c6f49b15d0d82667b38
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

   arch/powerpc/kernel/process.c:1270:22: sparse: sparse: incorrect type in 
argument 2 (different address spaces)
   arch/powerpc/kernel/process.c:1270:22: sparse:     expected void const *src
   arch/powerpc/kernel/process.c:1270:22: sparse:     got unsigned int 
[noderef] <asn:1> *
   arch/powerpc/kernel/process.c:1312:21: sparse: sparse: incorrect type in 
argument 2 (different address spaces)
   arch/powerpc/kernel/process.c:1312:21: sparse:     expected void const *src
   arch/powerpc/kernel/process.c:1312:21: sparse:     got unsigned int 
[noderef] <asn:1> *
   arch/powerpc/kernel/process.c:1285:6: sparse: sparse: symbol 
'show_user_instructions' was not declared. Should it be static?
>> arch/powerpc/kernel/process.c:1285:6: error: no previous prototype for 
>> 'show_user_instructions' [-Werror=missing-prototypes]
    1285 | void show_user_instructions(struct pt_regs *regs)
         |      ^~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for FSL_EMB_PERFMON
   Depends on E500 || PPC_83xx
   Selected by
   - PPC_FSL_BOOK3E


sparse warnings: (new ones prefixed by >>)
   arch/powerpc/mm/fsl_booke_mmu.c:68:3: sparse: sparse: symbol 'tlbcam_addrs' 
was not declared. Should it be static?
   arch/powerpc/mm/fsl_booke_mmu.c:70:15: sparse: sparse: symbol 'tlbcam_sz' 
was not declared. Should it be static?
>> arch/powerpc/mm/fsl_booke_mmu.c:247:30: sparse: sparse: Using plain integer 
>> as NULL pointer
   arch/powerpc/mm/fsl_booke_mmu.c:70:15: error: no previous prototype for 
'tlbcam_sz' [-Werror=missing-prototypes]
      70 | unsigned long tlbcam_sz(int idx)
         |               ^~~~~~~~~
   cc1: all warnings being treated as errors

vim +/show_user_instructions +1285 arch/powerpc/kernel/process.c

0de2d820067e03 Scott Wood              2007-09-28  1268  
00ae36de49cc71 Anton Blanchard         2006-10-13  1269                 if 
(!__kernel_text_address(pc) ||
7b051f665c32db Anton Blanchard         2014-10-13 @1270                      
probe_kernel_address((unsigned int __user *)pc, instr)) {
2ffd04dee0dacf Andrew Donnellan        2016-11-04  1271                         
pr_cont("XXXXXXXX ");
06d67d54741a5b Paul Mackerras          2005-10-10  1272                 } else {
06d67d54741a5b Paul Mackerras          2005-10-10  1273                         
if (regs->nip == pc)
2ffd04dee0dacf Andrew Donnellan        2016-11-04  1274                         
        pr_cont("<%08x> ", instr);
06d67d54741a5b Paul Mackerras          2005-10-10  1275                         
else
2ffd04dee0dacf Andrew Donnellan        2016-11-04  1276                         
        pr_cont("%08x ", instr);
06d67d54741a5b Paul Mackerras          2005-10-10  1277                 }
06d67d54741a5b Paul Mackerras          2005-10-10  1278  
06d67d54741a5b Paul Mackerras          2005-10-10  1279                 pc += 
sizeof(int);
06d67d54741a5b Paul Mackerras          2005-10-10  1280         }
06d67d54741a5b Paul Mackerras          2005-10-10  1281  
2ffd04dee0dacf Andrew Donnellan        2016-11-04  1282         pr_cont("\n");
06d67d54741a5b Paul Mackerras          2005-10-10  1283  }
06d67d54741a5b Paul Mackerras          2005-10-10  1284  
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01 @1285  void 
show_user_instructions(struct pt_regs *regs)
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1286  {
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1287         unsigned long 
pc;
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1288         int i;
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1289  
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1290         pc = regs->nip 
- (instructions_to_print * 3 / 4 * sizeof(int));
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1291  
a932ed3b718147 Michael Ellerman        2018-10-05  1292         /*
a932ed3b718147 Michael Ellerman        2018-10-05  1293          * Make sure 
the NIP points at userspace, not kernel text/data or
a932ed3b718147 Michael Ellerman        2018-10-05  1294          * elsewhere.
a932ed3b718147 Michael Ellerman        2018-10-05  1295          */
a932ed3b718147 Michael Ellerman        2018-10-05  1296         if 
(!__access_ok(pc, instructions_to_print * sizeof(int), USER_DS)) {
a932ed3b718147 Michael Ellerman        2018-10-05  1297                 
pr_info("%s[%d]: Bad NIP, not dumping instructions.\n",
a932ed3b718147 Michael Ellerman        2018-10-05  1298                         
current->comm, current->pid);
a932ed3b718147 Michael Ellerman        2018-10-05  1299                 return;
a932ed3b718147 Michael Ellerman        2018-10-05  1300         }
a932ed3b718147 Michael Ellerman        2018-10-05  1301  
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1302         
pr_info("%s[%d]: code: ", current->comm, current->pid);
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1303  
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1304         for (i = 0; i < 
instructions_to_print; i++) {
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1305                 int 
instr;
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1306  
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1307                 if (!(i 
% 8) && (i > 0)) {
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1308                         
pr_cont("\n");
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1309                         
pr_info("%s[%d]: code: ", current->comm, current->pid);
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1310                 }
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1311  
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1312                 if 
(probe_kernel_address((unsigned int __user *)pc, instr)) {
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1313                         
pr_cont("XXXXXXXX ");
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1314                 } else {
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1315                         
if (regs->nip == pc)
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1316                         
        pr_cont("<%08x> ", instr);
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1317                         
else
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1318                         
        pr_cont("%08x ", instr);
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1319                 }
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1320  
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1321                 pc += 
sizeof(int);
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1322         }
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1323  
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1324         pr_cont("\n");
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1325  }
88b0fe17573592 Murilo Opsfelder Araujo 2018-08-01  1326  

:::::: The code at line 1285 was first introduced by commit
:::::: 88b0fe17573592a8e3196bf143f865da460178e7 powerpc: Add 
show_user_instructions()

:::::: TO: Murilo Opsfelder Araujo <[email protected]>
:::::: CC: Michael Ellerman <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to