lkml.org 
[lkml]   [2021]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] lkdtm: avoid printk() in recursive_loop()
On Thu, Dec 16, 2021 at 12:16:19PM +0100, Ard Biesheuvel wrote:
> On Thu, 7 Oct 2021 at 18:59, Kees Cook <keescook@chromium.org> wrote:
> >
> > On Thu, 7 Oct 2021 10:12:35 +0200, Ard Biesheuvel wrote:
> > > The recursive_loop() function is intended as a diagnostic to ensure that
> > > exhausting the stack is caught and mitigated. Currently, it uses
> > > pr_info() to ensure that the function has side effects that the compiler
> > > cannot simply optimize away, so that the stack footprint does not get
> > > reduced inadvertently.
> > >
> > > The typical mitigation for stack overflow is to kill the task, and this
> > > overflow may occur inside the call to pr_info(), which means it could be
> > > holding the console lock when this happens. This means that the console
> > > lock is never going to be released again, preventing the diagnostic
> > > prints related to the stack overflow handling from being visible on the
> > > console.
> > >
> > > [...]
> >
> > Applied to for-next/lkdtm, thanks!
> >
> > [1/1] lkdtm: avoid printk() in recursive_loop()
> > https://git.kernel.org/kees/c/700fa7d22233
> >
>
> Ping?

Eek, I didn't send my -next pull to Greg yet. Done now; thanks for the
ping! :)

-Kees

--
Kees Cook

\
 
 \ /
  Last update: 2021-12-17 01:03    [W:0.075 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site