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
| ||
|
Date: Fri, 22 Oct 2021 13:38:35 +0200 From: Peter Zijlstra <peterz@...radead.org> To: Ingo Molnar <mingo@...nel.org> Cc: Qi Zheng <zhengqi.arch@...edance.com>, Stephen Rothwell <sfr@...b.auug.org.au>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, "H. Peter Anvin" <hpa@...or.com>, Kees Cook <keescook@...omium.org>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Linux Next Mailing List <linux-next@...r.kernel.org> Subject: Re: [PATCH] stacktrace: Provide stack_trace_save_tsk() stub in the !CONFIG_STACKTRACE case too On Fri, Oct 22, 2021 at 09:43:50AM +0200, Ingo Molnar wrote: > > * Qi Zheng <zhengqi.arch@...edance.com> wrote: > > > > > > > On 10/18/21 2:23 PM, Stephen Rothwell wrote: > > > Hi all, > > > > > > After merging the tip tree, today's linux-next build (x86_64 allnoconfig) > > > failed like this: > > > > > > arch/x86/kernel/process.c: In function '__get_wchan': > > > arch/x86/kernel/process.c:950:2: error: implicit declaration of function 'stack_trace_save_tsk' [-Werror=implicit-function-declaration] > > > 950 | stack_trace_save_tsk(p, &entry, 1, 0); > > > | ^~~~~~~~~~~~~~~~~~~~ > > > cc1: some warnings being treated as errors > > > > > > Caused by commit > > > > > > bc9bbb81730e ("x86: Fix get_wchan() to support the ORC unwinder") > > > > > > stack_trace_save_tsk() requires CONFIG_STACKTRACE which is not set for > > > this build. > > > > Maybe get_wchan() can be updated to: > > > > unsigned long get_wchan(struct task_struct *p) > > { > > #ifdef CONFIG_STACKTRACE > > unsigned long entry = 0; > > > > stack_trace_save_tsk(p, &entry, 1, 0); > > return entry; > > #else /* CONFIG_STACKTRACE */ > > return 0; > > #endif > > } > > And repeat the same ugliness in every single function that happens to use > the stack_trace_save_tsk() API?? > > The correct solution is to define stack_trace_save_tsk() in the > !CONFIG_STACKTRACE case too, as the patch below does. That doesn't make sense for x86. We have an unconditional unwinder present. I've got these, meant to post them later today: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/log/?h=sched/wchan
Powered by blists - more mailing lists