From patchwork Tue Feb 25 07:37:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11402687 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 7AE8114B4 for ; Tue, 25 Feb 2020 07:38:04 +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 581CB24650 for ; Tue, 25 Feb 2020 07:38:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="a04AOFTr"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="K+Ml/upn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 581CB24650 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=bombadil.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=tK6QB2+Mq1ZiZq4UefgJfaDQgh0NS2lQ0NCjb9KTaT8=; b=a04AOFTrOKEudZHQbDYMaLGRt1 CTnY9xJPmz6J/vWqcdP2SwUGlxvjmzLjm+fS01qtKaR8hg52tNBXuHZQZALIayMj5CCDiCLC4PBWF ohGdOtV7HGKwZDus3vUYwPYue0tj4pDOrANmvpXQdYzzYEyjgglmsNSUpSY1/Ud5BFgVRjETpVqMH wuhV5tF4dpR8f6Jfjyp8EuBW39eHeTl25HK2BxMLl6fFMHC9iuncClAyOAuUfriu7SP9jImg6rgH5 efceuAEFRgm0nz8w9CFrlDpwDs8IdvIr23lX+zEP/r+RteIJzJabd0EmHi1glckpCZPHbpUvOZJVM UqoKuI6Q==; 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 1j6Un3-0000M3-Ng; Tue, 25 Feb 2020 07:38:01 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6Umj-00006G-NV for linux-arm-kernel@lists.infradead.org; Tue, 25 Feb 2020 07:37:43 +0000 Received: by mail-pl1-x643.google.com with SMTP id y8so5125287pll.13 for ; Mon, 24 Feb 2020 23:37:41 -0800 (PST) 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=fTm63vWBfzb1BdQ6B/CmE6SJCijkNB09UHlH94Y5uzA=; b=K+Ml/upn0oxvTo+3gRr3MfXbq8amghsNv5GktyPa1Bz9dIl4nWMHbaBhQYNQ6aszrz zm8G7MUyUXlzA1GvJ/5600wGmPeJXbjNXy/8mpDOuGJugnA7guDIbK8h/76jQQDmuUI8 i6hbT8QosV3VkssGwCBeHYXolDg6ws+D9G7fX2VcSSOa4ITxIhhs5mxnjXCiD3HrjS4s mzGmmR0k0trfs8P3tZhMTBXB2o/Z+A8BC1jt/KfCY8ATrXdkQaNTPAcxtY1ZkGmaUtKY mFqk7ByJPLfAelkxnmvMvKy6IUbUMWgCf0+YqNGTdve3w12izGIve8+fAIUrtppB8Xec audQ== 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=fTm63vWBfzb1BdQ6B/CmE6SJCijkNB09UHlH94Y5uzA=; b=LogcajBLYvtdLjPVRjdFz/8MJ9aacDkE85NAjuUNTNenoHcb4IR2k8DlgsO+Q/jIOR dJskh897FSXZphHIsXIo8dhjEDs5MF6gde7gZUqA5f9wBKgoHUjPBup0UHxDrrlT/v8G WkHkLLTAEi8+a6Dag9kJQy2MPLDZdrZFYr/rYBHMwEkYeEH1zaUVZaFIawYgxNbRrZcw WVXskjLs42oEGTEOfa/Q5fWhZVfA5lyc667Rm8Bf8MlgMI3WONq0fHQMyy2zrsl/Z69R S3Y1BtfeezXrR12TskhaaCdCSkVXMGJsDPGqfPQtRoHA9Jc9fbDgqw7udXIJx0mq2N88 PeGQ== X-Gm-Message-State: APjAAAVcYZ4oLAWM1mS4HOfYm4m+2CIR5FH7UZpHiyi30MNJYVehFB00 s7q4ZtVbnYfjFBgshzQXsyU= X-Google-Smtp-Source: APXvYqxqGvlZHIvXAmalhDezZDCnSGjb/EEDWYMB9RmGsUbBfPun/pC4HedAaHvGDMV4hAB9Smnhhw== X-Received: by 2002:a17:90a:a616:: with SMTP id c22mr3595342pjq.47.1582616260726; Mon, 24 Feb 2020 23:37:40 -0800 (PST) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id m128sm15979390pfm.183.2020.02.24.23.37.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 23:37:40 -0800 (PST) From: Andrei Vagin To: Vincenzo Frascino Subject: [PATCH v2 1/6] arm64/vdso: use the fault callback to map vvar pages Date: Mon, 24 Feb 2020 23:37:26 -0800 Message-Id: <20200225073731.465270-2-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200225073731.465270-1-avagin@gmail.com> References: <20200225073731.465270-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200224_233741_768796_5C8D057E X-CRM114-Status: GOOD ( 14.40 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.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:643 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_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 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 , Andrei Vagin , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dmitry Safonov MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This is required to support time namespaces where a time namespace data page is different for each namespace. Signed-off-by: Andrei Vagin Reviewed-by: Vincenzo Frascino --- arch/arm64/kernel/vdso.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index 354b11e27c07..290c36d74e03 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -114,28 +114,32 @@ static int __vdso_init(enum arch_vdso_type arch_index) PAGE_SHIFT; /* Allocate the vDSO pagelist, plus a page for the data. */ - vdso_pagelist = kcalloc(vdso_lookup[arch_index].vdso_pages + 1, + vdso_pagelist = kcalloc(vdso_lookup[arch_index].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_lookup[arch_index].vdso_code_start); for (i = 0; i < vdso_lookup[arch_index].vdso_pages; i++) - vdso_pagelist[i + 1] = pfn_to_page(pfn + i); + vdso_pagelist[i] = pfn_to_page(pfn + i); - vdso_lookup[arch_index].dm->pages = &vdso_pagelist[0]; - vdso_lookup[arch_index].cm->pages = &vdso_pagelist[1]; + vdso_lookup[arch_index].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 arch_vdso_type arch_index, struct mm_struct *mm, struct linux_binprm *bprm, @@ -155,7 +159,7 @@ static int __setup_additional_pages(enum arch_vdso_type arch_index, } ret = _install_special_mapping(mm, vdso_base, PAGE_SIZE, - VM_READ|VM_MAYREAD, + VM_READ|VM_MAYREAD|VM_PFNMAP, vdso_lookup[arch_index].dm); if (IS_ERR(ret)) goto up_fail; @@ -215,6 +219,7 @@ static struct vm_special_mapping aarch32_vdso_spec[C_PAGES] = { #ifdef CONFIG_COMPAT_VDSO { .name = "[vvar]", + .fault = vvar_fault, }, { .name = "[vdso]", @@ -396,6 +401,7 @@ static int vdso_mremap(const struct vm_special_mapping *sm, static struct vm_special_mapping vdso_spec[A_PAGES] __ro_after_init = { { .name = "[vvar]", + .fault = vvar_fault, }, { .name = "[vdso]", From patchwork Tue Feb 25 07:37:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11402689 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 7754C14D5 for ; Tue, 25 Feb 2020 07:38:28 +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 54A8D21927 for ; Tue, 25 Feb 2020 07:38:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uw8DVzoE"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hF+L0SkX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 54A8D21927 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=bombadil.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=VqI3VKgwhJmTrSeZOXczJtjdrtCp0BuL7SixvDL+ooU=; b=uw8DVzoE6tpZNsg5qhXUchyBZi D/AeROjhyMm8Y3d3osrqfTYR+50addIJAPP+aoAziXDugcMcemImtGWKmdAuDx9iKKA/Km4DfpsKT euWE5y5JGAF963OYRTmuwemFymq0e5HOlAXXSCocFb/tlcNcbM/ufubbaJLKY9inGd1qNyYC9gana MFP5YERmUoJ50qn1NGMBD77jXplyCFZPXRQCo8slm3j2eLWWt2Q+5ZSytOt6wTlscLra2a880VTXz O3R1IweiDx9voj57dl2OgHKbrEBJ9+zLxLqR59jzc/QpnOJ9fV9XS1n5AI/JDsRxBT6YP3cuWEjFC 1gUerMrA==; 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 1j6UnT-0000gf-Ie; Tue, 25 Feb 2020 07:38:27 +0000 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6Uml-000077-20 for linux-arm-kernel@lists.infradead.org; Tue, 25 Feb 2020 07:37:44 +0000 Received: by mail-pj1-x1042.google.com with SMTP id f2so775385pjq.1 for ; Mon, 24 Feb 2020 23:37:42 -0800 (PST) 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=AkyLcT/M41H8pNXfB2E+BzqT+C+wAkbHPxgbVN+0zTc=; b=hF+L0SkX3QFj58j9vqoEJ6IjIYswDgAEBWiesoy+sopgxymcU+R/Q2leded9N+UiPA yLatd1d8S25usCpHooLBktyUToJ6eO0zSHRZzBlsSzsunV4XlcRcGT0cIKFD3nSRfKRA hipJWwUyXC+TViT9VcLD5RfONN7yAKMnvq67oknJIIqp85Vjf9rRN00+pt2KGDF2MbX3 4c2AS/WkRmpUJLcqnV5MFTtxJbVPA1SM/u1fgEFN8ngV5GbrP8Ta+3zhKlv449eH4MO6 3Ri631Htals7fy2Oh4T/voA6GGp3QfuJ+uNLmwjxjsuMRgeetUxhrk4ctpQJvmQJOSOo 0cLQ== 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=AkyLcT/M41H8pNXfB2E+BzqT+C+wAkbHPxgbVN+0zTc=; b=Sef+ml6xPT6+TMIiQfstnRSxeg8cnxNc5nDLwoIx0emKUKiAsKq71tMIRStSzd01vD SrkuonxIh1x62OK0j2DjXyBbPzvQrdGonl0rQ6FYl/u7BOoYyCVqFS6bJeq3lN9bOtAr 5/mCLL3ZevwNiPUXNnlK9lR2Jm8sYS97qBDYknJsrh8iqh+wwFW1mw5Lok13KI1+9IvP XdWUDjv/ymz87S31t5ItQqHy0qq0c250SmVVL9TRHC8nMIY8kMZyQiN0YP+dp9V3mKYV Y5hVJjD4C+s2sqiiJ86bP8GaPCAG2+bPkUALdjo7kH2Q6KYswC/fGVmJe2JKWHdfW4Jl bElg== X-Gm-Message-State: APjAAAWqqFVzcrl+/yg+ucp9WyOUrm6Ffn7r+VuKWZe2lbLYYvryLIBn TOTXRTbtOTOflEZI2Rcv99M= X-Google-Smtp-Source: APXvYqwnmes/Pi/02QPjNqcbuZoJp4CZnWoJVVApGWQqfgKMt8MSEPCZzU8aeC8A78O3AeoOmzvmhQ== X-Received: by 2002:a17:902:9308:: with SMTP id bc8mr55796788plb.268.1582616262049; Mon, 24 Feb 2020 23:37:42 -0800 (PST) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id m128sm15979390pfm.183.2020.02.24.23.37.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 23:37:41 -0800 (PST) From: Andrei Vagin To: Vincenzo Frascino Subject: [PATCH v2 2/6] arm64/vdso: Zap vvar pages when switching to a time namespace Date: Mon, 24 Feb 2020 23:37:27 -0800 Message-Id: <20200225073731.465270-3-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200225073731.465270-1-avagin@gmail.com> References: <20200225073731.465270-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200224_233743_103018_0C3C2FF4 X-CRM114-Status: GOOD ( 12.91 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.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.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 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 , Andrei Vagin , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dmitry Safonov MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The VVAR page layout depends on whether a task belongs to the root or non-root time namespace. Whenever a task changes its namespace, the VVAR page tables are cleared and then they will be re-faulted with a corresponding layout. Signed-off-by: Andrei Vagin Reviewed-by: Vincenzo Frascino --- arch/arm64/kernel/vdso.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index 290c36d74e03..6ac9cdeac5be 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -131,6 +131,38 @@ static int __vdso_init(enum arch_vdso_type arch_index) return 0; } +#ifdef CONFIG_TIME_NS +/* + * The vvar page layout depends on whether a task belongs to the root or + * non-root time namespace. Whenever a task changes its namespace, the VVAR + * page tables are cleared and then they will re-faulted with a + * corresponding layout. + * See also the comment near timens_setup_vdso_data() for details. + */ +int vdso_join_timens(struct task_struct *task, struct time_namespace *ns) +{ + struct mm_struct *mm = task->mm; + struct vm_area_struct *vma; + + if (down_write_killable(&mm->mmap_sem)) + return -EINTR; + + 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_lookup[ARM64_VDSO].dm)) + zap_page_range(vma, vma->vm_start, size); +#ifdef CONFIG_COMPAT_VDSO + if (vma_is_special_mapping(vma, vdso_lookup[ARM64_VDSO32].dm)) + zap_page_range(vma, vma->vm_start, size); +#endif + } + + up_write(&mm->mmap_sem); + 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 Tue Feb 25 07:37:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11402691 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 2C70A14B4 for ; Tue, 25 Feb 2020 07:38:45 +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 0A10D21927 for ; Tue, 25 Feb 2020 07:38:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mHHfyMoe"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="b7KUzQsA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0A10D21927 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=bombadil.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=pwXflrQgC1QH37qADJp4mWspykGifRvEIRvyqVkIses=; b=mHHfyMoef9hMxX+PnarfklHCkJ xmaXAGQGT2qiyEBJUpwk/uxbT+uWU9BQfDhfBm5e4ABnojEQymFZng781KTafvM8sB9TyyEwBliHE lmealev8OCTZ+zDkPzQZ59vPyDxDvO88hFoNrrBoLHlju3lla/jwFybPa2wH7t+1yfNqgIwnVnpW1 8gjCazWcRI6JLp1Ep9jtu+AiET1i/8Gyp5JUyaKbAFNvNnX3NqlsUvPIsWmLdTVyS1l5ESykGRVC8 iBNkMbsBb1njnIjC+j2wXLcx3mCDkkkopxaE4yCMjCgY0qdkYt102H7kdBScgkv0++rNKEs/bF3mh HqbDS6cw==; 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 1j6Uni-0000uz-8W; Tue, 25 Feb 2020 07:38:42 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6Umm-00007r-Dw for linux-arm-kernel@lists.infradead.org; Tue, 25 Feb 2020 07:37:46 +0000 Received: by mail-pl1-x643.google.com with SMTP id q4so1008504pls.4 for ; Mon, 24 Feb 2020 23:37:44 -0800 (PST) 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=kNwttvmFKoYVBH0KVogMBrXT//L/sy9v0dzLcDssBsw=; b=b7KUzQsAoWHyfp9zwaZIuUaeAkRrU5/nwfll3d2KlLtHX+VODsX5PmwXRxhguDwywI bbR20zCWD5JOGbTKKx/+QgE8DzKm6jrCiYK9glzgrD4wr6pl66d5nIAgzTaWRKVulUEb Hmhq1/M+KNLkASmPoAmVbCYZO3lw1MSCCSwEkmxWrTBChBJQZJMi13SKVmRWM0mSjZzA GWtU0LpsYsQiVd2MV+OxeJctj6CqXaTs1kputEflsrPf2BsxkxqJL6Se7miXMT0e91tN 8eoSOV7r/+ee+O1XrqG7IIbemkxpG6VqnF6YPG6Tp3RceCWgl5zuou+j7MO4LJxnZX3b H7lw== 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=kNwttvmFKoYVBH0KVogMBrXT//L/sy9v0dzLcDssBsw=; b=ohwISlHvHiE2fRnW3I+zLz4wh7G6y6F6L2+1ZL4aXnC/YXyJoQK8LzihKLJLUUxWeN 5GuVsqJnPo281xPXGf5iQoLJ0xAkA38lzxC5PjyRxCp7RA5UEPJu+vOEAOwkO+kbSyOn hvo259VVCW+jZ17vYkafEMET/8ZwWoB8jO3E3M6fy0rbsvPD4fEQse9jZFq+oeac9Gw/ OA5PKsU29sAZnBsVEA54TQw9Zfr1z8fiTfCsHa6Hu3PxKTVJzG8eJRntDFLJcQaB18VT yo9qMRqYe6MOTQRdrDLhYIK5bfXotIHTIX7BIZF4QcvumLeYX/oq5C6/SpibgOWIm4Za LlLw== X-Gm-Message-State: APjAAAX+aA/mB6qNyadDc4TiTmJUEflxK2yCBbmFgSQJFLspnUbFDWeu ZkpVT3vJGNjWzjamtfC30ZQ3fZg7 X-Google-Smtp-Source: APXvYqyi1PJgnKEARP1Ltype9QnDI3KSzgGnb7rFcRO9Tex4jDvYFLH3xS1tRJuHl2dDv13U5h51Vw== X-Received: by 2002:a17:90a:c390:: with SMTP id h16mr3675614pjt.131.1582616263620; Mon, 24 Feb 2020 23:37:43 -0800 (PST) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id m128sm15979390pfm.183.2020.02.24.23.37.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 23:37:42 -0800 (PST) From: Andrei Vagin To: Vincenzo Frascino Subject: [PATCH v2 3/6] arm64/vdso: Add time napespace page Date: Mon, 24 Feb 2020 23:37:28 -0800 Message-Id: <20200225073731.465270-4-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200225073731.465270-1-avagin@gmail.com> References: <20200225073731.465270-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200224_233744_501783_2EF7B13F X-CRM114-Status: GOOD ( 19.58 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.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:643 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_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 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 , Andrei Vagin , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dmitry Safonov 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. Signed-off-by: Andrei Vagin Reviewed-by: Vincenzo Frascino --- arch/arm64/include/asm/vdso.h | 6 ++++++ .../include/asm/vdso/compat_gettimeofday.h | 11 ++++++++++ arch/arm64/include/asm/vdso/gettimeofday.h | 8 ++++++++ arch/arm64/kernel/vdso.c | 20 ++++++++++++++++--- arch/arm64/kernel/vdso/vdso.lds.S | 5 ++++- arch/arm64/kernel/vdso32/vdso.lds.S | 5 ++++- include/vdso/datapage.h | 1 + 7 files changed, 51 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/vdso.h b/arch/arm64/include/asm/vdso.h index 07468428fd29..351c145d3808 100644 --- a/arch/arm64/include/asm/vdso.h +++ b/arch/arm64/include/asm/vdso.h @@ -12,6 +12,12 @@ */ #define VDSO_LBASE 0x0 +#ifdef CONFIG_TIME_NS +#define __VVAR_PAGES 2 +#else +#define __VVAR_PAGES 1 +#endif + #ifndef __ASSEMBLY__ #include diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h index 81b0c394f1d8..042814339a63 100644 --- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h +++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h @@ -160,6 +160,17 @@ 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; + + 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 5a534432aa5d..553bdc19a91f 100644 --- a/arch/arm64/include/asm/vdso/gettimeofday.h +++ b/arch/arm64/include/asm/vdso/gettimeofday.h @@ -97,6 +97,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 6ac9cdeac5be..b3e7ce24e59b 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -46,6 +46,14 @@ enum arch_vdso_type { #define VDSO_TYPES (ARM64_VDSO + 1) #endif /* CONFIG_COMPAT_VDSO */ +enum vvar_pages { + VVAR_DATA_PAGE_OFFSET = 0, +#ifdef CONFIG_TIME_NS + VVAR_TIMENS_PAGE_OFFSET = 1, +#endif /* CONFIG_TIME_NS */ + VVAR_NR_PAGES = __VVAR_PAGES, +}; + struct __vdso_abi { const char *name; const char *vdso_code_start; @@ -81,6 +89,12 @@ static union { } vdso_data_store __page_aligned_data; struct vdso_data *vdso_data = vdso_data_store.data; + +struct vdso_data *arch_get_vdso_data(void *vvar_page) +{ + return (struct vdso_data *)(vvar_page); +} + static int __vdso_remap(enum arch_vdso_type arch_index, const struct vm_special_mapping *sm, struct vm_area_struct *new_vma) @@ -182,7 +196,7 @@ static int __setup_additional_pages(enum arch_vdso_type arch_index, vdso_text_len = vdso_lookup[arch_index].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)) { @@ -190,13 +204,13 @@ static int __setup_additional_pages(enum arch_vdso_type arch_index, 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_lookup[arch_index].dm); if (IS_ERR(ret)) goto up_fail; - 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| 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 30c4cb0428d1..3494b5536b63 100644 --- a/include/vdso/datapage.h +++ b/include/vdso/datapage.h @@ -98,6 +98,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"))); #endif /* !__ASSEMBLY__ */ From patchwork Tue Feb 25 07:37:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11402693 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 3C33F14B4 for ; Tue, 25 Feb 2020 07:38:56 +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 1928521927 for ; Tue, 25 Feb 2020 07:38:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GAUJUlxN"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bG7g6CDS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1928521927 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=bombadil.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=qJV3o/RSmQNaZvpz5bTWyeRFuZ2EwNZG/4kXU36YCpE=; b=GAUJUlxNnasSbQidovQ6qz+qVB hubO2qqqHRM/RAUI/CBX5Q0/V6dzn4h/lPulq8GL8rOO06vbvKjaE9429mQnATfd8/tUD1JJnZY9O 39NcNB8mjGdZQyEaVtyjBQQZNeQADR3eEfRAv8pusPmOCwpyUyc8DqW3UN9MKHoOlrt67qvqM0+0+ CIJRvinoDq7XDvhLtYXdedInQagM1qKZGzCMaY0TTahrtdB/B7yChLTjIFlwY4/Qo+/pJeeA4aHNW r2P6E61sMU0AoPJcd8b28Afb1w7OgX0k8ODrGTiY/I5TzwRAypeMjTP/zWYsiIc/ZcoJGQB3XbLhz YN8b/8Ng==; 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 1j6Unu-00018b-Pd; Tue, 25 Feb 2020 07:38:54 +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 1j6Umo-00009x-54 for linux-arm-kernel@lists.infradead.org; Tue, 25 Feb 2020 07:37:47 +0000 Received: by mail-pf1-x443.google.com with SMTP id 84so6721498pfy.6 for ; Mon, 24 Feb 2020 23:37:46 -0800 (PST) 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=sg/RdX3cnApG8KxqkYoz0JziOI+7hxQWlWjP9QA0+OY=; b=bG7g6CDSIPw+Dm3VI7iFviDISIYyxvfWj9Pl0agk37XSxmqnG5rCsKwBuWfymVraGU ssayjkKy90mnHv3wWpqR83zu96CHiZ+mWnq2iNOwaLTsqEW42Xp09oSLJ81Eh8i0mKLF fnEgZBf9486TV3tvM0zhksBqUE6skHGPmHY/7a5odVG/1w6Iw1IZMuPQgfblaq3iTLJ7 x+VPSOq8x2HtpbZkWbFJ4ObJz/8hp5HwNRf6u4IU8feZhQOx194ntqH37grqvXpAE8PX Coj8g8QfWtcOF5ES/1p+ZzXeFkLbfR/9tBD+8/RbgFYWdzZPjjLK02GlcEuP0XcvqKHY z8lw== 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=sg/RdX3cnApG8KxqkYoz0JziOI+7hxQWlWjP9QA0+OY=; b=YsZFJ+rOkao9f2zI6HoqinfTOy1ZxXobn16mGd41GmDD4jMe+xhBYboDTMeDLTNp4t TIYzmqGEdakUs4KmibEFSr3SR22L+kuL7Pm7v3iH4ZDiqX3U3QUU1R5/UtsMtvHSDE04 JnB8BKs5HsYYyokHRrFEbJxytN22p3yFOQ7xIvlkffVxPPH4swgJCxodU2QOJD/GxUop n72sK8yV+ufmEx90dfQ/0gVigyEyk7Ecn9UmipcPrJdVbkS7SnwA+2ryM7dUvj04QSB6 YVNNOoIrtuDbB/6255te9DY3cJvZuyq+23y783fHjsemSgNl30H3cPkMALCFzlpP3Xrl DSKQ== X-Gm-Message-State: APjAAAW5o6agS0GtK/i/u8rteq0XqHaIS1B3SAahZ0HFHkqJEVTTy6W1 Jp8lmR6xysdCzFCwfNEnzZY= X-Google-Smtp-Source: APXvYqxIsjWOLBzTKLNKC3BCo8OjuyQYteq3bx+WPxxZJOKSjwatxv3mV1yfko8OVrPQEAf5RqkS6A== X-Received: by 2002:a63:fe4f:: with SMTP id x15mr58115551pgj.30.1582616264731; Mon, 24 Feb 2020 23:37:44 -0800 (PST) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id m128sm15979390pfm.183.2020.02.24.23.37.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 23:37:44 -0800 (PST) From: Andrei Vagin To: Vincenzo Frascino Subject: [PATCH v2 4/6] arm64/vdso: Handle faults on timens page Date: Mon, 24 Feb 2020 23:37:29 -0800 Message-Id: <20200225073731.465270-5-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200225073731.465270-1-avagin@gmail.com> References: <20200225073731.465270-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200224_233746_249568_24EE4E85 X-CRM114-Status: GOOD ( 15.21 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.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:443 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_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 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 , Andrei Vagin , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dmitry Safonov 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. Signed-off-by: Andrei Vagin Reviewed-by: Vincenzo Frascino --- 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 b3e7ce24e59b..fb32c6f76078 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -175,15 +176,63 @@ int vdso_join_timens(struct task_struct *task, struct time_namespace *ns) up_write(&mm->mmap_sem); 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 arch_vdso_type arch_index, From patchwork Tue Feb 25 07:37:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11402697 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 9256914D5 for ; Tue, 25 Feb 2020 07:39:24 +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 5D38621744 for ; Tue, 25 Feb 2020 07:39: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="jGfD5YrR"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pDEi1gYl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5D38621744 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=bombadil.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=ASSY+mkd5rZUdiUfn11z5xPPZnjNZLBhowSEsCT0DBc=; b=jGfD5YrR7O72fmSXnH1aQbo7co Efu6gbmeSifcHuLGeCWmuVdb29tO84yXzjp7HQ6zDYTSsyv2+YOFGy3h7WWjgPaamiXb2UiDyecGF rxSpWrzunpvCRw/tN0kac9IDg5QRdR8IOeklFXbAMvsY5grcdR2O+8mEIQPRHgxwlCpj5OlS8bxPj RnOGCiZLeo14wNgEBo7RKV3hMkUIrWYergzPF7BsSKd6siY4ih+r3yppJn96/JWmOLfMksTYIzzjC J0csZV309Q0RFhB2eQGdRmS0K/R3Du3unl2eVGfckdBG7QA4GqyN5hsmzW5Cp0racVpEjikHYRvFM prPbiwhw==; 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 1j6UoN-0001cn-Jz; Tue, 25 Feb 2020 07:39:23 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6Umq-0000Bm-4R for linux-arm-kernel@lists.infradead.org; Tue, 25 Feb 2020 07:37:50 +0000 Received: by mail-pf1-x442.google.com with SMTP id n7so6736217pfn.0 for ; Mon, 24 Feb 2020 23:37:47 -0800 (PST) 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=Ug72A/vgrdmHIVdpr3zMNCL3H56NFZ8NAXeJKxd5VIo=; b=pDEi1gYlasNmPGrqygmBasm60r/FtjxKJbgu4k+fU01Lpbbws9FwI+l0FyggrMrfw8 0TywUcVUcE6eDH/x1tLCESNAOLg5GflR/tj1V62c4ij6I0lqgBQCuSOB0ZEO4LteZdlj lCamjaH8M6JaLgIu50NR1uYkqcxu/vEJNkUeYLwHCKUrGVYrDjEdUg4CJBiLgwgRV8EM 21cz3AhcL/QT09ImUvOvYnfvW7gSxFXeQJ9BePtmuJbMsKdK4I9GO55KmKdzYFu6Gxr8 E8/GMCSYYqKE5Z0UJJP3Tp2X+lv0AcZo20RDJwsgdK3zNUZEv7fyreYvwuC5JS86DFxJ Y6Xg== 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=Ug72A/vgrdmHIVdpr3zMNCL3H56NFZ8NAXeJKxd5VIo=; b=HJAZC80dr/vi7ApQxbCk6LXBdDqtYy00XT6/cFYYcv8ESUCv2OHbF394u0dEQ6J4hT 9Ebb23rTXPnd/UdzBBClSUpxzuJ//kzZNUMYDW+3s3S1EQB8ASzvQKZa3B7iXWXJiQEu ITd4/HjNcybVTtTNcyLNCOa1x/EA5izoJ/gpdKrI564b2syEQY4261bZT6eT/3rrQX+B AMY6J3wvKfgtn/g/VhJ4hHR4RfNa68XnlyMglcU2ArEyYB3r+i69QjNHN0EUud8ZZdSJ XATnXq4SQGtpWNTfbzxPhfjPgUG3xThAfpOj5biDHi2SgCoI2/EpNdJe+9R3gYN938Ft +iBg== X-Gm-Message-State: APjAAAWxntXbejMveO7JfUWdUUT2NxNWAaPHbzGmFSSk8WbrUa9p7BsA sHKKFK7SsPtdacRtGA9Ca+Y= X-Google-Smtp-Source: APXvYqwBnc/F3BTx7cSSKx9yuCG9NgaaS6u4J8P5NdiroM5iqOC7DIhqEjPmkP0xhbxHaeNsEvHanw== X-Received: by 2002:a63:d845:: with SMTP id k5mr54501802pgj.183.1582616265720; Mon, 24 Feb 2020 23:37:45 -0800 (PST) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id m128sm15979390pfm.183.2020.02.24.23.37.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 23:37:45 -0800 (PST) From: Andrei Vagin To: Vincenzo Frascino Subject: [PATCH v2 5/6] arm64/vdso: Restrict splitting VVAR VMA Date: Mon, 24 Feb 2020 23:37:30 -0800 Message-Id: <20200225073731.465270-6-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200225073731.465270-1-avagin@gmail.com> References: <20200225073731.465270-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200224_233748_199586_6CE45859 X-CRM114-Status: GOOD ( 11.74 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.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:442 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_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 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 , Andrei Vagin , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dmitry Safonov 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. Signed-off-by: Andrei Vagin Reviewed-by: Vincenzo Frascino --- 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 fb32c6f76078..c003f7ee383a 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -235,6 +235,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 arch_vdso_type arch_index, struct mm_struct *mm, struct linux_binprm *bprm, @@ -315,6 +326,7 @@ static struct vm_special_mapping aarch32_vdso_spec[C_PAGES] = { { .name = "[vvar]", .fault = vvar_fault, + .mremap = vvar_mremap, }, { .name = "[vdso]", @@ -497,6 +509,7 @@ static struct vm_special_mapping vdso_spec[A_PAGES] __ro_after_init = { { .name = "[vvar]", .fault = vvar_fault, + .mremap = vvar_mremap, }, { .name = "[vdso]", From patchwork Tue Feb 25 07:37:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11402695 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 A24BC14B4 for ; Tue, 25 Feb 2020 07:39:10 +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 78F3221744 for ; Tue, 25 Feb 2020 07:39:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JQpxFGQd"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lx4GbuvY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78F3221744 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=bombadil.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=havV1AE88NTD8ahKtkrXbgrLHAhQ+dYsCQOwJ+IIgik=; b=JQpxFGQdQL7QSfzK/vUAhTeNGz JRTKAhNT8785JpKPuw5O9YvVf4xkJ3PTY/tWXq/k8j+LnJL49v6jP6iMBbHBgWvMEvSz5308O+V8Z ZLiR5zwmHOxKKObTLGPc3qekbtveXCpfBKso/wFVJmjRESvatBSp43u7EmPau8ZILKxCzoc2YmuGA NP8tnKKPIqEPvLclSCwa3yzt5xcZdrggGpyR/r+80ZqDiYdMB0n7s/7JM3k+pF71iqO9WEV+uZkHx WhyNODYBX//SZxht6L29ArG5Bx+H6zZPnpzTMNIP7RNOAfIG+jPs7d4s22JsvopRnvFVSlUJuu7Po WNiRkyhA==; 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 1j6Uo8-0001MH-1n; Tue, 25 Feb 2020 07:39:08 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6Umq-0000BU-0Q for linux-arm-kernel@lists.infradead.org; Tue, 25 Feb 2020 07:37:50 +0000 Received: by mail-pg1-x542.google.com with SMTP id 6so6471689pgk.0 for ; Mon, 24 Feb 2020 23:37:47 -0800 (PST) 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=uVjpVCpfuu6u9amKnD4CalKwNS7GepUbqRwEuTYWuWo=; b=lx4GbuvYcRQjywh8EGZg3jQu30Cb/EuoaBgo5dSiBHWhUH8B6aEpiGP0b3oAoPAvf7 2nT8fUJvf9KyOMiaVcYdBiLulqtfsog2SPe0Yv6nRWLqwpjhmINC3dzTxBc4c82OdFgg M5t6Yc3RdK3h3B1QIXBHTml5dG+5pIz8M8ysMLJMVIzfU9LaTwqbDtfu1IfYz93sFqNA Ds4lhE3GPdLBoii7W65iNEqxYFzs6tLAgdKYeTfm1k2p/T/ljtliKzAwzcSNgqFMYKMu 6QT+LPZxcbYtrdbyLpg39NooaXEDDzKcOqv0qG+hmftmZPyw0cWIpu0P5CBK0Du5lrrC ykxw== 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=uVjpVCpfuu6u9amKnD4CalKwNS7GepUbqRwEuTYWuWo=; b=M/CPFfPrFYqwFayl6w9UwOTKMKs3AwA8XIMGmvHDAtM3vL1arU0ruBRT0TQ/bn7RDt WGrHEtwAmyQa/q58O0p38v5HtkRZzVfWQ1ab6/ZN5D8b8R1JVeh1L/jOTIdzJcEd6XL1 yu6X4BoISWlwZZdOUVQFzO9t2IkpJngDQxoGb2dw5U2r1y/XRDP+Gg2qph71xhay7wMk BCdgSLvhOk6cg3zXpHNR73TtpBaT4wLQAZ4nD/CWG8m79Z+4xedqjZfc75Naisyto56h lLwa0EiXOOZFxtVi63yJlejWjoxUYPbRHjA7SxcF9nuuxAtmY26L+z+3wlWUYtRtOt+w cvEg== X-Gm-Message-State: APjAAAX8hcrq5zcQy9xQFwOCje81VwZARNbgdEnD/wOfxH0hRp9ePmFs UqpUoJaqMAZ5bjoVimoVUoE= X-Google-Smtp-Source: APXvYqzyhGlNtKBclYq/XwC7fr72ijj3ORk/duS7q2SyU+JRS6ZWSmS2Cg4WORnlDUArTv1T7imXhA== X-Received: by 2002:a63:ee12:: with SMTP id e18mr28708916pgi.33.1582616266674; Mon, 24 Feb 2020 23:37:46 -0800 (PST) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id m128sm15979390pfm.183.2020.02.24.23.37.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 23:37:46 -0800 (PST) From: Andrei Vagin To: Vincenzo Frascino Subject: [PATCH v2 6/6] arm64: enable time namespace support Date: Mon, 24 Feb 2020 23:37:31 -0800 Message-Id: <20200225073731.465270-7-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200225073731.465270-1-avagin@gmail.com> References: <20200225073731.465270-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200224_233748_053054_E2009CF0 X-CRM114-Status: GOOD ( 10.23 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.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:542 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_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 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 , Andrei Vagin , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dmitry Safonov 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. Signed-off-by: Andrei Vagin Reviewed-by: Vincenzo Frascino --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index c6c32fb7f546..660ad0b0e6bb 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -110,6 +110,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