[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrULGHnWhg2qj5Cr9L9neQ_qPE+83uSQny-kGoh7NH1cgQ@mail.gmail.com>
Date: Wed, 12 Nov 2014 09:25:13 -0800
From: Andy Lutomirski <luto@...capital.net>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Borislav Petkov <bp@...en8.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Chen, Gong" <gong.chen@...ux.intel.com>,
Tony Luck <tony.luck@...el.com>, X86 ML <x86@...nel.org>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH v2 4/5] x86/mce: Simplify flow when handling recoverable
memory errors
On Wed, Nov 12, 2014 at 9:20 AM, Oleg Nesterov <oleg@...hat.com> wrote:
> Sorry, I am a bit confused...
>
> On 11/11, Borislav Petkov wrote:
>>
>> Roughly speaking, we want to be able to mark a task with the sign of
>> death and to kill it, if needed.
>
> "it" is current, yes?
This part I'm not sure about due to MCE broadcast. "It" is current
for exactly one cpu that's in do_machine_check.
>
> So I agree with Andy, task_work_add() can work and you can also pass
> paddr/restartable to the handler.
>
> But,
>
>> The important part is *before* it
>> gets to run again.
>
> But it is already running? Perhaps you meant "before it returns to
> user-mode" ?
>
Right. But killing it in the do_exit sense from do_machine_check is
currently impossible because do_machine_check runs on an IST stack.
With my patch, if do_machine_check sees user_mode_vm(regs) and
CONFIG_X86_64, then it will be running on the real task stack, so it
can enable interrupts, kill the task however it wants, etc. This was
the original motivation for my patch.
--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists