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=-4.0 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 5908EC433E0 for ; Mon, 27 Jul 2020 06:47:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 24A2620759 for ; Mon, 27 Jul 2020 06:47:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="i1SZqjRa"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FWwfE5u6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24A2620759 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+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=merlin.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=TRUoYsFa7ig1sDdmQ3QW1C1cmiErVYzqF5X6lCW9vy8=; b=i1SZqjRaDVvNrC8ZA9BhvRn7t WYdCF9/Mj4JFRukVKGmF4yvmawVU3FZclpSA+c3VRuzirujSbBkE1o2r/a++kNCx5UK89wTAf1So2 Ewe4kzJCAGkmAI7HbH5dfk1ud5PCFh92t8/lLtQqgBuIjhndCGFhHpqISDDBd3CSzd/qeymK/6WTw fHVLBdJPVKkYIu83TeOaFiX3cd7+CN/yt+4Hrk8jXYL+bn1Hd4JKkHxNciFNePZZ9r0kbZtejIQdZ CkYhN0ORjs+apfaVY5omI5G7f5jivLw6EzXPVGeNL75sfCJpN5x423Kh00M3PGMlYlopp/spdTetI +FBJqhDVQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzwto-0003DZ-1a; Mon, 27 Jul 2020 06:46:12 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzwtl-0003Cf-RQ for linux-arm-kernel@lists.infradead.org; Mon, 27 Jul 2020 06:46:10 +0000 Received: by mail-pl1-x642.google.com with SMTP id q17so7477579pls.9 for ; Sun, 26 Jul 2020 23:46:08 -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; bh=o1htzMj2bxfnfiU+5t35ArMG7QF9SU1xp/VhRzpBk34=; b=FWwfE5u6mzbwbJGxwSUZ8jN7eWMdtg0jcWCp6bBT/vWlwPgo4AtX74RlVqH9r1LF7a Ff62HVqy/xFfIy7NmniM+Cq5MIZ3b78bHJOOy2Er/VafwC5e3DtNdZgsMNVz+MsQ8LhY +hwjzahctpXtXTN2qeeSdDCeL01gwTppJHDzReZqjuf4QGXdtcxi/DU6H3cfoFJqB8MR aH8Uhu2ur1otdW9rmRac6GsMt0eUFc115vhl4PUTpBmyCiEsdjzhC9Ft+vh/RTb7bftM Tc/btlEo/fMtYqpDsCRL+fVbB8uT75WsoyKqIljby5aHcKAXi/Bg+XTKFfA+INXOErqA A93A== 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=o1htzMj2bxfnfiU+5t35ArMG7QF9SU1xp/VhRzpBk34=; b=MZ8mIqCv47+ZltIjqDNf2M/qftTJsfFlbjZ5L6hxLcvetwG/HC8kC0TLHhTf/whl9W BFAQ/zuBWYpzph9ycAkO5ELJr0mVYvT49lk4xT7j8XCY3clC8VHN8A8xs3Qfl+Q6jCIZ aPmVbgyqmtCPqjYBDCF6pVXXXR7G9t6WX7H96bn8MbVteeM8s5dDeuvjAf3eruZDYSC2 CWas7Shy8Az5/ZAAP0C2C9HAT3TxPVcc9LYarm7Mu6TyCHKl2rBCE+HIUbPbkxD92RCL +xFHMDIR1abRXRlzQs/Zjc1AP1e+dZ3EFrKgQ40cvLBt32kjpsBuP/l8u3jBmrNsYNwy tz/A== X-Gm-Message-State: AOAM532iDzdkMo4iZURpqjxEfMS9swgTvj7497UVCjES+Qq2rRuxMrqI mxwkPRVACPoqd1Km7/cb/wA= X-Google-Smtp-Source: ABdhPJxn49FWtMnYEdpbN+PM8DPUPr+XvhlXSPj1CY1DzEmveoFhii8PHcniBC1sOcI2CkoZm1I7kw== X-Received: by 2002:a17:902:74c2:: with SMTP id f2mr7250548plt.233.1595832366503; Sun, 26 Jul 2020 23:46:06 -0700 (PDT) Received: from gmail.com ([2601:600:9b7f:872e:a655:30fb:7373:c762]) by smtp.gmail.com with ESMTPSA id m9sm13208344pjs.18.2020.07.26.23.46.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jul 2020 23:46:05 -0700 (PDT) Date: Sun, 26 Jul 2020 23:45:45 -0700 From: Andrei Vagin To: Catalin Marinas Subject: Re: [PATCH 1/6] arm64/vdso: use the fault callback to map vvar pages Message-ID: <20200727064545.GA9619@gmail.com> References: <20200624083321.144975-1-avagin@gmail.com> <20200624083321.144975-2-avagin@gmail.com> <159561069973.19270.10637845392621633755.b4-ty@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <159561069973.19270.10637845392621633755.b4-ty@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200727_024609_909780_586A0C23 X-CRM114-Status: GOOD ( 19.30 ) 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: Mark Rutland , Dmitry Safonov , linux-kernel@vger.kernel.org, Thomas Gleixner , Vincenzo Frascino , Will Deacon , Christian Brauner , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jul 24, 2020 at 06:26:23PM +0100, Catalin Marinas wrote: > On Wed, 24 Jun 2020 01:33:16 -0700, Andrei Vagin wrote: > > Currently the vdso has no awareness of time namespaces, which may > > apply distinct offsets to processes in different namespaces. To handle > > this within the vdso, we'll need to expose a per-namespace data page. > > > > As a preparatory step, this patch separates the vdso data page from > > the code pages, and has it faulted in via its own fault callback. > > Subsquent patches will extend this to support distinct pages per time > > namespace. > > > > [...] > > Applied to arm64 (for-next/timens), provisionally. > > One potential issue I did not check is the compat vDSO. The arm32 port > does not support timens currently. IIUC, with these patches and > COMPAT_VDSO enabled, it will allow timens for compat processes. Normally > I'd like the arm32 support first before updating compat but I don't > think there would be any interface incompatibility here. > > However, does this still work for arm32 processes if COMPAT_VDSO is > disabled in the arm64 kernel? Yes, it does. I checked that the timens test passes with and without COMPAT_VDSO: [avagin@laptop linux]$ git describe HEAD v5.8-rc3-6-g9614cc576d76 alpine:/tip/tools/testing/selftests/timens# readelf -h ./timens ELF Header: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: DYN (Shared object file) Machine: ARM Version: 0x1 Entry point address: 0x711 Start of program headers: 52 (bytes into file) Start of section headers: 15444 (bytes into file) Flags: 0x5000400, Version5 EABI, hard-float ABI Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 7 Size of section headers: 40 (bytes) Number of section headers: 32 Section header string table index: 31 alpine:/tip/tools/testing/selftests/timens# uname -a Linux arm64-alpine 5.8.0-rc3+ #100 SMP Sun Jul 26 23:21:07 PDT 2020 aarch64 Linux [avagin@laptop linux]$ cat .config | grep VDSO CONFIG_COMPAT_VDSO=y CONFIG_THUMB2_COMPAT_VDSO=y CONFIG_HAVE_GENERIC_VDSO=y CONFIG_GENERIC_COMPAT_VDSO=y CONFIG_GENERIC_VDSO_TIME_NS=y alpine:/tip/tools/testing/selftests/timens# ./timens 1..10 ok 1 Passed for CLOCK_BOOTTIME (syscall) ok 2 Passed for CLOCK_BOOTTIME (vdso) not ok 3 # SKIP CLOCK_BOOTTIME_ALARM isn't supported not ok 4 # SKIP CLOCK_BOOTTIME_ALARM isn't supported ok 5 Passed for CLOCK_MONOTONIC (syscall) ok 6 Passed for CLOCK_MONOTONIC (vdso) ok 7 Passed for CLOCK_MONOTONIC_COARSE (syscall) ok 8 Passed for CLOCK_MONOTONIC_COARSE (vdso) ok 9 Passed for CLOCK_MONOTONIC_RAW (syscall) ok 10 Passed for CLOCK_MONOTONIC_RAW (vdso) # Pass 8 Fail 0 Xfail 0 Xpass 0 Skip 2 Error 0 [avagin@laptop linux]$ cat .config | grep VDSO # CONFIG_COMPAT_VDSO is not set CONFIG_HAVE_GENERIC_VDSO=y CONFIG_GENERIC_VDSO_TIME_NS=y alpine:/tip/tools/testing/selftests/timens# ./timens 1..10 ok 1 Passed for CLOCK_BOOTTIME (syscall) ok 2 Passed for CLOCK_BOOTTIME (vdso) not ok 3 # SKIP CLOCK_BOOTTIME_ALARM isn't supported not ok 4 # SKIP CLOCK_BOOTTIME_ALARM isn't supported ok 5 Passed for CLOCK_MONOTONIC (syscall) ok 6 Passed for CLOCK_MONOTONIC (vdso) ok 7 Passed for CLOCK_MONOTONIC_COARSE (syscall) ok 8 Passed for CLOCK_MONOTONIC_COARSE (vdso) ok 9 Passed for CLOCK_MONOTONIC_RAW (syscall) ok 10 Passed for CLOCK_MONOTONIC_RAW (vdso) # Pass 8 Fail 0 Xfail 0 Xpass 0 Skip 2 Error 0 Thanks, Andrei _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel