[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202204170710.LwCV5Ec0-lkp@intel.com>
Date: Sun, 17 Apr 2022 07:26:33 +0800
From: kernel test robot <lkp@...el.com>
To: Kees Cook <keescook@...omium.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Dan Li <ashimida@...ux.alibaba.com>
Subject: [kees:for-next/lkdtm 6/6] drivers/misc/lkdtm/cfi.c:62:37: warning:
cast from pointer to integer of different size
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/lkdtm
head: 2e53b877dc1258d4ac3de98f496bb88ec3bf5e25
commit: 2e53b877dc1258d4ac3de98f496bb88ec3bf5e25 [6/6] lkdtm: Add CFI_BACKWARD to test ROP mitigations
config: sparc-randconfig-r026-20220417 (https://download.01.org/0day-ci/archive/20220417/202204170710.LwCV5Ec0-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id=2e53b877dc1258d4ac3de98f496bb88ec3bf5e25
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees for-next/lkdtm
git checkout 2e53b877dc1258d4ac3de98f496bb88ec3bf5e25
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sparc SHELL=/bin/bash drivers/misc/lkdtm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/misc/lkdtm/cfi.c: In function 'set_return_addr_unchecked':
>> drivers/misc/lkdtm/cfi.c:62:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
62 | ((__force __typeof__(addr))((__force u64)(addr) | PAGE_OFFSET))
| ^
drivers/misc/lkdtm/cfi.c:72:13: note: in expansion of macro 'no_pac_addr'
72 | if (no_pac_addr(*ret_addr) == expected)
| ^~~~~~~~~~~
>> drivers/misc/lkdtm/cfi.c:62:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
62 | ((__force __typeof__(addr))((__force u64)(addr) | PAGE_OFFSET))
| ^
drivers/misc/lkdtm/cfi.c:72:13: note: in expansion of macro 'no_pac_addr'
72 | if (no_pac_addr(*ret_addr) == expected)
| ^~~~~~~~~~~
drivers/misc/lkdtm/cfi.c: In function 'set_return_addr':
>> drivers/misc/lkdtm/cfi.c:62:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
62 | ((__force __typeof__(addr))((__force u64)(addr) | PAGE_OFFSET))
| ^
drivers/misc/lkdtm/cfi.c:87:13: note: in expansion of macro 'no_pac_addr'
87 | if (no_pac_addr(*ret_addr) == expected)
| ^~~~~~~~~~~
>> drivers/misc/lkdtm/cfi.c:62:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
62 | ((__force __typeof__(addr))((__force u64)(addr) | PAGE_OFFSET))
| ^
drivers/misc/lkdtm/cfi.c:87:13: note: in expansion of macro 'no_pac_addr'
87 | if (no_pac_addr(*ret_addr) == expected)
| ^~~~~~~~~~~
vim +62 drivers/misc/lkdtm/cfi.c
60
61 #define no_pac_addr(addr) \
> 62 ((__force __typeof__(addr))((__force u64)(addr) | PAGE_OFFSET))
63
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists