From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.4 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6771FC34022 for ; Mon, 17 Feb 2020 15:34:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3BA3F20718 for ; Mon, 17 Feb 2020 15:34:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kYTmPIqc"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="puy2ySPz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3BA3F20718 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DoShWSDvYykZNTjqOMxi5/enaiDsr7yYhLTWdB8l6b4=; b=kYTmPIqcPy6So4 k95hve/kyz0/VUuoNOSwW18JSrVB7+Qmsu58RgTtjyoSRsaB6N5kPar1HYJkaF0pPEiBAYhOCRwYo 7mtOPmSUSz86MCVni6afDCW0RZaqWQZJWFh+5wwKF894DdrRxK6fmsmt8QNery1a16P7iKOJ9C/b5 OC52fM2e3lHLhCmDI4Ng6alLQNohT0HyKiKF1MyVUqBo0SvWE5GXJMtqAergEmTsV67j2R3S3kcRw GypVNLAqH18ZbxMPh2mdNC8RrlbGlnXlftd4sNrQFcKOSGHRA7hMJBzWO7+mCPatAuA0by3lDspEB 1LLd/l0m68NforbcoGDg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3iPP-0006bY-Um; Mon, 17 Feb 2020 15:34:07 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3iPM-0006b0-DD for linux-arm-kernel@lists.infradead.org; Mon, 17 Feb 2020 15:34:05 +0000 Received: by mail-pf1-x443.google.com with SMTP id q8so9066913pfh.7 for ; Mon, 17 Feb 2020 07:34:03 -0800 (PST) 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; bh=OnGntDBcyiKhIaqHVrJNbrm40qr8SM9LXEMNXQWW6ww=; b=puy2ySPzIMygltvNUbJE8vGf3zYfJWDb5d1gMlzL/Xhr1hVyX/AOPbH4tJy8m6CBrZ bOMYxrMlSPRkq7d4m4xS0UUQhkX6khSRHbB2Auv4TX6O6zaa43iDz52AQXnw0tH5hlHh Ei6p1C77fcO67RzPnKOeaUXQyp33kNaePe6WzzVao7Dm2hrk3n1wd0Xd00NA1+DMHUPd j7hh8bOQT+d5Fh2SjytG2tJYdalDhNkU5lVx8kx4t8GPbjbLaCJeDwkC/tZsnbsZbUPH jjGAMArjlXbqwcCByr1ZBWWe0X866EBAgE+EPaYGxCohozditLw4A44lg+/KL4wEdW5c 4dhg== 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; bh=OnGntDBcyiKhIaqHVrJNbrm40qr8SM9LXEMNXQWW6ww=; b=Um65LjhD9Odiv5Z3vVOIf8SNciyCGtOtNOdNJLncyYLxa+VkLhUQWq1QiX85YjOiZ3 qdUmvuwJZ2A65cCuD7rgoKeex3rXCZUv0yYSdisfk6eeubqxT5N1J4kpb4LyJGX1tyqc k25AhPf5HOmKQSR6iFyUtJM0l6iExbMleLLskd75pmTzYctvEgIOcyPT4MsJAGxAPvZp tniAz46LXpaTbNKyFtU7olmmKM5c/fXP/5Z59VPdQDDDaaWoZQUrZnic+h6tBNStJSSh 43CDiQYJ7WZvbXVMbgm+o+hb6G9ta/F4TF8+bWpguSyKyfVuU2RLZJZE3yXmyKd2tdLa hdHg== X-Gm-Message-State: APjAAAXRF+hsFmtToQ75HqnK6tWMnGprVLOvXmgKOd5lVF1hhRccw3wt n2p2hvNYCioXMQlLaqjwpno= X-Google-Smtp-Source: APXvYqz2CFg3GxIP/H+IgdKCxm1s0BXfvZ43HoHHoeIaCPsqWl8JRxmzOBbjGUiwrh89Li2i5GusqA== X-Received: by 2002:a63:fc0c:: with SMTP id j12mr18071653pgi.378.1581953643383; Mon, 17 Feb 2020 07:34:03 -0800 (PST) Received: from gmail.com ([64.251.70.126]) by smtp.gmail.com with ESMTPSA id z16sm820852pff.125.2020.02.17.07.34.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2020 07:34:02 -0800 (PST) Date: Mon, 17 Feb 2020 07:34:00 -0800 From: Andrei Vagin To: Vincenzo Frascino Subject: Re: [PATCH 0/5] arm64: add the time namespace support Message-ID: <20200217153400.GA26105@gmail.com> References: <20200204175913.74901-1-avagin@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200204175913.74901-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200217_073404_453043_8FF3A728 X-CRM114-Status: GOOD ( 18.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dmitry Safonov Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Vincenzo, could you take a look this patchset? On Tue, Feb 04, 2020 at 09:59:08AM -0800, Andrei Vagin wrote: > Allocate the time namespace page among VVAR pages and add the logic > to handle faults on VVAR properly. > > If a task belongs to a time namespace then the VVAR page which contains > the system wide VDSO data is replaced with a namespace specific page > which has the same layout as the VVAR page. That page has vdso_data->seq > set to 1 to enforce the slow path and vdso_data->clock_mode set to > VCLOCK_TIMENS to enforce the time namespace handling path. > > The extra check in the case that vdso_data->seq is odd, e.g. a concurrent > update of the VDSO data is in progress, is not really affecting regular > tasks which are not part of a time namespace as the task is spin waiting > for the update to finish and vdso_data->seq to become even again. > > If a time namespace task hits that code path, it invokes the corresponding > time getter function which retrieves the real VVAR page, reads host time > and then adds the offset for the requested clock which is stored in the > special VVAR page. > > Cc: Vincenzo Frascino > Cc: Thomas Gleixner > Cc: Dmitry Safonov > > Andrei Vagin (5): > arm64/vdso: use the fault callback to map vvar pages > arm64/vdso: Zap vvar pages when switching to a time namespace > arm64/vdso: Add time napespace page > arm64/vdso: Handle faults on timens page > arm64/vdso: Restrict splitting VVAR VMA > > arch/arm64/Kconfig | 1 + > .../include/asm/vdso/compat_gettimeofday.h | 11 ++ > arch/arm64/include/asm/vdso/gettimeofday.h | 8 ++ > arch/arm64/kernel/vdso.c | 134 ++++++++++++++++-- > arch/arm64/kernel/vdso/vdso.lds.S | 3 +- > arch/arm64/kernel/vdso32/vdso.lds.S | 3 +- > include/vdso/datapage.h | 1 + > 7 files changed, 147 insertions(+), 14 deletions(-) > > -- > 2.24.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel