lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202102020147.1I9a3gME-lkp@intel.com>
Date:   Tue, 2 Feb 2021 01:11:54 +0800
From:   kernel test robot <lkp@...el.com>
To:     Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Subject: arch/sh/kernel/ftrace.c:50:9: sparse: sparse: incorrect type in
 argument 1 (different address spaces)

Hi Luc,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1048ba83fb1c00cd24172e23e8263972f6b5d9ac
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date:   5 months ago
config: sh-randconfig-s031-20210201 (attached as .config)
compiler: sh4-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-215-g0fb77bb6-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e5fc436f06eef54ef512ea55a9db8eb9f2e76959
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout e5fc436f06eef54ef512ea55a9db8eb9f2e76959
        # 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__' ARCH=sh 

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


"sparse warnings: (new ones prefixed by >>)"
>> arch/sh/kernel/ftrace.c:50:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned char * @@
   arch/sh/kernel/ftrace.c:50:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/ftrace.c:50:9: sparse:     got unsigned char *
   arch/sh/kernel/ftrace.c:57:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned char * @@
   arch/sh/kernel/ftrace.c:57:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/ftrace.c:57:9: sparse:     got unsigned char *
--
>> arch/sh/kernel/cpu/sh3/clock-sh7712.c:23:21: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/kernel/cpu/sh3/clock-sh7712.c:23:21: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/cpu/sh3/clock-sh7712.c:23:21: sparse:     got unsigned int
   arch/sh/kernel/cpu/sh3/clock-sh7712.c:35:21: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/kernel/cpu/sh3/clock-sh7712.c:35:21: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/cpu/sh3/clock-sh7712.c:35:21: sparse:     got unsigned int
   arch/sh/kernel/cpu/sh3/clock-sh7712.c:47:21: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/kernel/cpu/sh3/clock-sh7712.c:47:21: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/cpu/sh3/clock-sh7712.c:47:21: sparse:     got unsigned int
--
>> arch/sh/kernel/cpu/sh3/serial-sh7710.c:13:17: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/kernel/cpu/sh3/serial-sh7710.c:13:17: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/cpu/sh3/serial-sh7710.c:13:17: sparse:     got unsigned int
>> arch/sh/kernel/cpu/sh3/serial-sh7710.c:13:17: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/kernel/cpu/sh3/serial-sh7710.c:13:17: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/cpu/sh3/serial-sh7710.c:13:17: sparse:     got unsigned int
   arch/sh/kernel/cpu/sh3/serial-sh7710.c:14:17: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/kernel/cpu/sh3/serial-sh7710.c:14:17: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/cpu/sh3/serial-sh7710.c:14:17: sparse:     got unsigned int
   arch/sh/kernel/cpu/sh3/serial-sh7710.c:14:17: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/kernel/cpu/sh3/serial-sh7710.c:14:17: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/cpu/sh3/serial-sh7710.c:14:17: sparse:     got unsigned int
   arch/sh/kernel/cpu/sh3/serial-sh7710.c:16:17: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/kernel/cpu/sh3/serial-sh7710.c:16:17: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/cpu/sh3/serial-sh7710.c:16:17: sparse:     got unsigned int
   arch/sh/kernel/cpu/sh3/serial-sh7710.c:16:17: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/kernel/cpu/sh3/serial-sh7710.c:16:17: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/cpu/sh3/serial-sh7710.c:16:17: sparse:     got unsigned int
--
>> arch/sh/kernel/cpu/irq/ipr.c:35:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long addr @@
   arch/sh/kernel/cpu/irq/ipr.c:35:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/cpu/irq/ipr.c:35:9: sparse:     got unsigned long addr
