Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2175611ybh; Fri, 24 Jul 2020 06:25:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkAGNXfY2wp05qpe40AtgpnMTyJUdAWqz/9Xf6QX16Jkqx/vc3OxpX9TbtOr9DOPCvQo5d X-Received: by 2002:a17:907:411b:: with SMTP id nw19mr8998445ejb.84.1595597154337; Fri, 24 Jul 2020 06:25:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595597154; cv=none; d=google.com; s=arc-20160816; b=CME1QEYRwziM2ZPkaEtlxOQ9oHFEAiP2RiI+wiUjm+emOxUoj0ddTHgVb6RZltYx9p lKWKltX7aYbhLqetCGNkJIPbKofMIwmXLgZ+VMOAnVtTNThW1VIToFg8AxjCgz29+cuM i2k6l3O/Jkf8yGDVWmYm/ooSflZCDpr5n+jdVRjmyYqn/DZQ3MeCs9b/NhTslYlEFBDC 8YKzQRdCdwNKlPVCE/auXmlp6web8ExFFYaZkYv61sg5wtlxm9kWmWpQRTMqrCMxuSRk oaU8kLkeDf8XwzgmZVdZR5mIX/BLHCEcXz5hRoAwfNbszvewQrQ98furwvOOdfxxtBby j+jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=8gts4+rhoCcJmIbspKqY0dRXPYjhj0KR9ID/ZNHGSTY=; b=jvsZsbfF+ttV5+98tE4S4MPyiZGZffQS+XXAdxBpSiFQ30TMLIOFZQYqZ9kFFLCBgp nWbkkFljM1kl6zVM1Eo2v5KvShbG8Pc9rji+NUNX0DMtgHTIqD6dXFg6i7OGqtRgsCdY bzoDrOR8OC7fZikD5lsTLqXmlaOgKj/vPeqJWMhSpOFuXRdTUJMUYkBMbyuwnFPDQlJM NlVH15UprDzPyq+9isB4knlZeCmn1eHzvUbmhCDt6TCuVjXvWppuRdB558zW/CIEHUZO Aba5ht6L6XZpy4d8lDVucqc/3nmueHjgFcKyPK91Iadh6A5+QZ8Rllhb4eiwQpwwy95E 9LAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cs33rQ2N; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o13si509726edj.349.2020.07.24.06.25.32; Fri, 24 Jul 2020 06:25:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cs33rQ2N; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726730AbgGXNWh (ORCPT + 99 others); Fri, 24 Jul 2020 09:22:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726182AbgGXNWh (ORCPT ); Fri, 24 Jul 2020 09:22:37 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E354BC0619D3 for ; Fri, 24 Jul 2020 06:22:36 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1595596955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8gts4+rhoCcJmIbspKqY0dRXPYjhj0KR9ID/ZNHGSTY=; b=cs33rQ2NIph3IdIHiubXINFkgQEgCuMUMNUwZB5JhRE9WHGCgr5vbG7cTfnoTXOAmznq8e Tjw3rKYTn2fHAzbDZ+THN5wWU5w0GI3zmJgw5dmPucL+6Ns2MDhugZqEy5HbmtsCtz3Rls x+GiwpenaOHw+QBEqML3RIA7ikoyv0KsgV7BuMUw6I2111kK8XsWjtbh8UjecGuDugaXrY mfCjvNSCKDMKiKsLb/+QxjaUYHk+hgB0ddzwPnPS5I8aBfpOECwn/Kzp944oIxFVIgFkbF oMKykPXTrTjU2gKBqXzVQM15aItTnzQV7nnpEyJD4rXKtUfkpdFSCp8d1pF0Lg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1595596955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8gts4+rhoCcJmIbspKqY0dRXPYjhj0KR9ID/ZNHGSTY=; b=wdUDbYM98kOo9cWK8AKk8HLRWvE314quZ4hQSY20WWYkfc7cPLvHRt0qLRnLrfSFombc0h o9nrg8DG3u4UcgAA== To: Catalin Marinas Cc: Andrei Vagin , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Vincenzo Frascino , Mark Rutland , Dmitry Safonov , Christian Brauner Subject: Re: [PATCH v5 0/6] arm64: add the time namespace support In-Reply-To: <20200724110131.GC23388@gaia> References: <20200624083321.144975-1-avagin@gmail.com> <20200705064055.GA28894@gmail.com> <20200714015743.GA843937@gmail.com> <20200722181506.GA4517@gaia> <20200723174140.GA3991167@gmail.com> <87d04mvv0g.fsf@nanos.tec.linutronix.de> <20200724110131.GC23388@gaia> Date: Fri, 24 Jul 2020 15:22:34 +0200 Message-ID: <874kpxujxh.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Catalin Marinas writes: > On Thu, Jul 23, 2020 at 10:25:35PM +0200, Thomas Gleixner wrote: >> Andrei Vagin 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