Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp240397ybg; Thu, 17 Oct 2019 22:12:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCn5dxV4vjTwYYf8+6VAJWMP+D+Qhfe2vfVddDxz14KLj3XmVJjf1R4X6lNQl44n+Cu8vJ X-Received: by 2002:a17:906:4e92:: with SMTP id v18mr6801637eju.242.1571375538618; Thu, 17 Oct 2019 22:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571375538; cv=none; d=google.com; s=arc-20160816; b=0eJXTjcrh2OHXjaIHHYcFt2mDyYEewljVaLhxZxC6Kxc6iKTQCgmKd5RqVbpn1by78 L1KlEHgwPIxPJS5a4cvkdq0fGtUalF+AEOUjQmbeHhm7NmyJr1xtrHWstUjXbHJaI+zd dYW1u/AINX2dpbFg4tE22z7tnx7Ze6YZ8AnB9pRTdhhxqAb+KztOvhf8bpkoirNvb1KF s3hXTzgBVQXc3qpZfC9GHcAEWZ3VmeDbCSIm3BNw630EMx065acraqcdKrQO4CWAUaOY lORug+Xm88NYmwE2nrV5fxc5eIBi1/akngB5LTCXdGnvZ4DKlZHaftaF56aFTrAazMXh 8A1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uh+Y61FIuHN11ISk5EOVmKLQiLwCogVrs+eoUekVmbI=; b=bI/66Rmi8ixj5FukaQ4tu41G2OX3et4YUgVfgdptx4I1vTBwdpOvxEXzSOSw5a0ALB 6EB0HI19caiNqnpbbsqeflsGvecsDgUmcuVjrkkVH3w6pQQIeUOTRKRFRuMvhxLJmkb1 6Br/RNkY5Twp82x7hZQuahCsalJv2JbQ8PexK6k1r8PtvNC1KWxPv4iEnE57y5cGlexB aHR1dTlL/LWpsCCLTnWuOhDa+S3gxEZ/elL9hKeFgOcC/enX+f9g8WZomK4ftVg5fhUd bRN5VtWzH0GDPzii6uiMihz/mQBevuuZK35NpRT/9gQAFJ361JHgAZO7q1HmDv+bicrW JDhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=E4oqhMJ1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g18si2658911eje.297.2019.10.17.22.11.55; Thu, 17 Oct 2019 22:12:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=E4oqhMJ1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438743AbfJPXds (ORCPT + 99 others); Wed, 16 Oct 2019 19:33:48 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:34591 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732849AbfJPXdr (ORCPT ); Wed, 16 Oct 2019 19:33:47 -0400 Received: by mail-pl1-f193.google.com with SMTP id k7so187062pll.1; Wed, 16 Oct 2019 16:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uh+Y61FIuHN11ISk5EOVmKLQiLwCogVrs+eoUekVmbI=; b=E4oqhMJ1fkqY/nLBITYRXBbOjqI9ON1Q10rXROB3hT0lUN+Jgf/PA36PavG2+dwmwt dsaXeSWss5XL2F2+DtQqVbc02C1kK2HNTYq7zpIJLUngiGQzTirMOC4/cvsmNneyct5I bo5YAEnPLSeghUTOs4fEo2Gs6j9nUNd93vW3iVDBLqsQhBM3ovr9dC22IF8mPeZGv5pf du8wuRd0rvlpQ2EKADoKgrPqGmi/XkdPBoJUFWigIjBNMOVj4YQs/SzM1KgVo9WB89+4 lhrQ1EJFvrYnaxf7ulXiQm3yXCnm051u0r586KHq05nY8O0eMJ2PdxVTfx9B7I8QGDg/ IqTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uh+Y61FIuHN11ISk5EOVmKLQiLwCogVrs+eoUekVmbI=; b=mMGHVZKaKyswjrDNqfctwS147y2ofGblUDnY42MXu9GLXt8M0363I5oVRlFrlsiZ2R HRl0LCfpfSkw4xnsULKC1ZUdnWph2jTeGNn4LZrOOdPithiyn0VrQBJcjfxocpFmTggc ye8lcZHG050Y47DjO0XeMKpUYl6B22fN8rJqGsQ3w68MYSjDr66jIDCE9Ntvn4oTZWVK E4A7brsJAq+wGkmX6clScimjbGjwBTZK9S/U1L+lF467+A34hCJZPk42TgkPyRhR1s3y 3ZXFTrPXrV2DushQ2RbDheBAa1T8xM/paQfLkk69ey0KcjnOJb30Um4tt3oOqhVP2LY6 S8uQ== X-Gm-Message-State: APjAAAUUepa1Ce0amrEsxzS6pk9oa5kucrXOj99vdYEm8ZxFO8diAl7X EOSqZHzKB7Gn0NGJTqsUDDc= X-Received: by 2002:a17:902:7798:: with SMTP id o24mr843574pll.108.1571268826019; Wed, 16 Oct 2019 16:33:46 -0700 (PDT) Received: from gmail.com ([2620:0:1008:fd00:25a6:3140:768c:a64d]) by smtp.gmail.com with ESMTPSA id s18sm227268pji.30.2019.10.16.16.33.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2019 16:33:44 -0700 (PDT) Date: Wed, 16 Oct 2019 16:33:42 -0700 From: Andrei Vagin To: Thomas Gleixner Cc: Vincenzo Frascino , Dmitry Safonov , linux-kernel@vger.kernel.org, Dmitry Safonov <0x7f454c46@gmail.com>, Andrei Vagin , Adrian Reber , Andy Lutomirski , Arnd Bergmann , Christian Brauner , Cyrill Gorcunov , "Eric W. Biederman" , "H. Peter Anvin" , Ingo Molnar , Jann Horn , Jeff Dike , Oleg Nesterov , Pavel Emelyanov , Shuah Khan , containers@lists.linux-foundation.org, criu@openvz.org, linux-api@vger.kernel.org, x86@kernel.org Subject: Re: [PATCHv7 01/33] ns: Introduce Time Namespace Message-ID: <20191016233342.GA3075@gmail.com> References: <20191011012341.846266-1-dima@arista.com> <20191011012341.846266-2-dima@arista.com> <80af93da-d497-81de-2a2a-179bb3bc852d@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 16, 2019 at 12:39:11PM +0200, Thomas Gleixner wrote: > On Wed, 16 Oct 2019, Vincenzo Frascino wrote: > > < Trim 250+ lines ( 3+ pages) of pointlessly wasted electrons > > > > > --- a/init/Kconfig > > > +++ b/init/Kconfig > > > @@ -1096,6 +1096,13 @@ config UTS_NS > > > In this namespace tasks see different info provided with the > > > uname() system call > > > > > > +config TIME_NS > > > + bool "TIME namespace" > > > + default y > > > > Having CONFIG_TIME_NS "default y" makes so that the option is selected even on > > the architectures that have no support for time namespaces. > > The direct consequence is that the fallbacks defined in this patch are never > > selected and this ends up in kernel compilation errors due to missing symbols. > > > > The error below shows what happens on arm64 (similar behavior on other > > architectures): > > > > aarch64-linux-gnu-ld: kernel/time/namespace.o: in function `timens_on_fork': > > kernel/time/namespace.c:321: undefined reference to `vdso_join_timens' > > > > My proposal is to keep TIME_NS "default n" (just remove "default y"), let the > > architectures that enable time namespaces select it and make CONFIG_TIME_NS > > select GENERIC_VDSO_TIME_NS if arch has HAVE_GENERIC_VDSO. > > Nah. > > config TIME_NS > bool "TIME namespace" > depends on GENERIC_VDSO_TIME_NS I was thinking to fix this by the same way with a small difference. If GENERIC_GETTIMEOFDAY isn't set, it should be safe to allow enabling TIME_NS. In this case, clock_gettime works via system call and we don't have arch-specific code in this case. Does this sound reasonable? depends on (!GENERIC_GETTIMEOFDAY || GENERIC_VDSO_TIME_NS) Thanks, Andrei