>> arch/sh/kernel/cpu/irq/ipr.c:35:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long addr @@
   arch/sh/kernel/cpu/irq/ipr.c:35:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/cpu/irq/ipr.c:35:9: sparse:     got unsigned long addr
   arch/sh/kernel/cpu/irq/ipr.c:36:15: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long addr @@
   arch/sh/kernel/cpu/irq/ipr.c:36:15: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/cpu/irq/ipr.c:36:15: sparse:     got unsigned long addr
   arch/sh/kernel/cpu/irq/ipr.c:44:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long addr @@
   arch/sh/kernel/cpu/irq/ipr.c:44:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/cpu/irq/ipr.c:44:9: sparse:     got unsigned long addr
   arch/sh/kernel/cpu/irq/ipr.c:44:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long addr @@
   arch/sh/kernel/cpu/irq/ipr.c:44:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/cpu/irq/ipr.c:44:9: sparse:     got unsigned long addr
--
>> arch/sh/boards/mach-se/770x/irq.c:100:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/boards/mach-se/770x/irq.c:100:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/boards/mach-se/770x/irq.c:100:9: sparse:     got unsigned int
   arch/sh/boards/mach-se/770x/irq.c:101:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/boards/mach-se/770x/irq.c:101:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/boards/mach-se/770x/irq.c:101:9: sparse:     got unsigned int
   arch/sh/boards/mach-se/770x/irq.c:102:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/boards/mach-se/770x/irq.c:102:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/boards/mach-se/770x/irq.c:102:9: sparse:     got unsigned int
   arch/sh/boards/mach-se/770x/irq.c:103:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/boards/mach-se/770x/irq.c:103:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/boards/mach-se/770x/irq.c:103:9: sparse:     got unsigned int
   arch/sh/boards/mach-se/770x/irq.c:104:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/boards/mach-se/770x/irq.c:104:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/boards/mach-se/770x/irq.c:104:9: sparse:     got unsigned int
   arch/sh/boards/mach-se/770x/irq.c:105:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/boards/mach-se/770x/irq.c:105:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/boards/mach-se/770x/irq.c:105:9: sparse:     got unsigned int
   arch/sh/boards/mach-se/770x/irq.c:106:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int @@
   arch/sh/boards/mach-se/770x/irq.c:106:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/boards/mach-se/770x/irq.c:106:9: sparse:     got unsigned int
--
>> drivers/gpu/drm/tve200/tve200_display.c:33:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got void * @@
   drivers/gpu/drm/tve200/tve200_display.c:33:16: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/gpu/drm/tve200/tve200_display.c:33:16: sparse:     got void *
   drivers/gpu/drm/tve200/tve200_display.c:50:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got void * @@
   drivers/gpu/drm/tve200/tve200_display.c:50:23: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/gpu/drm/tve200/tve200_display.c:50:23: sparse:     got void *
   drivers/gpu/drm/tve200/tve200_display.c:60:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got void * @@
   drivers/gpu/drm/tve200/tve200_display.c:60:17: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/gpu/drm/tve200/tve200_display.c:60:17: sparse:     got void *
   drivers/gpu/drm/tve200/tve200_display.c:65:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got void * @@
   drivers/gpu/drm/tve200/tve200_display.c:65:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/gpu/drm/tve200/tve200_display.c:65:9: sparse:     got void *
   drivers/gpu/drm/tve200/tve200_display.c:220:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got void * @@
   drivers/gpu/drm/tve200/tve200_display.c:220:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/gpu/drm/tve200/tve200_display.c:220:9: sparse:     got void *
   drivers/gpu/drm/tve200/tve200_display.c:234:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got void * @@
   drivers/gpu/drm/tve200/tve200_display.c:234:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/gpu/drm/tve200/tve200_display.c:234:9: sparse:     got void *
   drivers/gpu/drm/tve200/tve200_display.c:252:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got void * @@
   drivers/gpu/drm/tve200/tve200_display.c:252:17: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/gpu/drm/tve200/tve200_display.c:252:17: sparse:     got void *
   drivers/gpu/drm/tve200/tve200_display.c:257:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got void * @@
   drivers/gpu/drm/tve200/tve200_display.c:257:25: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/gpu/drm/tve200/tve200_display.c:257:25: sparse:     got void *
   drivers/gpu/drm/tve200/tve200_display.c:259:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got void * @@
   drivers/gpu/drm/tve200/tve200_display.c:259:25: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/gpu/drm/tve200/tve200_display.c:259:25: sparse:     got void *
   drivers/gpu/drm/tve200/tve200_display.c:282:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got void * @@
   drivers/gpu/drm/tve200/tve200_display.c:282:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/gpu/drm/tve200/tve200_display.c:282:9: sparse:     got void *
   drivers/gpu/drm/tve200/tve200_display.c:292:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got void * @@
   drivers/gpu/drm/tve200/tve200_display.c:292:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/gpu/drm/tve200/tve200_display.c:292:9: sparse:     got void *
