* [kees:for-next/kspp 21/25] drivers/misc/lkdtm/stackleak.c:17:39: error: call to undeclared function 'stackleak_task_low_bound'; ISO C99 and later do not support implicit function declarations
@ 2022-05-05 1:43 kernel test robot
2022-05-05 12:45 ` Mark Rutland
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-05-05 1:43 UTC (permalink / raw)
To: Mark Rutland; +Cc: llvm, kbuild-all, linux-kernel, Kees Cook
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/kspp
head: d46ac904fd35edfccc5080818e950d4d3b4697c4
commit: f4cfacd92972cc440d534b5156df23d0a2136bab [21/25] lkdtm/stackleak: rework boundary management
config: s390-randconfig-r044-20220502 (https://download.01.org/0day-ci/archive/20220505/202205050943.HDgeO9iV-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 363b3a645a1e30011cc8da624f13dac5fd915628)
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
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id=f4cfacd92972cc440d534b5156df23d0a2136bab
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees for-next/kspp
git checkout f4cfacd92972cc440d534b5156df23d0a2136bab
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/misc/lkdtm/stackleak.c:17:39: error: call to undeclared function 'stackleak_task_low_bound'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
const unsigned long task_stack_low = stackleak_task_low_bound(current);
^
>> drivers/misc/lkdtm/stackleak.c:18:40: error: call to undeclared function 'stackleak_task_high_bound'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
const unsigned long task_stack_high = stackleak_task_high_bound(current);
^
drivers/misc/lkdtm/stackleak.c:19:22: warning: incompatible pointer to integer conversion initializing 'const unsigned long' with an expression of type 'unsigned long (void)' [-Wint-conversion]
const unsigned long current_sp = current_stack_pointer;
^ ~~~~~~~~~~~~~~~~~~~~~
drivers/misc/lkdtm/stackleak.c:20:43: error: no member named 'lowest_stack' in 'struct task_struct'; did you mean 'ret_stack'?
const unsigned long lowest_sp = current->lowest_stack;
^~~~~~~~~~~~
ret_stack
include/linux/sched.h:1365:28: note: 'ret_stack' declared here
struct ftrace_ret_stack *ret_stack;
^
drivers/misc/lkdtm/stackleak.c:20:22: warning: incompatible pointer to integer conversion initializing 'const unsigned long' with an expression of type 'struct ftrace_ret_stack *' [-Wint-conversion]
const unsigned long lowest_sp = current->lowest_stack;
^ ~~~~~~~~~~~~~~~~~~~~~
drivers/misc/lkdtm/stackleak.c:42:16: error: call to undeclared function 'stackleak_find_top_of_poison'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
poison_high = stackleak_find_top_of_poison(task_stack_low, untracked_high);
^
2 warnings and 4 errors generated.
vim +/stackleak_task_low_bound +17 drivers/misc/lkdtm/stackleak.c
13
14 void lkdtm_STACKLEAK_ERASING(void)
15 {
16 const unsigned long task_stack_base = (unsigned long)task_stack_page(current);
> 17 const unsigned long task_stack_low = stackleak_task_low_bound(current);
> 18 const unsigned long task_stack_high = stackleak_task_high_bound(current);
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [kees:for-next/kspp 21/25] drivers/misc/lkdtm/stackleak.c:17:39: error: call to undeclared function 'stackleak_task_low_bound'; ISO C99 and later do not support implicit function declarations
2022-05-05 1:43 [kees:for-next/kspp 21/25] drivers/misc/lkdtm/stackleak.c:17:39: error: call to undeclared function 'stackleak_task_low_bound'; ISO C99 and later do not support implicit function declarations kernel test robot
@ 2022-05-05 12:45 ` Mark Rutland
2022-05-05 16:25 ` Kees Cook
0 siblings, 1 reply; 3+ messages in thread
From: Mark Rutland @ 2022-05-05 12:45 UTC (permalink / raw)
To: kernel test robot, Kees Cook; +Cc: llvm, kbuild-all, linux-kernel
Hi Kees,
I hadn't realised the LKDTM STACKLEAK test could be built with
CONFIG_STACKLEAK=n, and my rework of that depends upon helpers that only exist
when CONFIG_STACKLEAK=y.
IMO the test is nonsensical for CONFIG_STACKLEAK=n, and I reckon we should
either:
a) Not build the stackleak test at all when CONFIG_STACKLEAK=n
b) Have a small stub that just logs that CONFIG_STACKLEAK=n and the test is
being skipped.
Do you have any preference between the two?
Thanks,
Mark.
On Thu, May 05, 2022 at 09:43:36AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/kspp
> head: d46ac904fd35edfccc5080818e950d4d3b4697c4
> commit: f4cfacd92972cc440d534b5156df23d0a2136bab [21/25] lkdtm/stackleak: rework boundary management
> config: s390-randconfig-r044-20220502 (https://download.01.org/0day-ci/archive/20220505/202205050943.HDgeO9iV-lkp@intel.com/config)
> compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 363b3a645a1e30011cc8da624f13dac5fd915628)
> 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
> # install s390 cross compiling tool for clang build
> # apt-get install binutils-s390x-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id=f4cfacd92972cc440d534b5156df23d0a2136bab
> git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
> git fetch --no-tags kees for-next/kspp
> git checkout f4cfacd92972cc440d534b5156df23d0a2136bab
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> >> drivers/misc/lkdtm/stackleak.c:17:39: error: call to undeclared function 'stackleak_task_low_bound'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> const unsigned long task_stack_low = stackleak_task_low_bound(current);
> ^
> >> drivers/misc/lkdtm/stackleak.c:18:40: error: call to undeclared function 'stackleak_task_high_bound'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> const unsigned long task_stack_high = stackleak_task_high_bound(current);
> ^
> drivers/misc/lkdtm/stackleak.c:19:22: warning: incompatible pointer to integer conversion initializing 'const unsigned long' with an expression of type 'unsigned long (void)' [-Wint-conversion]
> const unsigned long current_sp = current_stack_pointer;
> ^ ~~~~~~~~~~~~~~~~~~~~~
> drivers/misc/lkdtm/stackleak.c:20:43: error: no member named 'lowest_stack' in 'struct task_struct'; did you mean 'ret_stack'?
> const unsigned long lowest_sp = current->lowest_stack;
> ^~~~~~~~~~~~
> ret_stack
> include/linux/sched.h:1365:28: note: 'ret_stack' declared here
> struct ftrace_ret_stack *ret_stack;
> ^
> drivers/misc/lkdtm/stackleak.c:20:22: warning: incompatible pointer to integer conversion initializing 'const unsigned long' with an expression of type 'struct ftrace_ret_stack *' [-Wint-conversion]
> const unsigned long lowest_sp = current->lowest_stack;
> ^ ~~~~~~~~~~~~~~~~~~~~~
> drivers/misc/lkdtm/stackleak.c:42:16: error: call to undeclared function 'stackleak_find_top_of_poison'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> poison_high = stackleak_find_top_of_poison(task_stack_low, untracked_high);
> ^
> 2 warnings and 4 errors generated.
>
>
> vim +/stackleak_task_low_bound +17 drivers/misc/lkdtm/stackleak.c
>
> 13
> 14 void lkdtm_STACKLEAK_ERASING(void)
> 15 {
> 16 const unsigned long task_stack_base = (unsigned long)task_stack_page(current);
> > 17 const unsigned long task_stack_low = stackleak_task_low_bound(current);
> > 18 const unsigned long task_stack_high = stackleak_task_high_bound(current);
>
> --
> 0-DAY CI Kernel Test Service
> https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [kees:for-next/kspp 21/25] drivers/misc/lkdtm/stackleak.c:17:39: error: call to undeclared function 'stackleak_task_low_bound'; ISO C99 and later do not support implicit function declarations
2022-05-05 12:45 ` Mark Rutland
@ 2022-05-05 16:25 ` Kees Cook
0 siblings, 0 replies; 3+ messages in thread
From: Kees Cook @ 2022-05-05 16:25 UTC (permalink / raw)
To: Mark Rutland; +Cc: kernel test robot, llvm, kbuild-all, linux-kernel
On Thu, May 05, 2022 at 01:45:37PM +0100, Mark Rutland wrote:
> Hi Kees,
>
> I hadn't realised the LKDTM STACKLEAK test could be built with
> CONFIG_STACKLEAK=n, and my rework of that depends upon helpers that only exist
> when CONFIG_STACKLEAK=y.
>
> IMO the test is nonsensical for CONFIG_STACKLEAK=n, and I reckon we should
> either:
>
> a) Not build the stackleak test at all when CONFIG_STACKLEAK=n
>
> b) Have a small stub that just logs that CONFIG_STACKLEAK=n and the test is
> being skipped.
>
> Do you have any preference between the two?
Since it's looking for a specific poison, it doesn't make sense to look
for this property as magically appearing (where as this kind of thing
sometimes exists for other tests: did the hypervisor block it instead of
the kernel, etc)
So, yeah, I'd wrap it in an ifdef with an else: XFAIL.
--
Kees Cook
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-05 16:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 1:43 [kees:for-next/kspp 21/25] drivers/misc/lkdtm/stackleak.c:17:39: error: call to undeclared function 'stackleak_task_low_bound'; ISO C99 and later do not support implicit function declarations kernel test robot
2022-05-05 12:45 ` Mark Rutland
2022-05-05 16:25 ` Kees Cook
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).