[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <874kpxujxh.fsf@nanos.tec.linutronix.de>
Date: Fri, 24 Jul 2020 15:22:34 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Catalin Marinas <catalin.marinas@....com>
Cc: Andrei Vagin <avagin@...il.com>, Will Deacon <will@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Vincenzo Frascino <vincenzo.frascino@....com>,
Mark Rutland <mark.rutland@....com>,
Dmitry Safonov <dima@...sta.com>,
Christian Brauner <christian.brauner@...ntu.com>
Subject: Re: [PATCH v5 0/6] arm64: add the time namespace support
Catalin Marinas <catalin.marinas@....com> writes:
> On Thu, Jul 23, 2020 at 10:25:35PM +0200, Thomas Gleixner wrote:
>> Andrei Vagin <avagin@...il.com> writes:
>> > On Wed, Jul 22, 2020 at 07:15:06PM +0100, Catalin Marinas wrote:
>> >
>> > I don't think that we need to handle this case in the kernel. Users
>> > must understand what they are doing and have to write code so that avoid
>> > these sort of situations. In general, I would say that in most cases it
>> > is a bad idea to call setns from a signal handler.
>>
>> This should not be supported in the first place and just let the
>> offender die right there.
>
> It would have been nice if we caught the offender easily but since
> signal handling doesn't have to be paired with sigreturn(), the kernel
> can't tell whether setns() is called in the wrong context. I guess we
> just have to live with this (maybe document the restriction in
> time_namespaces(7) or setns(2)).
Yes, I know that it's more or less impossible. The 'should' was just
wishful thinking :)
But yes, proper documentation is required.
Thanks,
tglx
Powered by blists - more mailing lists