Re: [PATCH v2] task_work: kasan: record task_work_add() call stack

2021-03-17 Thread Andrey Konovalov
On Tue, Mar 16, 2021 at 3:44 AM Walter Wu wrote: > > Why record task_work_add() call stack? > Syzbot reports many use-after-free issues for task_work, see [1]. > After see the free stack and the current auxiliary stack, we think > they are useless, we don't know where register the work, this work

Re: [PATCH v2] task_work: kasan: record task_work_add() call stack

2021-03-16 Thread Oleg Nesterov
On 03/16, Walter Wu wrote: > > --- a/kernel/task_work.c > +++ b/kernel/task_work.c > @@ -34,6 +34,9 @@ int task_work_add(struct task_struct *task, struct > callback_head *work, > { > struct callback_head *head; > > + /* record the work call stack in order to print it in KASAN reports */

Re: [PATCH v2] task_work: kasan: record task_work_add() call stack

2021-03-16 Thread Jens Axboe
On 3/15/21 8:44 PM, Walter Wu wrote: > Why record task_work_add() call stack? > Syzbot reports many use-after-free issues for task_work, see [1]. > After see the free stack and the current auxiliary stack, we think > they are useless, we don't know where register the work, this work > may be the fr

Re: [PATCH v2] task_work: kasan: record task_work_add() call stack

2021-03-15 Thread Dmitry Vyukov
On Tue, Mar 16, 2021 at 3:44 AM Walter Wu wrote: > > Why record task_work_add() call stack? > Syzbot reports many use-after-free issues for task_work, see [1]. > After see the free stack and the current auxiliary stack, we think > they are useless, we don't know where register the work, this work

[PATCH v2] task_work: kasan: record task_work_add() call stack

2021-03-15 Thread Walter Wu
Why record task_work_add() call stack? Syzbot reports many use-after-free issues for task_work, see [1]. After see the free stack and the current auxiliary stack, we think they are useless, we don't know where register the work, this work may be the free call stack, so that we miss the root cause a