--
   drivers/gpu/drm/tve200/tve200_drv.c:195:20: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void *regs @@     got void [noderef] __iomem * @@
   drivers/gpu/drm/tve200/tve200_drv.c:195:20: sparse:     expected void *regs
   drivers/gpu/drm/tve200/tve200_drv.c:195:20: sparse:     got void [noderef] __iomem *
>> drivers/gpu/drm/tve200/tve200_drv.c:209:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got void * @@
   drivers/gpu/drm/tve200/tve200_drv.c:209:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/gpu/drm/tve200/tve200_drv.c:209:9: sparse:     got void *
--
   drivers/vhost/vringh.c:567:18: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected restricted __virtio16 const *__gu_addr @@     got restricted __virtio16 [noderef] [usertype] __user * @@
   drivers/vhost/vringh.c:567:18: sparse:     expected restricted __virtio16 const *__gu_addr
   drivers/vhost/vringh.c:567:18: sparse:     got restricted __virtio16 [noderef] [usertype] __user *
>> drivers/vhost/vringh.c:567:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got restricted __virtio16 const *__gu_addr @@
   drivers/vhost/vringh.c:567:18: sparse:     expected void const volatile [noderef] __user *ptr
   drivers/vhost/vringh.c:567:18: sparse:     got restricted __virtio16 const *__gu_addr
--
   drivers/video/fbdev/tmiofb.c:528:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int const *__gu_addr @@     got unsigned int [noderef] [usertype] __user *argp @@
   drivers/video/fbdev/tmiofb.c:528:21: sparse:     expected unsigned int const *__gu_addr
   drivers/video/fbdev/tmiofb.c:528:21: sparse:     got unsigned int [noderef] [usertype] __user *argp
>> drivers/video/fbdev/tmiofb.c:528:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got unsigned int const *__gu_addr @@
   drivers/video/fbdev/tmiofb.c:528:21: sparse:     expected void const volatile [noderef] __user *ptr
   drivers/video/fbdev/tmiofb.c:528:21: sparse:     got unsigned int const *__gu_addr
--
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:719:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected int const *__gu_addr @@     got int [noderef] __user * @@
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:719:21: sparse:     expected int const *__gu_addr
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:719:21: sparse:     got int [noderef] __user *
>> drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:719:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got int const *__gu_addr @@
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:719:21: sparse:     expected void const volatile [noderef] __user *ptr
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:719:21: sparse:     got int const *__gu_addr
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:755:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int const *__gu_addr @@     got unsigned int [noderef] [usertype] __user * @@
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:755:21: sparse:     expected unsigned int const *__gu_addr
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:755:21: sparse:     got unsigned int [noderef] [usertype] __user *
>> drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:755:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got unsigned int const *__gu_addr @@
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:755:21: sparse:     expected void const volatile [noderef] __user *ptr
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:755:21: sparse:     got unsigned int const *__gu_addr
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:796:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected int const *__gu_addr @@     got int [noderef] __user * @@
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:796:21: sparse:     expected int const *__gu_addr
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:796:21: sparse:     got int [noderef] __user *
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:796:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got int const *__gu_addr @@
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:796:21: sparse:     expected void const volatile [noderef] __user *ptr
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:796:21: sparse:     got int const *__gu_addr
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:811:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected int const *__gu_addr @@     got int [noderef] __user * @@
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:811:21: sparse:     expected int const *__gu_addr
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:811:21: sparse:     got int [noderef] __user *
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:811:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got int const *__gu_addr @@
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:811:21: sparse:     expected void const volatile [noderef] __user *ptr
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:811:21: sparse:     got int const *__gu_addr

