From patchwork Wed Jun 24 08:33:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11622603 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1C685618 for ; Wed, 24 Jun 2020 08:35:34 +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 E95E12088E for ; Wed, 24 Jun 2020 08:35:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kv3iXk9G"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="inED/Qfo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E95E12088E 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+patchwork-linux-arm=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=othkPH0VyjkRJ4yiXkTHwgG7ijx1OmsvMAvXByPxWVw=; b=kv3iXk9Gu1u0xt1DJ3focJW7kr rpm5VbmnKNIbcfxf70gkLX86IA8XPfNdmQEOmyrLeoklVdsHxdzeLmZ5QCP4aEq2sUlPLM37WJ3Qb qfEXTNmmL8dr02W2LI5Bp9f2deaqMayR9uPXkwbm5w100qbT7BE1e3SLl8LRPyaLQVtdYOUOkmkSZ Vl0/biJseXL1OtIsXosFC7eEdm25ZPQy2jzEutRjPXfiFqDhIYeUZJ8XfTSr1/lBpg7YQccREpdND rnKkSbF0Hu7x98NkJ7gm3gKKVcQsS+NXvV0VZlBYAR8cq1fboL3aH829Z3IuUxEx6pJVb5ie4+UoV NhpY9U5Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jo0qd-0008H7-39; Wed, 24 Jun 2020 08:33:35 +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 1jo0qW-0008EZ-3m for linux-arm-kernel@lists.infradead.org; Wed, 24 Jun 2020 08:33:29 +0000 Received: by mail-pl1-x642.google.com with SMTP id k1so792116pls.2 for ; Wed, 24 Jun 2020 01:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cTWQs0HlakIx1EXTUfvYi5OI/+C9xhCIK6shQ1G+dgY=; b=inED/QfocfJvVgmnsagLvNK5ZybNoQfR9wcp/QL5AKj1ixNZ692lqxPsJgkPlmVhCV RxHfNyutt843L3+W25uaXmcm6QemN6vSqsKCYNMUd2tFxW+7GQxyxuUOt1kE4WgQXVCy nTGRdiMPJKI6fo88SHtq7uundZwirhbHXYpXxBY+NjcVFnxQ/CfHfSDJ0h3j9pNhk+zo Ir5RFvfHLfm8yUw2fomRWlQjstUOYLzHu3k3nsB1njibfYVh/unKZPFHl9QEkTaX4WTi uqK05p2t51hl0+lJ1wA4PDTwr47mWKP86z4wuVT2o/MtAdQz6g108jzUHQ+FmBAA5oEn EOdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cTWQs0HlakIx1EXTUfvYi5OI/+C9xhCIK6shQ1G+dgY=; b=IWEpX9qjWIXXD72dLNPPj2qRHi8ACVn5Zrh8BJ7y3El9nGv/36j1XiG3x+tBwm5KyN CYYyCMVSB/ygI0ejn0cFmz1M6rRnAiaPgWHC8mmZJZLatN62VFi/UQIPGR5eWX6Elmr1 y3Qa8y0TRNJwCtRbE5Tz0YKtKZ+W9YNl4cQWLw4QX+mfcdFCIsatpe2QQ8R1HtX+O0Gk UzUFPRPTTB+o7hL3sBKeTvVxQMjETm01z3CiLNAFF2E1NrsdA5FngPUb0LelWxjwdYdX iXDG9UCKw2ieSutTqEjLwDKY259UB1/IAxUmI1y+NbWJDsTz94AVX7XvLG7GJKMriTJa vlZg== X-Gm-Message-State: AOAM5321UWuP5G85rtC5wsW2lsxR3TCI7+vE1TpkHImN0U8YWlyx+aQE PpnKpj5dvxKWj8wMhuUaU7Q= X-Google-Smtp-Source: ABdhPJyVDRj2hXj+Fjq+I7TAU5NAayzGzoSlFOSJqBtvHZV712+kCKfrf3ZS9ZQpU7i/+kjn7+hteA== X-Received: by 2002:a17:90a:b30d:: with SMTP id d13mr27089006pjr.181.1592987604529; Wed, 24 Jun 2020 01:33:24 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:9b7f:872e:a655:30fb:7373:c762]) by smtp.gmail.com with ESMTPSA id g17sm4558614pju.11.2020.06.24.01.33.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 01:33:24 -0700 (PDT) From: Andrei Vagin To: Catalin Marinas , Will Deacon , Mark Rutland Subject: [PATCH 1/6] arm64/vdso: use the fault callback to map vvar pages Date: Wed, 24 Jun 2020 01:33:16 -0700 Message-Id: <20200624083321.144975-2-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200624083321.144975-1-avagin@gmail.com> References: <20200624083321.144975-1-avagin@gmail.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [avagin[at]gmail.com] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:642 listed in] [list.dnswl.org] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: Dmitry Safonov , linux-kernel@vger.kernel.org, Andrei Vagin , Thomas Gleixner , Vincenzo Frascino , Christian Brauner , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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. The vvar vma has to be installed with the VM_PFNMAP flag to handle faults via its vma fault callback. Reviewed-by: Vincenzo Frascino Reviewed-by: Dmitry Safonov Signed-off-by: Andrei Vagin --- arch/arm64/kernel/vdso.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index 4e016574bd91..7c4620451fa5 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -107,29 +107,32 @@ static int __vdso_init(enum vdso_abi abi) vdso_info[abi].vdso_code_start) >> PAGE_SHIFT; - /* Allocate the vDSO pagelist, plus a page for the data. */ - vdso_pagelist = kcalloc(vdso_info[abi].vdso_pages + 1, + vdso_pagelist = kcalloc(vdso_info[abi].vdso_pages, sizeof(struct page *), GFP_KERNEL); if (vdso_pagelist == NULL) return -ENOMEM; - /* Grab the vDSO data page. */ - vdso_pagelist[0] = phys_to_page(__pa_symbol(vdso_data)); - - /* Grab the vDSO code pages. */ pfn = sym_to_pfn(vdso_info[abi].vdso_code_start); for (i = 0; i < vdso_info[abi].vdso_pages; i++) - vdso_pagelist[i + 1] = pfn_to_page(pfn + i); + vdso_pagelist[i] = pfn_to_page(pfn + i); - vdso_info[abi].dm->pages = &vdso_pagelist[0]; - vdso_info[abi].cm->pages = &vdso_pagelist[1]; + vdso_info[abi].cm->pages = vdso_pagelist; return 0; } +static vm_fault_t vvar_fault(const struct vm_special_mapping *sm, + struct vm_area_struct *vma, struct vm_fault *vmf) +{ + if (vmf->pgoff == 0) + return vmf_insert_pfn(vma, vmf->address, + sym_to_pfn(vdso_data)); + return VM_FAULT_SIGBUS; +} + static int __setup_additional_pages(enum vdso_abi abi, struct mm_struct *mm, struct linux_binprm *bprm, @@ -150,7 +153,7 @@ static int __setup_additional_pages(enum vdso_abi abi, } ret = _install_special_mapping(mm, vdso_base, PAGE_SIZE, - VM_READ|VM_MAYREAD, + VM_READ|VM_MAYREAD|VM_PFNMAP, vdso_info[abi].dm); if (IS_ERR(ret)) goto up_fail; @@ -209,6 +212,7 @@ static struct vm_special_mapping aarch32_vdso_maps[] = { #ifdef CONFIG_COMPAT_VDSO [AA32_MAP_VVAR] = { .name = "[vvar]", + .fault = vvar_fault, }, [AA32_MAP_VDSO] = { .name = "[vdso]", @@ -376,6 +380,7 @@ enum aarch64_map { static struct vm_special_mapping aarch64_vdso_maps[] __ro_after_init = { [AA64_MAP_VVAR] = { .name = "[vvar]", + .fault = vvar_fault, }, [AA64_MAP_VDSO] = { .name = "[vdso]", From patchwork Wed Jun 24 08:33:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11622599 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 493CA1731 for ; Wed, 24 Jun 2020 08:35:30 +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 2258B2088E for ; Wed, 24 Jun 2020 08:35:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Cq7Dy151"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VfdUW/uz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2258B2088E 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+patchwork-linux-arm=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NBxA1+bz3vcvPMrOM2Jm2pJISM4k1ylRr7NHaNThPiQ=; b=Cq7Dy151EftjYXfbTXGj7liouR i1NRMBslM3+xk00ERAUm7AkkOW+ebDxChDxQ8W+VkdvYSCswyvaGKHoXvKa/IvoLFBSfh218cIWx3 pvIstY6CP1DLbGc/hdSi0/axmNp0TQvGUeHRN7NmG6nV5xakkyP6kBRWepLoP6oqhmM9bBLcXoQnq pwQhgbsTkfYUnYyWej1Dmigx3ntg+61mlReAXvCR4pgF2KR4w3YcReK1qwZTvd+7XkTL0jY6f7er7 rnowXNUR44LUiwHdvTPYp/i/q4Ram34YGJgHYzgc7WEYUy7gxcJe1uCSdmyuDICXIzfvMQaibu23q NjcJtQ/g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jo0qY-0008G8-MR; Wed, 24 Jun 2020 08:33:30 +0000 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jo0qV-0008Ei-SV for linux-arm-kernel@lists.infradead.org; Wed, 24 Jun 2020 08:33:28 +0000 Received: by mail-pj1-x1044.google.com with SMTP id ga6so896930pjb.1 for ; Wed, 24 Jun 2020 01:33:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6L0sSvuJwPBVGN9Ohq5sd3L0jaFGTHLmQeT1JCfgJfY=; b=VfdUW/uzzvEmR/U+vmvbk643UTJcokTJAKQfqN5Kut6DFr8gbaCfTe64IU8Yi4zNP2 66LdHf+2Y/TzC/HWot/VVYnFEv7FvY5KFXPU+zUlSAViJb/pgvvZdwq/bTvDv35Lj8qP dUDTRQtw5RLqnPbskCOEpWj0Z7jpO5h7C0Kbwfkb8V0ONRg32Pi0vRqh+ZicTpACB/Q5 hhq5GkSA41HCg2bw9UCbkPrwzZ+D2ErkGOwoeUMv+ZgwtcVAOJ6hYrb/HM6mdjTFdfGr 3Zup1MHOWff/+WaErP94/+5gh2YJy0VnA0riiQGn/FRmkJn1gUgF5uqC021Aq6aTYq3R 2uDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6L0sSvuJwPBVGN9Ohq5sd3L0jaFGTHLmQeT1JCfgJfY=; b=Xu9A3903+yc5VvOaYOqBtlvnedOL4Mt7YMZc4705EbZ+hfDkekxRp+QwXoSdkp7hGs dM7+ZoTopCunRGGrVNqX87I6dk6fFVmJakcACZnDbMoQRdCVeoMNaJfreHSoK0dwxiAE AqKyHgGiWwCX3akOwjPWcBUMJPYp6+a2yU0lI+GB1UFlSBHQlt/rqwdaL0TTjpG+W23x eKIkF5jRpB5AQbdG1seekoE9UNaZh+n8NKqTpUA3S6RHgH5663Fu4tvU9X76KNYK+JuD 2mqMpMQyQWe0Qe2l3t1KfqyFt50ky+T9bVCgef9GCoPgYuToyLUQyvNcrXkDAofWm2X3 JKvQ== X-Gm-Message-State: AOAM532HjXi3L3wOYnPLITaJzC0SeHfVkDgTentrqMM8r4Fp4YeTG/uD 9ZmFSW24OAWHcHfpVb87lWM= X-Google-Smtp-Source: ABdhPJznW9WmgcnAZJ1i65s0e6ryKofDyAzqw/jLqIO9jdzsh+wDjR8S+aZaTnpL4ko6Rs16mnwTzA== X-Received: by 2002:a17:90a:c797:: with SMTP id gn23mr26694003pjb.165.1592987605689; Wed, 24 Jun 2020 01:33:25 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:9b7f:872e:a655:30fb:7373:c762]) by smtp.gmail.com with ESMTPSA id g17sm4558614pju.11.2020.06.24.01.33.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 01:33:24 -0700 (PDT) From: Andrei Vagin To: Catalin Marinas , Will Deacon , Mark Rutland Subject: [PATCH 2/6] arm64/vdso: Zap vvar pages when switching to a time namespace Date: Wed, 24 Jun 2020 01:33:17 -0700 Message-Id: <20200624083321.144975-3-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200624083321.144975-1-avagin@gmail.com> References: <20200624083321.144975-1-avagin@gmail.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1044 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [avagin[at]gmail.com] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: Dmitry Safonov , linux-kernel@vger.kernel.org, Andrei Vagin , Thomas Gleixner , Vincenzo Frascino , Christian Brauner , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The order of vvar pages depends on whether a task belongs to the root time namespace or not. In the root time namespace, a task doesn't have a per-namespace page. In a non-root namespace, the VVAR page which contains the system-wide VDSO data is replaced with a namespace specific page that contains clock offsets. Whenever a task changes its namespace, the VVAR page tables are cleared and then they will be re-faulted with a corresponding layout. A task can switch its time namespace only if its ->mm isn't shared with another task. Reviewed-by: Vincenzo Frascino Reviewed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Reviewed-by: Christian Brauner --- arch/arm64/kernel/vdso.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index 7c4620451fa5..bdf492a17dff 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -124,6 +124,37 @@ static int __vdso_init(enum vdso_abi abi) return 0; } +#ifdef CONFIG_TIME_NS +/* + * The vvar mapping contains data for a specific time namespace, so when a task + * changes namespace we must unmap its vvar data for the old namespace. + * Subsequent faults will map in data for the new namespace. + * + * For more details see timens_setup_vdso_data(). + */ +int vdso_join_timens(struct task_struct *task, struct time_namespace *ns) +{ + struct mm_struct *mm = task->mm; + struct vm_area_struct *vma; + + mmap_read_lock(mm); + + for (vma = mm->mmap; vma; vma = vma->vm_next) { + unsigned long size = vma->vm_end - vma->vm_start; + + if (vma_is_special_mapping(vma, vdso_info[VDSO_ABI_AA64].dm)) + zap_page_range(vma, vma->vm_start, size); +#ifdef CONFIG_COMPAT_VDSO + if (vma_is_special_mapping(vma, vdso_info[VDSO_ABI_AA32].dm)) + zap_page_range(vma, vma->vm_start, size); +#endif + } + + mmap_read_unlock(mm); + return 0; +} +#endif + static vm_fault_t vvar_fault(const struct vm_special_mapping *sm, struct vm_area_struct *vma, struct vm_fault *vmf) { From patchwork Wed Jun 24 08:33:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11622605 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 700F51731 for ; Wed, 24 Jun 2020 08:35:34 +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 4971E2088E for ; Wed, 24 Jun 2020 08:35:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JAaXXTuo"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JZUFrDwg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4971E2088E 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+patchwork-linux-arm=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=r8LWzTfH66NuOyhsgmlGeDwjWV6rwT43zZgdL6PqvUo=; b=JAaXXTuo1s4iXF6U9GON9qiKR1 9xr62VGIuTUCh6ViRGqaFzm1EqiolZd3B1FD1VrN3p+sC4QeUu6nQYEY2WrgS/XnDObllf7KyZEJX Aw7TO5hU+19t4rDv0/reN8XF4UPXDjSAQ4XbdU5vkcZ9prFF5is3r9ImV2RnN1Ow7t4KgrYlZTSlu uXoD1ET8eTkbnw94n6Y/ghslD3hUR81KcmOqzTVFfvompMY8UosZ9JyH57ibkA/rLtT6tvqMArHl9 f8LjUXTEqdkVmzEF2dPHbG3WOE7nKJI6yUWLPCpCP3U7kQabjip/7Ok16gS3L51BOmE1xoowJviPC U2NC/qHw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jo0qh-0008Ig-UR; Wed, 24 Jun 2020 08:33:40 +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 1jo0qW-0008FT-MU for linux-arm-kernel@lists.infradead.org; Wed, 24 Jun 2020 08:33:29 +0000 Received: by mail-pl1-x642.google.com with SMTP id f2so778416plr.8 for ; Wed, 24 Jun 2020 01:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Nh8ixUlNnwBVNpYpiBlN8ZCsRVA/fYFrYc83EzRIQwk=; b=JZUFrDwgybnu8DRTQLn5l45ozI7KCDc3XpQI8l7FXZOnQFc0z7S/jvORjNWYPiSRYl m2nT8CSXYMnZOrUY5RbwzR3AjPYsGL5erUv4cf/yrMYWl5nmllRzg2vy3fwizvvLWlAu 2wR1sOkFRfleSbV83stbz0DjkY1eg8QzZzLybXlGXj3j63JE4SsyovMr/M8ZCP8CY+cz ZaDK6/faUUVVWkWBnFHpxGOisxGtlWdYxgqAvjt+LRa6sFRxD8SfzvB9rWPbDoieEzYK NnYiNjG8I5uDsVVAW2O/61z+M6wF+jKBLcuMyYhJ6dEtLmUKFk7wJb0ymBncDh34OqI+ 65bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Nh8ixUlNnwBVNpYpiBlN8ZCsRVA/fYFrYc83EzRIQwk=; b=J0203SLOa9I41QvRfDMk7YMW3SD2dNvY4+m5euqD8tL4m58I9bptxy232nmcrsnf+w F3xWuuVaRaZQxJKr9DL38kiWwJYGALLbvGALYK/WD2DzqDCqfQWIYca6//A8xUp7vdSN 1qRYsUqgVFcKzJijwvOaR0vPSO4TzSvmd2Q9CxNprGZQNw3HUeoq7nZVWxlOx8A0LZGI KoReXlMmDifQF2/+eG+IVOVhlFORXqL3xaP0TieWQojCHaxj6ZV1b4t4Sk45uJPp7HRk GpaonE6fs//554AGCWv3KAaLoQQI4dsMT9DHIbAgj71Cc+bIMatyTF8ZzyEnNvtRvuUL xdQQ== X-Gm-Message-State: AOAM530vRsXSVFoDoiq6zWBia6ErkuM7oyWAurjcrJpqSn7gBeGPd8ja Ekzzp7jc1PgdD85Vv0fGDPQ= X-Google-Smtp-Source: ABdhPJx51nMYJNA8mM0v2aNWx13UfPnannrZyY9m1UO5p5COw+WLxdKb5jR6XUnvCQKMybNXJRcelg== X-Received: by 2002:a17:90b:a0b:: with SMTP id gg11mr27283567pjb.17.1592987606768; Wed, 24 Jun 2020 01:33:26 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:9b7f:872e:a655:30fb:7373:c762]) by smtp.gmail.com with ESMTPSA id g17sm4558614pju.11.2020.06.24.01.33.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 01:33:26 -0700 (PDT) From: Andrei Vagin To: Catalin Marinas , Will Deacon , Mark Rutland Subject: [PATCH 3/6] arm64/vdso: Add time namespace page Date: Wed, 24 Jun 2020 01:33:18 -0700 Message-Id: <20200624083321.144975-4-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200624083321.144975-1-avagin@gmail.com> References: <20200624083321.144975-1-avagin@gmail.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:642 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [avagin[at]gmail.com] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: Dmitry Safonov , linux-kernel@vger.kernel.org, Andrei Vagin , Thomas Gleixner , Vincenzo Frascino , Christian Brauner , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Allocate the time namespace page among VVAR pages. Provide __arch_get_timens_vdso_data() helper for VDSO code to get the code-relative position of VVARs on that special page. 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. The time-namespace page isn't allocated on !CONFIG_TIME_NAMESPACE, but vma is the same size, which simplifies criu/vdso migration between different kernel configs. Cc: Mark Rutland Reviewed-by: Vincenzo Frascino Reviewed-by: Dmitry Safonov Signed-off-by: Andrei Vagin --- arch/arm64/include/asm/vdso.h | 2 ++ .../include/asm/vdso/compat_gettimeofday.h | 12 ++++++++++++ arch/arm64/include/asm/vdso/gettimeofday.h | 8 ++++++++ arch/arm64/kernel/vdso.c | 19 ++++++++++++++++--- arch/arm64/kernel/vdso/vdso.lds.S | 5 ++++- arch/arm64/kernel/vdso32/vdso.lds.S | 5 ++++- include/vdso/datapage.h | 1 + 7 files changed, 47 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/vdso.h b/arch/arm64/include/asm/vdso.h index 07468428fd29..f99dcb94b438 100644 --- a/arch/arm64/include/asm/vdso.h +++ b/arch/arm64/include/asm/vdso.h @@ -12,6 +12,8 @@ */ #define VDSO_LBASE 0x0 +#define __VVAR_PAGES 2 + #ifndef __ASSEMBLY__ #include diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h index b6907ae78e53..b7c549d46d18 100644 --- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h +++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h @@ -152,6 +152,18 @@ static __always_inline const struct vdso_data *__arch_get_vdso_data(void) return ret; } +#ifdef CONFIG_TIME_NS +static __always_inline const struct vdso_data *__arch_get_timens_vdso_data(void) +{ + const struct vdso_data *ret; + + /* See __arch_get_vdso_data(). */ + asm volatile("mov %0, %1" : "=r"(ret) : "r"(_timens_data)); + + return ret; +} +#endif + #endif /* !__ASSEMBLY__ */ #endif /* __ASM_VDSO_GETTIMEOFDAY_H */ diff --git a/arch/arm64/include/asm/vdso/gettimeofday.h b/arch/arm64/include/asm/vdso/gettimeofday.h index afba6ba332f8..cf39eae5eaaf 100644 --- a/arch/arm64/include/asm/vdso/gettimeofday.h +++ b/arch/arm64/include/asm/vdso/gettimeofday.h @@ -96,6 +96,14 @@ const struct vdso_data *__arch_get_vdso_data(void) return _vdso_data; } +#ifdef CONFIG_TIME_NS +static __always_inline +const struct vdso_data *__arch_get_timens_vdso_data(void) +{ + return _timens_data; +} +#endif + #endif /* !__ASSEMBLY__ */ #endif /* __ASM_VDSO_GETTIMEOFDAY_H */ diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index bdf492a17dff..18854e6c1373 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -40,6 +40,12 @@ enum vdso_abi { #endif /* CONFIG_COMPAT_VDSO */ }; +enum vvar_pages { + VVAR_DATA_PAGE_OFFSET, + VVAR_TIMENS_PAGE_OFFSET, + VVAR_NR_PAGES, +}; + struct vdso_abi_info { const char *name; const char *vdso_code_start; @@ -125,6 +131,11 @@ static int __vdso_init(enum vdso_abi abi) } #ifdef CONFIG_TIME_NS +struct vdso_data *arch_get_vdso_data(void *vvar_page) +{ + return (struct vdso_data *)(vvar_page); +} + /* * The vvar mapping contains data for a specific time namespace, so when a task * changes namespace we must unmap its vvar data for the old namespace. @@ -173,9 +184,11 @@ static int __setup_additional_pages(enum vdso_abi abi, unsigned long gp_flags = 0; void *ret; + BUILD_BUG_ON(VVAR_NR_PAGES != __VVAR_PAGES); + vdso_text_len = vdso_info[abi].vdso_pages << PAGE_SHIFT; /* Be sure to map the data page */ - vdso_mapping_len = vdso_text_len + PAGE_SIZE; + vdso_mapping_len = vdso_text_len + VVAR_NR_PAGES * PAGE_SIZE; vdso_base = get_unmapped_area(NULL, 0, vdso_mapping_len, 0, 0); if (IS_ERR_VALUE(vdso_base)) { @@ -183,7 +196,7 @@ static int __setup_additional_pages(enum vdso_abi abi, goto up_fail; } - ret = _install_special_mapping(mm, vdso_base, PAGE_SIZE, + ret = _install_special_mapping(mm, vdso_base, VVAR_NR_PAGES * PAGE_SIZE, VM_READ|VM_MAYREAD|VM_PFNMAP, vdso_info[abi].dm); if (IS_ERR(ret)) @@ -192,7 +205,7 @@ static int __setup_additional_pages(enum vdso_abi abi, if (IS_ENABLED(CONFIG_ARM64_BTI_KERNEL) && system_supports_bti()) gp_flags = VM_ARM64_BTI; - vdso_base += PAGE_SIZE; + vdso_base += VVAR_NR_PAGES * PAGE_SIZE; mm->context.vdso = (void *)vdso_base; ret = _install_special_mapping(mm, vdso_base, vdso_text_len, VM_READ|VM_EXEC|gp_flags| diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S index 7ad2d3a0cd48..d808ad31e01f 100644 --- a/arch/arm64/kernel/vdso/vdso.lds.S +++ b/arch/arm64/kernel/vdso/vdso.lds.S @@ -17,7 +17,10 @@ OUTPUT_ARCH(aarch64) SECTIONS { - PROVIDE(_vdso_data = . - PAGE_SIZE); + PROVIDE(_vdso_data = . - __VVAR_PAGES * PAGE_SIZE); +#ifdef CONFIG_TIME_NS + PROVIDE(_timens_data = _vdso_data + PAGE_SIZE); +#endif . = VDSO_LBASE + SIZEOF_HEADERS; .hash : { *(.hash) } :text diff --git a/arch/arm64/kernel/vdso32/vdso.lds.S b/arch/arm64/kernel/vdso32/vdso.lds.S index a3944927eaeb..06cc60a9630f 100644 --- a/arch/arm64/kernel/vdso32/vdso.lds.S +++ b/arch/arm64/kernel/vdso32/vdso.lds.S @@ -17,7 +17,10 @@ OUTPUT_ARCH(arm) SECTIONS { - PROVIDE_HIDDEN(_vdso_data = . - PAGE_SIZE); + PROVIDE_HIDDEN(_vdso_data = . - __VVAR_PAGES * PAGE_SIZE); +#ifdef CONFIG_TIME_NS + PROVIDE_HIDDEN(_timens_data = _vdso_data + PAGE_SIZE); +#endif . = VDSO_LBASE + SIZEOF_HEADERS; .hash : { *(.hash) } :text diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h index 7955c56d6b3c..ee810cae4e1e 100644 --- a/include/vdso/datapage.h +++ b/include/vdso/datapage.h @@ -109,6 +109,7 @@ struct vdso_data { * relocation, and this is what we need. */ extern struct vdso_data _vdso_data[CS_BASES] __attribute__((visibility("hidden"))); +extern struct vdso_data _timens_data[CS_BASES] __attribute__((visibility("hidden"))); /* * The generic vDSO implementation requires that gettimeofday.h From patchwork Wed Jun 24 08:33:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11622597 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F2D88913 for ; Wed, 24 Jun 2020 08:35:29 +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 BC04E2088E for ; Wed, 24 Jun 2020 08:35:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="spXF7T9i"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LuLWGAHb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC04E2088E 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+patchwork-linux-arm=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bQyjZcx5gFV1vXzfOVa1wSJoO4lC4jUFmCYZ5CMKRRQ=; b=spXF7T9iDh92rmGgJBf9caeDjD VHJ/7h8FSE+2/692X/FdAizcS8DWuprcwwSEuYHXSp+8I9GCMyU9z+zurxO9GD/QzwUNMeyNnFytU rtIfz9Y9W8SYAxTAdd5Yo4GzcTmKNJhJsMy2XN6eFr7jSjK5Tp9RzKcqg0wXs3rnCtG3nL1wdsTiR F+56TkFZAMdtXBD6MA7VjSpkEucdBw+wyW1MiPmKfyn7Gc755Qt4HvRJQX4rpqonuu5r284BbaC5k sU2TgYf5V42xgE3eLoPgetiquYEx+0ll33ftfT75MDJpcxolbJyLj/0RrkJybuvnW6MSivpuDu+eJ HB5OKcjA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jo0ql-0008K3-0l; Wed, 24 Jun 2020 08:33:43 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jo0qY-0008Fd-0d for linux-arm-kernel@lists.infradead.org; Wed, 24 Jun 2020 08:33:31 +0000 Received: by mail-pf1-x441.google.com with SMTP id d66so848093pfd.6 for ; Wed, 24 Jun 2020 01:33:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/8shzvkLZsRhF8EZiKwRb8IF1NpqovkVn3jBNb1PgYM=; b=LuLWGAHbvAtYucC3BWurHeM1ccLgXcqjPYvzH4nrLZhaqZNRwbLU+BAqXwo9nAZakQ OlnmNWE/wAi55BiWJJeFq8T3XTxJ0V1JMtYMEyV4Mhdyq8MOBGWPRdOw8JVg5Zs+vopT GVUnEjOm7YQHarNfqJrqIIishg88JZlRTVyuxyoifLWAdu8Gi3KUSIo2upbLSqkaBcFb v1h4TNUpp1IZh6RG2r9dPj3zrEJIIr+p5yO3UAE5J0bRVcVQbBQ4YtotNxhoIbqRIZy3 bCODgJ360ezsnoQtu8zOABWR2lffiYDpMA8G+CRVGt8xYV+9X+tBQ253tAB8EaYvU6vY PiuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/8shzvkLZsRhF8EZiKwRb8IF1NpqovkVn3jBNb1PgYM=; b=DzFr5W6lcW2IHxe7twMpCvAW1ceoHeXroRvH75u16l7o3QnU0ZtQFtRB9i9AM52NzA 6jLxyzfYskb7446/RuGm7OwM9baEQDHGqxYcTpRn/blXiXSNfyZ0CUhMz3fQ8iYRSwvj tOJfR7IZEnnr2GD3V1XRo6gv1QbDgL1AfaNpAoLwqpVJEF/HgAH9PfsViiHjmYrJagz/ Y9Azdld6FtdbLwu/YIfTtBIPzXP/abx/gCL65z2YmptggHs7MTizahDPpazeqzy1IPtk G6RDCHFm0LKLfE2VUJC7sLPp6tBywkbAj6yXQHvJayxPTsBu0mzftvtf+RWahlKSb338 waQQ== X-Gm-Message-State: AOAM530ce/8/wpmLelJEDvlt/1bjwarc0MQweUrPDYnLl0QqIWfCg8cU v8Xv9eHnR4uonhEjo+vgp8kFWeBZjyQ= X-Google-Smtp-Source: ABdhPJzYJoJE7U5Ie3r319LMCTJWxMmY7lcknEIGWp2J7pdOc0e/Zdap0hYIF7xt/sfeYsFxWwNAxg== X-Received: by 2002:a05:6a00:14d4:: with SMTP id w20mr29268187pfu.279.1592987607681; Wed, 24 Jun 2020 01:33:27 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:9b7f:872e:a655:30fb:7373:c762]) by smtp.gmail.com with ESMTPSA id g17sm4558614pju.11.2020.06.24.01.33.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 01:33:27 -0700 (PDT) From: Andrei Vagin To: Catalin Marinas , Will Deacon , Mark Rutland Subject: [PATCH 4/6] arm64/vdso: Handle faults on timens page Date: Wed, 24 Jun 2020 01:33:19 -0700 Message-Id: <20200624083321.144975-5-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200624083321.144975-1-avagin@gmail.com> References: <20200624083321.144975-1-avagin@gmail.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:441 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [avagin[at]gmail.com] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: Dmitry Safonov , linux-kernel@vger.kernel.org, Andrei Vagin , Thomas Gleixner , Vincenzo Frascino , Christian Brauner , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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. Reviewed-by: Vincenzo Frascino Reviewed-by: Dmitry Safonov Signed-off-by: Andrei Vagin --- arch/arm64/kernel/vdso.c | 57 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index 18854e6c1373..be9ca8c46cff 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -164,15 +165,63 @@ int vdso_join_timens(struct task_struct *task, struct time_namespace *ns) mmap_read_unlock(mm); return 0; } + +static struct page *find_timens_vvar_page(struct vm_area_struct *vma) +{ + if (likely(vma->vm_mm == current->mm)) + return current->nsproxy->time_ns->vvar_page; + + /* + * VM_PFNMAP | VM_IO protect .fault() handler from being called + * through interfaces like /proc/$pid/mem or + * process_vm_{readv,writev}() as long as there's no .access() + * in special_mapping_vmops(). + * For more details check_vma_flags() and __access_remote_vm() + */ + + WARN(1, "vvar_page accessed remotely"); + + return NULL; +} +#else +static inline struct page *find_timens_vvar_page(struct vm_area_struct *vma) +{ + return NULL; +} #endif static vm_fault_t vvar_fault(const struct vm_special_mapping *sm, struct vm_area_struct *vma, struct vm_fault *vmf) { - if (vmf->pgoff == 0) - return vmf_insert_pfn(vma, vmf->address, - sym_to_pfn(vdso_data)); - return VM_FAULT_SIGBUS; + struct page *timens_page = find_timens_vvar_page(vma); + unsigned long pfn; + + switch (vmf->pgoff) { + case VVAR_DATA_PAGE_OFFSET: + if (timens_page) + pfn = page_to_pfn(timens_page); + else + pfn = sym_to_pfn(vdso_data); + break; +#ifdef CONFIG_TIME_NS + case VVAR_TIMENS_PAGE_OFFSET: + /* + * If a task belongs to a time namespace then a namespace + * specific VVAR is mapped with the VVAR_DATA_PAGE_OFFSET and + * the real VVAR page is mapped with the VVAR_TIMENS_PAGE_OFFSET + * offset. + * See also the comment near timens_setup_vdso_data(). + */ + if (!timens_page) + return VM_FAULT_SIGBUS; + pfn = sym_to_pfn(vdso_data); + break; +#endif /* CONFIG_TIME_NS */ + default: + return VM_FAULT_SIGBUS; + } + + return vmf_insert_pfn(vma, vmf->address, pfn); } static int __setup_additional_pages(enum vdso_abi abi, From patchwork Wed Jun 24 08:33:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11622593 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C009913 for ; Wed, 24 Jun 2020 08:35:25 +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 EC3BE2088E for ; Wed, 24 Jun 2020 08:35:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iGUU4W/h"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="f0I2N5m0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC3BE2088E 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+patchwork-linux-arm=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OiSvEtT6qklnsCHMRNFfOjJOFZoRXOzvHQSMXg07QF0=; b=iGUU4W/htS5DsSmhRWUurugGFK 96Frj52m+VDglNdAWRiMrgT+BJFmX+DbKtxWDC4mK4IhZiUdnql+5WvoMJEJ6YLgjAj6fCrcsyL4y v0s9bOt8hTvYrypO5aQQHoLntMFxby8qfUweq8IJXTxwq0xGzSQb9KYtovLL5OiE4o11MNhLDG5VP I/WblnVwRwZEWHhbniak6sgnQydYN7YesD1vjZDu1XAdRiP8Ut2TXU/i/AT3Fdy7VL41LY2AoiH87 WzckgGvvaL7WunXckWJqj4Xcdjr1pn6hBCFWvXJdiYWvjGU/k4+Wgdz3Ay91pg0Erql1ieVA9b/Cu WN/oOUYw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jo0qn-0008Kn-Cf; Wed, 24 Jun 2020 08:33:45 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jo0qY-0008Fy-Uj for linux-arm-kernel@lists.infradead.org; Wed, 24 Jun 2020 08:33:31 +0000 Received: by mail-pj1-x1041.google.com with SMTP id u8so890502pje.4 for ; Wed, 24 Jun 2020 01:33:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+phrT2AIdF4lRnMSVXuWInx9nAkEBMgCLH5q3WFhgHA=; b=f0I2N5m0fzWQAgaAToovJ+mgoHHV7sYYaDPhna45YTff7YHh0Z+1WKoPHFzeCDQ1uf eBz5MFamNgglzinB3hqAsBNG1jzQ/4rOcvpqgYHf9aMtvePAoWLBJ/PGHVh67cfqUDng WzLJVQs7gQS+sPPeDBKkHbqBAwu6AYEMSP5BMTS5I7YzfK2JREj0qLqfWOT2ax/UxLf8 jFDzntIjEjnzqf4tq9nLYdezKdRkmuWinYkNilFKVBRf+/F7OH8vrtiy9Gw7TkoB8C4z L8J+EAIpZy4EvhwSQt34sSakOsD4GC2jtggLvm6Gc0nlROno9P7xygb1qqoVJMS+L/2+ 9aGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+phrT2AIdF4lRnMSVXuWInx9nAkEBMgCLH5q3WFhgHA=; b=SRWPAnNdYLF5QDnJ5XwfZMjkejnDuo6m+2A7L0K5fF2A2A9EsLy2Zs1ZfQrTa9WF6K KidC9co0gzceaXunEWwZoXJrmG186fDilLV7WVr0Sw4HfEr6yDVrh9hUkmEkV/yKenHn hgEOdS0PzYLz66dqdMbabL2tBJVkVDuflvEbxK/b2PFhQX1CuQi6PKMDlik92rv3dZFK 3U+GOARtvkQzxRZHWF9cWigG+Dunp22K+EPNIRy0TAWH3QYua1I1UX+c7YtJ743vHbXt 7TLT86gvib+58jjh2E5PCRghX/+qh2LZnSCsbmpVhpYXaSmrdm9Ad1oIWUDhkwz29sDu nzfg== X-Gm-Message-State: AOAM532layDdUXx1KpN3N3FxZRVqyERBNhB0VjPsthWA0F+80aSf2Rvh d1zLMLthvLlIAnJ5NjrEz4apIKXCzJY= X-Google-Smtp-Source: ABdhPJxEt2RHWxak+h/6okxR79SS4HgDc3N0nuv8EGttbDypYw9/wQ+ih8+B+khvyDujbln0caVp5g== X-Received: by 2002:a17:902:d896:: with SMTP id b22mr21427195plz.87.1592987608751; Wed, 24 Jun 2020 01:33:28 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:9b7f:872e:a655:30fb:7373:c762]) by smtp.gmail.com with ESMTPSA id g17sm4558614pju.11.2020.06.24.01.33.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 01:33:28 -0700 (PDT) From: Andrei Vagin To: Catalin Marinas , Will Deacon , Mark Rutland Subject: [PATCH 5/6] arm64/vdso: Restrict splitting VVAR VMA Date: Wed, 24 Jun 2020 01:33:20 -0700 Message-Id: <20200624083321.144975-6-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200624083321.144975-1-avagin@gmail.com> References: <20200624083321.144975-1-avagin@gmail.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1041 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [avagin[at]gmail.com] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: Dmitry Safonov , linux-kernel@vger.kernel.org, Andrei Vagin , Thomas Gleixner , Vincenzo Frascino , Christian Brauner , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Forbid splitting VVAR VMA resulting in a stricter ABI and reducing the amount of corner-cases to consider while working further on VDSO time namespace support. As the offset from timens to VVAR page is computed compile-time, the pages in VVAR should stay together and not being partically mremap()'ed. Reviewed-by: Vincenzo Frascino Reviewed-by: Dmitry Safonov Signed-off-by: Andrei Vagin --- arch/arm64/kernel/vdso.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index be9ca8c46cff..8be6bd6625db 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -224,6 +224,17 @@ static vm_fault_t vvar_fault(const struct vm_special_mapping *sm, return vmf_insert_pfn(vma, vmf->address, pfn); } +static int vvar_mremap(const struct vm_special_mapping *sm, + struct vm_area_struct *new_vma) +{ + unsigned long new_size = new_vma->vm_end - new_vma->vm_start; + + if (new_size != VVAR_NR_PAGES * PAGE_SIZE) + return -EINVAL; + + return 0; +} + static int __setup_additional_pages(enum vdso_abi abi, struct mm_struct *mm, struct linux_binprm *bprm, @@ -306,6 +317,7 @@ static struct vm_special_mapping aarch32_vdso_maps[] = { [AA32_MAP_VVAR] = { .name = "[vvar]", .fault = vvar_fault, + .mremap = vvar_mremap, }, [AA32_MAP_VDSO] = { .name = "[vdso]", @@ -474,6 +486,7 @@ static struct vm_special_mapping aarch64_vdso_maps[] __ro_after_init = { [AA64_MAP_VVAR] = { .name = "[vvar]", .fault = vvar_fault, + .mremap = vvar_mremap, }, [AA64_MAP_VDSO] = { .name = "[vdso]", From patchwork Wed Jun 24 08:33:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11622607 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 941C9618 for ; Wed, 24 Jun 2020 08:35:40 +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 6D7EA20899 for ; Wed, 24 Jun 2020 08:35:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="psphVbBR"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fwO+qzEy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D7EA20899 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+patchwork-linux-arm=patchwork.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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dlut1ir3B6h/lpK3hshPHsMzmEiSG8Xahj67NGoIDjE=; b=psphVbBRAH9vH9P2P3Huzr86Jd Yd6NawabpoupC55WoVi8RsxFAHUvXtZdjoGtRKA4aKr+VyabQJULAAPmbJh7x72vjiTRpDqzrI0u4 ZrEuSUjIYHwiB8+ApnH8m6Q2r7uYyvrLEP95cEni7U5i9xeijD6nOqX1iH7nc0PZSOTS6aWwk/Fd7 lt/dL5Qxobw6ojI79y/xa69Qw9/xKVMtDcUmjPEkRyPOZ5RJFkcKgF7OwEPHIKMmbZsoxqVkC/o2m hIIdryVyoVVe4XknIWn83440ts8F0S26rWgynavDMHneK18vAhl5Jnq+s2cfJXoV/p3tmCo+KuvoQ xD7GLVOA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jo0qp-0008Lz-Px; Wed, 24 Jun 2020 08:33:47 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jo0qZ-0008GC-L3 for linux-arm-kernel@lists.infradead.org; Wed, 24 Jun 2020 08:33:32 +0000 Received: by mail-pf1-x441.google.com with SMTP id 207so666847pfu.3 for ; Wed, 24 Jun 2020 01:33:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K6FaA8bFNUPkcRq6W3DV/IXdAKXv7nzg8Ufaeu178aM=; b=fwO+qzEyFZBMfHQ0gi2/vrxvXbXGY7tvAd7D/mKV64lasUBfBzBgTbVz/Vg0cA8oio fb9o48qdd10gTTEnlTheJx7cIA7iuM8Jgru4wR3WyLpDwocyd/1kx8cmpaSOF/HBSMhL cFB8H/ZzbakDCKBaiiAnvBurn9xHXuZUWffT5zVFRhEMOWQdgB3enMNdEZZNGePPjIbZ ddp0Ri4+r3S51K7Fz1ngVtVotiIaSO+46blkS7i5McpZXyhd7Q5IsNhQmUfZp9+qz3Be ovFmV+3up4jCJYxmI4kK/zB/XQDwtgs/FD5+S//+ONzR1VQQRmlWdMrkgqyaDyH1Jnor Rw8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=K6FaA8bFNUPkcRq6W3DV/IXdAKXv7nzg8Ufaeu178aM=; b=nvODgJ82xT4IDkDt+IK+YEqYa4sIJyFmrjC0HEWLXNWXLA2RJ7/v5APq868fzuZ6il 6MesgSShMSZ7KEnamhpuz2IUe+mQC3kpnVc1tXlWIj5oLA/RRvv0SDkEiRIxwjh61Ppk Aae8y05tXxA0nMKrhXIKWSJU44MiNHipl+Qecj4uwXasXVR0+89yYsUATZc/UIJb9Y6Z fEfVRyrKI6CU0jSTYGR55q0OmRCPCzqIBNkZGYLfl7nMe4k3W6NV0jS+QltEC+OzrJi6 VZBbWiAsF/ieofnO1gcsqbFpVptvml2VzdyGJ+CNKxzgF9x4iPTSCkjNF3LOBA7qo5bp XBBQ== X-Gm-Message-State: AOAM531rc0p9LyyhYeZNyluhL5hSFPk0tCHpTYJjoH/3GWLfP3/bW0po 4+UO2P1Ah6B4PWTlgJ7/w8CH96XSuWQ= X-Google-Smtp-Source: ABdhPJzLr88wWvbvRLXk7bWaQyyZvrof38iC5EuX3OHuXEHnZeiwpHbKEMtKRe7iWf5xgZOiAPSrvA== X-Received: by 2002:a63:a119:: with SMTP id b25mr20280014pgf.10.1592987609797; Wed, 24 Jun 2020 01:33:29 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:9b7f:872e:a655:30fb:7373:c762]) by smtp.gmail.com with ESMTPSA id g17sm4558614pju.11.2020.06.24.01.33.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 01:33:29 -0700 (PDT) From: Andrei Vagin To: Catalin Marinas , Will Deacon , Mark Rutland Subject: [PATCH 6/6] arm64: enable time namespace support Date: Wed, 24 Jun 2020 01:33:21 -0700 Message-Id: <20200624083321.144975-7-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200624083321.144975-1-avagin@gmail.com> References: <20200624083321.144975-1-avagin@gmail.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:441 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [avagin[at]gmail.com] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: Dmitry Safonov , linux-kernel@vger.kernel.org, Andrei Vagin , Thomas Gleixner , Vincenzo Frascino , Christian Brauner , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org CONFIG_TIME_NS is dependes on GENERIC_VDSO_TIME_NS. Reviewed-by: Vincenzo Frascino Reviewed-by: Dmitry Safonov Signed-off-by: Andrei Vagin --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index a4a094bedcb2..38d3180adf78 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -118,6 +118,7 @@ config ARM64 select GENERIC_STRNLEN_USER select GENERIC_TIME_VSYSCALL select GENERIC_GETTIMEOFDAY + select GENERIC_VDSO_TIME_NS select HANDLE_DOMAIN_IRQ select HARDIRQS_SW_RESEND select HAVE_PCI