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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrXk0i50vyWwou0AT0jtb7V2pqZiJW_7_dqrthi1N19qeg@mail.gmail.com>
Date:   Fri, 1 Oct 2021 12:02:19 -0700
From:   Andy Lutomirski <luto@...nel.org>
To:     Andy Lutomirski <luto@...nel.org>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [patch 4/5] sched: Delay task stack freeing on RT

On Fri, Oct 1, 2021 at 11:48 AM Andy Lutomirski <luto@...nel.org> wrote:
>
> On Fri, Oct 1, 2021 at 10:24 AM Thomas Gleixner <tglx@...utronix.de> wrote:
> >

> ISTM it would be conceptually for do_exit() to handle its own freeing
> in its own preemptible context.  Obviously that can't really work,
> since we can't free a task_struct or a task stack while we're running
> on it.  But I wonder if we could approximate it by putting this work
> in a workqueue so that it all runs in a normal schedulable context.
> To make the shell script case work nicely, we want to release the task
> stack before notifying anyone waiting for the dying task to exit, but
> maybe that's doable.  It could involve some nasty exit_signal hackery,
> though.

I'm making this way more complicated than it needs to be.  How about
we unaccount the task stack in do_exit and release it for real in
finish_task_switch()?  Other than accounting, free_thread_stack
doesn't take any locks.

--Andy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