vim +50 arch/sh/kernel/ftrace.c

fad57feba77d2e Matt Fleming 2008-11-12  28  
9e28c46b7dd116 Matt Fleming 2009-06-10  29  static unsigned char ftrace_nop[4];
9e28c46b7dd116 Matt Fleming 2009-06-10  30  /*
9e28c46b7dd116 Matt Fleming 2009-06-10  31   * If we're trying to nop out a call to a function, we instead
9e28c46b7dd116 Matt Fleming 2009-06-10  32   * place a call to the address after the memory table.
9e28c46b7dd116 Matt Fleming 2009-06-10  33   *
9e28c46b7dd116 Matt Fleming 2009-06-10  34   * 8c011060 <a>:
9e28c46b7dd116 Matt Fleming 2009-06-10  35   * 8c011060:       02 d1           mov.l   8c01106c <a+0xc>,r1
9e28c46b7dd116 Matt Fleming 2009-06-10  36   * 8c011062:       22 4f           sts.l   pr,@-r15
9e28c46b7dd116 Matt Fleming 2009-06-10  37   * 8c011064:       02 c7           mova    8c011070 <a+0x10>,r0
9e28c46b7dd116 Matt Fleming 2009-06-10  38   * 8c011066:       2b 41           jmp     @r1
9e28c46b7dd116 Matt Fleming 2009-06-10  39   * 8c011068:       2a 40           lds     r0,pr
9e28c46b7dd116 Matt Fleming 2009-06-10  40   * 8c01106a:       09 00           nop
9e28c46b7dd116 Matt Fleming 2009-06-10  41   * 8c01106c:       68 24           .word 0x2468     <--- ip
9e28c46b7dd116 Matt Fleming 2009-06-10  42   * 8c01106e:       1d 8c           .word 0x8c1d
9e28c46b7dd116 Matt Fleming 2009-06-10  43   * 8c011070:       26 4f           lds.l   @r15+,pr <--- ip + MCOUNT_INSN_SIZE
9e28c46b7dd116 Matt Fleming 2009-06-10  44   *
9e28c46b7dd116 Matt Fleming 2009-06-10  45   * We write 0x8c011070 to 0x8c01106c so that on entry to a() we branch
9e28c46b7dd116 Matt Fleming 2009-06-10  46   * past the _mcount call and continue executing code like normal.
9e28c46b7dd116 Matt Fleming 2009-06-10  47   */
9e28c46b7dd116 Matt Fleming 2009-06-10  48  static unsigned char *ftrace_nop_replace(unsigned long ip)
fad57feba77d2e Matt Fleming 2008-11-12  49  {
9e28c46b7dd116 Matt Fleming 2009-06-10 @50  	__raw_writel(ip + MCOUNT_INSN_SIZE, ftrace_nop);
fad57feba77d2e Matt Fleming 2008-11-12  51  	return ftrace_nop;
fad57feba77d2e Matt Fleming 2008-11-12  52  }
fad57feba77d2e Matt Fleming 2008-11-12  53  

:::::: The code at line 50 was first introduced by commit
:::::: 9e28c46b7dd116a607ffb054c5545c468c77d779 sh: Fix dynamic ftrace's NOP action.

:::::: TO: Matt Fleming <matt@...sole-pimps.org>
:::::: CC: Matt Fleming <matt@...sole-pimps.org>

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

Download attachment ".config.gz" of type "application/gzip" (30800 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