From patchwork Tue Jun 2 18:02:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11584191 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 7C7D760D for ; Tue, 2 Jun 2020 18:03:29 +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 337A220823 for ; Tue, 2 Jun 2020 18:03: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="cCH26b7v"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VuUGPGEo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 337A220823 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=css8nNgARgeFC4UYnwZvMW+ARRAv+h1i/rWg5oLuJGw=; b=cCH26b7v2QKY7wr+6mV+mA2b5z ytG+wFuNNfUVAFeq200Hf+7SIRXG/iWuOxtoljD3kwY+4u067DALn42jF8IYg7LwM3bYbpMpYH3cU 7AsrAHlnlxY9eIIc+tVl2XJ+UfMTpfDUimMHlmYIT+6jqZ/E+iN9koH3HKqRP4riJWM47PPWq4uxP Q4Hmzo0CysfzfB7VwVD1RnceVpLhHopSBJNV+3JVdJLrFcNaokinIaaBHKn1hqRoo53JaBBkHSUA5 hJ0CM3ACT8cUOp5ICiOqzxXGnJ18W1uqtE+vQnIf6x8AOjv6q2zYD16LV4orYIFrrh9A8K0zwp8by ZiKE09PQ==; 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 1jgBFt-0002p6-Uv; Tue, 02 Jun 2020 18:03:17 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgBFi-0002fl-He for linux-arm-kernel@lists.infradead.org; Tue, 02 Jun 2020 18:03:07 +0000 Received: by mail-pg1-x543.google.com with SMTP id n23so126897pgb.12 for ; Tue, 02 Jun 2020 11:03:06 -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=QGD1nesqWyjyIgD1rTMvSAFAGLyEEfpYf/1KB187E2U=; b=VuUGPGEoUPTURf3RYtx8Z5AxOLk+4ls2cqG0NCwDdNNrLuavo7E/67YQMT5DYSBitj DcxdX+4jvlaoTt9LHsCu9HGbMyZHqQ6bVCSFaB8adeIRJm4fYzmR31+I5r3RCSP+amp9 Pk9bR/KKzgVT3IRovnElkSO1N87zEp8wXAQZNx1nk54spjwa7E50kcADlKGaec7JO5BU 2ltsrKE+wN67Y4f+JCgLF3gJ8QtqQfDUZNJSqnZvmO+DgSRj/YF6/iyS8GIczHHE0RJj ZFCYC0aiCiiKNi5M5a43bEI7CwXFp6IEhnQlUwkt7XtDd9GX3rQhMsJer4wWS70asgJA iANw== 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=QGD1nesqWyjyIgD1rTMvSAFAGLyEEfpYf/1KB187E2U=; b=INQinK9vHFuZpjBmhtScw10BmgkuFEvRP86gW+TqvVZ2GAxHKnafrFnj5XcPmgBM5r kpmExnJMabJ7gCnnnbY1DyaoemppzjkL0DzlLRlSKZplij7luUg3YD2XwvxnJEgF4qwc /BGP3c40ShVovbu9Y6ydGYazQ5VtsC2PZFr4wYapz3DU++bwxZHwcuY08HxNkIch69uR 1ZvJCsTg6Kw1P4cYAlYqC5ifeUJVghq20wZwU8VFQnfnDZFrlpmlrdTuNkGgehCUJHMd Tl8gj1Fqh8opspDfVRSHKkqbynmfqsW3dGhtTl7yHsrsFrgJ/+5OdjNtIYSQXdzuWDY4 Qoyw== X-Gm-Message-State: AOAM533/eozS4nLXKAavdInb3Vy1DZu8XkIE3A+pQW4H5oaEjO2gwqIa eEzPIXFV+MR/oYe0gNVUWuGhaGAk X-Google-Smtp-Source: ABdhPJxi9crDyNOlXl/+7uBWebXj2rltTHVnLx2F894AlFvwI/cNoCm8+fb6Ps/1YNhITdbvtnMY9Q== X-Received: by 2002:a63:e549:: with SMTP id z9mr26130165pgj.213.1591120985545; Tue, 02 Jun 2020 11:03:05 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id p8sm2740053pgs.29.2020.06.02.11.03.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 11:03:04 -0700 (PDT) From: Andrei Vagin To: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon Subject: [PATCH 1/6] arm64/vdso: use the fault callback to map vvar pages Date: Tue, 2 Jun 2020 11:02:54 -0700 Message-Id: <20200602180259.76361-2-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200602180259.76361-1-avagin@gmail.com> References: <20200602180259.76361-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200602_110306_581257_B71E62AE X-CRM114-Status: GOOD ( 14.84 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 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:543 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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: Mark Rutland , Dmitry Safonov , linux-kernel@vger.kernel.org, Andrei Vagin , Thomas Gleixner , Vincenzo Frascino 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. Reviewed-by: Vincenzo Frascino Signed-off-by: Andrei Vagin --- 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 033a48f30dbb..031ee1a8d4a8 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]", @@ -385,6 +390,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 Jun 2 18:02:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11584193 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 B22A360D for ; Tue, 2 Jun 2020 18:03:47 +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 73B9B2072F for ; Tue, 2 Jun 2020 18:03:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TF0aLOyD"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hc9Kjh5K" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 73B9B2072F 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=IJdaKhR6yHuDXdDpD7fCyb+d/6URuz0nY/0/x5nv0v4=; b=TF0aLOyDr6PJ6Rwh0Afcl/NIvo 6cqb5ePvSo3mxC31LBlNjlnXp3m1tjiY1RM1pBSAg8zfnuCCrfSSY9H+DE5L51q+BvHxUBgR7tGUD zmFHjsuiVdm4bMo6fpBBkweOs/lV8QpcXP+eScLII/dTnWIw3c60JRPUZktCoSWcSZvjGRg0dKP5C DpM4r9N7B4MCwwbJtzOKFcolR5cbCR3wmeZaBeQPqeqNRUvhSk7PrV56djWpVqgtPepK6t4Aw5zYz dDim93532HCyOYwZKUatPw99E1dx+GlCq2cHLxRub5kx39UdpPR3x/1PNHtbu0otPUggR2xNpapYZ ASKfcWSw==; 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 1jgBGF-0003DY-Vl; Tue, 02 Jun 2020 18:03:39 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgBFj-0002gE-NM for linux-arm-kernel@lists.infradead.org; Tue, 02 Jun 2020 18:03:09 +0000 Received: by mail-pj1-x1043.google.com with SMTP id q24so1895675pjd.1 for ; Tue, 02 Jun 2020 11:03:07 -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=xduVDJsRlgliJcQL58QqcKbDz/BTgkkM9d/dUnD0dlk=; b=hc9Kjh5Ksvxx2g/UwK/Xg+LMKcfr/E0AwwubQnwak+KnY2nYmkOMubnJvCD4cB5PeN QclEVzxQDq0N4VsdQnF/KvRsiMbh31TO+kFea8DLl1YPdOyGXCzdartKJvEsPoiIvAiF 461Pe0ucsyGy+BwIiJBYNg3A1t7bIpiNRonOCq3AWAHULVqjSNA1XI6lpk92ZhKV6YBc 5Ime/Yulu3Ju/sqEgIIa0P+IEB8b8y8uj0L6WIgav9J1H9NgDAJOPyJXOhdyYBIJ41yo R8N2Qc0L7POcZKwzBoIlj48/ItBOA/fcknTSIByEIOZx9Gv/f9K+p0OzrzUI4dVpIwGx p70g== 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=xduVDJsRlgliJcQL58QqcKbDz/BTgkkM9d/dUnD0dlk=; b=DJ5zyZewl7M5sW37MWa1pW2l83iMH8thLLGHt28Y/7Tn4k9i1aadH2HE084hEzI6Rf 8jw6pIslo+4iF39L1CwtRmgReMoShqLAuTLQOAsc8Sn+hk1PkTomL6i7gjhtis9Ve3vi SLCRgTtMiiw2NVOrf5e5Ogrm7sqqymWOhcQENe/6TxB8hxGZo2JEE8bgtCjLjbV3TMZF WjcGkmQyePkYtu7qsxd6p0Ibr4ZmOZAvy86QIMevcCpB5UumoZv9QLnBv2nDwDPmt24z MvDW8vVbNyESLCvEOb9eX1URRJFnNb6blHGtAXtMAFjVx30cUwDFfLRziV62jhQ9QAaC D65g== X-Gm-Message-State: AOAM530vg4CNLpyCqs/plHAWw1l7e4HB7vAR8ftpJe1sWksTsznu6K8g +CcRtTgRf2CutrAVrm+IxJuZFlP4 X-Google-Smtp-Source: ABdhPJxaac7TRGf9B4Yfc6/Q7f2PY21P8UBX0Wnr5Ek/4NanfVovw9W+nvYjLwPpbDHD/J3IgwviJg== X-Received: by 2002:a17:90b:4c0f:: with SMTP id na15mr423404pjb.112.1591120986740; Tue, 02 Jun 2020 11:03:06 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id p8sm2740053pgs.29.2020.06.02.11.03.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 11:03:06 -0700 (PDT) From: Andrei Vagin To: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon Subject: [PATCH 2/6] arm64/vdso: Zap vvar pages when switching to a time namespace Date: Tue, 2 Jun 2020 11:02:55 -0700 Message-Id: <20200602180259.76361-3-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200602180259.76361-1-avagin@gmail.com> References: <20200602180259.76361-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200602_110307_773209_80006F81 X-CRM114-Status: GOOD ( 13.14 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 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:1043 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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: Mark Rutland , Dmitry Safonov , linux-kernel@vger.kernel.org, Andrei Vagin , Thomas Gleixner , Vincenzo Frascino 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. Reviewed-by: Vincenzo Frascino Signed-off-by: Andrei Vagin --- 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 031ee1a8d4a8..33df3cdf7982 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 Jun 2 18:02:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11584195 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 A3C7760D for ; Tue, 2 Jun 2020 18:04:01 +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 7F5972072F for ; Tue, 2 Jun 2020 18:04:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YT51uufB"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="j2WVkv58" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F5972072F 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=9/s28jfcsZWLrpQKcF6nihwPdivv1Q/Tzbl3lraqoJM=; b=YT51uufBDUp74lufC83s4faUAO 2J5Fr0gl7ewSSS9deU8kH5/Lb9Abgs3QJ9ahtHiWXm/cFswi2rAT0FzmWsVuC8EjFIUl06RxYzqyA QJqhLss47BCM/1ALiPxYKPIySKl22LEEfzh6E79ifjs94o2AAvPGeSII94lFtorTT71vjg3azMBLL BHjinzKIiaxYdifrJsrvzPXRpAdB/C/bEf7/DSCFPaCch0vhkKG8Z5C1CTCFkWxLUR6J9IsEBJSYD QPKqYYT6hc/JN19WMrq5Jss4jxrGeO8r2IKatladw2MRRCQwSrVidLRgj6lOgwJ9JTyhWn49HLRJ3 d7XehIgg==; 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 1jgBGV-0003TM-9z; Tue, 02 Jun 2020 18:03:55 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgBFk-0002go-PG for linux-arm-kernel@lists.infradead.org; Tue, 02 Jun 2020 18:03:10 +0000 Received: by mail-pf1-x441.google.com with SMTP id z64so5442220pfb.1 for ; Tue, 02 Jun 2020 11:03:08 -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=wvC2cXU3x8NgQmMPlghjw4hXQanJRRtC1oN/RWCq4y8=; b=j2WVkv58m9zpWyZJMOK3LR7zEyQEK88hzm3wtSJ+wZERVs+ZjUfLtQIR/HJ6RvNkEA dzGvMpNHDeisx7baXn3pR9PZGrH+smeZnm9HrCXm03HsIn5kQ63TC01bItzyvnj7GYqG RSYVI/5LLmUiLSNyBzEW7SdUbbe0Jaz9Wd7/3szQjYy6WYTa7cB1cos5Ka9j+J1Mezsa J83SehNNnj2GDSm8pOJfsF1agRjGOcee/rhhv9bTaHefjWVl5ckEhmWOyfkqbxqIht5a CsoP2PmodukwMsPB0Ezmp2SuouNPV1U4Ro5FhdnwoszVGZXuzv8gI02MqKzIHKG4AEQi BMmg== 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=wvC2cXU3x8NgQmMPlghjw4hXQanJRRtC1oN/RWCq4y8=; b=UDRPUcDTQO/0QH2zxaIFxQcIZ8b+x9cI2mi/d5RIbRqBmKD5xWjfHUtub4EHx1I6jO RhSqTcmdB9yYtP0dU6q+e5gls+o35nRDD8fXDj99sAIivMm1ZzRfr82YOLIiETPbblub +3a0y8ouA2A5hX7FRowILtskQ6+FVz+Nmqr4slef9R6uRy1rcizS7qfoByUNf20PEW22 eje8Rex4H2uQUXHOozBukZsfMjILCX34LSJUrzoh4oP7cOI43CXXMoGvg82Oc3jLl8GP M0yvTAVVyTLnxZLVcMzZOLwHdbcaMm2H6we1hSttMVLbbc6oPK9lQpiAkVxziW6glQf6 CrGQ== X-Gm-Message-State: AOAM532mK81ibTetHuNscCsiAFmydlGurjg7Uo6rNJBDzuJeUO/bJxxX oLZiivCI0v3dSNQl9AM/UYj37Lu2 X-Google-Smtp-Source: ABdhPJyDdYPU0DoZ4PPbnuC7G/D+TcLR6xzD9xvDTtmOSog5BajkQT38Myr/BRAjL+H6/fpPpS2SXQ== X-Received: by 2002:a65:51c1:: with SMTP id i1mr24806038pgq.272.1591120987722; Tue, 02 Jun 2020 11:03:07 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id p8sm2740053pgs.29.2020.06.02.11.03.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 11:03:07 -0700 (PDT) From: Andrei Vagin To: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon Subject: [PATCH 3/6] arm64/vdso: Add time namespace page Date: Tue, 2 Jun 2020 11:02:56 -0700 Message-Id: <20200602180259.76361-4-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200602180259.76361-1-avagin@gmail.com> References: <20200602180259.76361-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200602_110308_815869_604DD04B X-CRM114-Status: GOOD ( 20.32 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 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:441 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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: Mark Rutland , Dmitry Safonov , linux-kernel@vger.kernel.org, Andrei Vagin , Thomas Gleixner , Vincenzo Frascino 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. Cc: Mark Rutland Reviewed-by: Vincenzo Frascino Signed-off-by: Andrei Vagin Reported-by: kbuild test robot Reported-by: kbuild test robot --- arch/arm64/include/asm/vdso.h | 6 +++++ .../include/asm/vdso/compat_gettimeofday.h | 12 ++++++++++ arch/arm64/include/asm/vdso/gettimeofday.h | 8 +++++++ arch/arm64/kernel/vdso.c | 22 ++++++++++++++++--- arch/arm64/kernel/vdso/vdso.lds.S | 5 ++++- arch/arm64/kernel/vdso32/vdso.lds.S | 5 ++++- include/vdso/datapage.h | 1 + 7 files changed, 54 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 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 33df3cdf7982..1fa6f9362e56 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, +#ifdef CONFIG_TIME_NS + VVAR_TIMENS_PAGE_OFFSET, +#endif /* CONFIG_TIME_NS */ + VVAR_NR_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) @@ -180,9 +194,11 @@ static int __setup_additional_pages(enum arch_vdso_type arch_index, unsigned long vdso_base, vdso_text_len, vdso_mapping_len; void *ret; + BUILD_BUG_ON(VVAR_NR_PAGES != __VVAR_PAGES); + 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 +206,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 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 Tue Jun 2 18:02:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11584197 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 C3B9D60D for ; Tue, 2 Jun 2020 18:04:16 +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 A18062072F for ; Tue, 2 Jun 2020 18:04:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gCwE6zK4"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qUzo7Htw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A18062072F 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=wwk740LSQnCqGe3RaQ0mOK99HN2VAXn+FP0GjXyxJ3M=; b=gCwE6zK4AaoZio+GZeQ08HkkRw xdwsFgXzSFzKvidvG4RU8bTHy/AthLCjqSroDLIwUHomKInp5L3Vi3ObLiNjAi0kLusB+MIGDdgEu yyaBOq4HTxDaHeU8bVqRMxeJPH7UVnsijE/qrVq/Er8TtHXTZbv8GbSsO23hf4j4yzLdIDcXwVDgJ Dhq1E2CjlklNAtA8WDXx1pO8YOFtqDnUTzJ9VFiITBaHF/5ga0xSPFIA+mKFWa5HDCP099FtJKULX qwOgxt4prw8YDgSH1GIbbxdsUMVtjDGs6gkmuODysUU8cpKcS9wLRc5nt4Uhg7XNWRgd8hfn54E3e /P6ydfBg==; 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 1jgBGm-0003i7-HE; Tue, 02 Jun 2020 18:04:12 +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 1jgBFm-0002hN-0i for linux-arm-kernel@lists.infradead.org; Tue, 02 Jun 2020 18:03:11 +0000 Received: by mail-pj1-x1042.google.com with SMTP id d6so1893537pjs.3 for ; Tue, 02 Jun 2020 11:03:09 -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=pYFSYa09zr69QLygLryWctXuj1LoNkWSXD+By1jBPHc=; b=qUzo7Htwnb4o/U1sPEPo4n59Pz3Gtet9GVRwIWHj4yKj32lDKLpkIsyWwQoKDckgvG NmiwHf2CfErIQV1ueag5uXysuSiioBL1K6cEa3SgbGK78JP6epci1KgN3YtHfrmu8G2z N7OsYPi51MCqlo90TkS6jvxrR2rFemS0JNaouPfAvUhkUi/4vohLB5ObkRxa/tXAHztv klV/C53z0G+2BW8UCmKjP5MYHdv/aQRSLi9xQLsjw5/RewsZoERNtFX3E0k+TX4ue6M/ uYNwi9f/Vi3XXbl2+hKrlyd/Bwgb8sysAZCgF6lEKw3LuXKwg9dtIQNloUZ2sMTiRy67 w6zw== 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=pYFSYa09zr69QLygLryWctXuj1LoNkWSXD+By1jBPHc=; b=inPX8x2Q8kR4MO+4FwjDI228j3IOuMvjug9AbxRkamr72d+EvjxvTqtZwy0B7A/SQF 58KMo90VRw1neF9xSE2OgurKAFm3PibB3hU2wG5fRQGnHkTuI7h1gmcA96hEvZ/wFOe9 7ZP7YaEo6ZKH9yIxULAOKtCLT2jH0d2sohGM85EuSqNo5KcwBKTA9CuWKPzBIl9Rp+LV o7eVXAZEtBUENpvhBUPwhA0SeENr18dvby91hBlsrgPsYlxaiHWQvoy4YUBT75PwofrN ypyNUrcfogMjzyAx1rwk2c799F7QS1qi6SXgHG0YOGekkxK6x6z9ZLhty7JVWkITa6hu t8+Q== X-Gm-Message-State: AOAM531ae8UryX3c0YLqIgOjEMd3/q+OUbifskE4rXCi4HiHh5Vrx11N PZHrjTrYXi/BQl2w6++4zP85OcPR X-Google-Smtp-Source: ABdhPJxjq8mzXPifWl0Kc+KsV7By219qzUuO5Tzse7+mioUC3UiBfTQEoYr22AavOCwIwF9ZYEIRTQ== X-Received: by 2002:a17:90a:ce05:: with SMTP id f5mr449132pju.32.1591120988929; Tue, 02 Jun 2020 11:03:08 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id p8sm2740053pgs.29.2020.06.02.11.03.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 11:03:08 -0700 (PDT) From: Andrei Vagin To: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon Subject: [PATCH 4/6] arm64/vdso: Handle faults on timens page Date: Tue, 2 Jun 2020 11:02:57 -0700 Message-Id: <20200602180259.76361-5-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200602180259.76361-1-avagin@gmail.com> References: <20200602180259.76361-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200602_110310_062540_ABFE1E32 X-CRM114-Status: GOOD ( 15.45 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 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:1042 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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: Mark Rutland , Dmitry Safonov , linux-kernel@vger.kernel.org, Andrei Vagin , Thomas Gleixner , Vincenzo Frascino 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 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 1fa6f9362e56..f3baecd8edfb 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 Jun 2 18:02:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11584199 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 67BEF618 for ; Tue, 2 Jun 2020 18:04:38 +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 4377E2072F for ; Tue, 2 Jun 2020 18:04:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="s0lpCbUw"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Pz2n9CXw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4377E2072F 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=HdEaJsySBnUjiJt5+fvpkXhFEims8OLGVkizdTTVPx0=; b=s0lpCbUwaFadFQ1gf4+0Ogo3jM vcXmwbC9Pwd8s4Am4X6J4WT13StoRrdUXvguwoTORCe3GjPCyu2Xd2s0fk9Xb+wJSRaO0gkadpMRQ 04fRNx2SC4thHTJIC6/UQHMAYzv5dNVStaqayWGoSJY4Hr/jPZ8bNP1Aig0KO02w9y7T36FnFGHwW IXbwzXp0G/hN6PmZEL803XY9xMM4MKOtPKIeC+QoAdD4oJrvnC8/pdx+MVwh89DPKo7ZGkG+6aQor Fo/S660NZmoxN+0A22PPgUKOqPcVS6+uVsfHKRc4ZxNl72Ex3d2gO0IetmFiGiQCleGVk4zomUxil 0nzpFolg==; 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 1jgBH3-0003xn-Ny; Tue, 02 Jun 2020 18:04:29 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgBFn-0002ix-Nj for linux-arm-kernel@lists.infradead.org; Tue, 02 Jun 2020 18:03:13 +0000 Received: by mail-pg1-x541.google.com with SMTP id o6so5449028pgh.2 for ; Tue, 02 Jun 2020 11:03:10 -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=0ff3kXbnY7mWoXT4ZLxtxnZ86nFn96gKFYgcZDXTiq4=; b=Pz2n9CXwBlKq8PW7Clg8W4f/AinwzKiB+1ZAHlMPryHhTCOrwPxRw4xVn3lGiwP8rO EcVeshytONp7z69W8S2CQ/9E/fSe+hmf2Z+RUjSkLQz7o7Je/OpRWCUiJFidLTEf/kI1 HZ/ShoxY8TiY8m2yA9q9zGz+Cdquf+8PmU6BnRrc2isbe6OuPXiIXLqKTluopPjOB4at 6c7Na0whmCZlO0YLC5QQgO3pGzF7cayFsq8ux4P796I2iaww5Xq+AnZdgzfmm7AOePfU UDkwsZ7Vn3XHjJ24T1QpIReFhzDhACVocPW5v4E39Dr4+3ynDwFfw5VGhylX6N9+y5zU UasQ== 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=0ff3kXbnY7mWoXT4ZLxtxnZ86nFn96gKFYgcZDXTiq4=; b=eRu/A7kyvSQvC6uQfP9BKlqjJ4ioupKbYB9HvqTspeZc/TgITzbXnVikxBlD/n941Q gxOfuHRre8zaF3tt3+zdhVUqZtdW/tZP6WoCSb84cVMEcFsX2vhPrnRSC3siLBPsO9+p H9F+NS1yO0mZugl5wNOUs+v70w+pRY5ONz8bfF5A/iu18Od41zqwGCMai/oU+HzngXpv 9n1eM1gvMqIDCumqkXZ5TZUFxi0ktzb6RoKYta7PMCwfWHtEjz3JrwLaB7yTl8UAZK1D +RelBfgVb0SYn3tDAtlV+srcjmpXOLkIkwKic7bqSuDMT3TjcjN6i8cq9Q6v6E87d3BI JRxA== X-Gm-Message-State: AOAM533+oVTtc4crwFQ/qD2C1KEO8wfz6tZE5XrRj4hasUvW6xPTZ/7u qhUk9jz58vEYOKYXfVZL/rvNUBvr X-Google-Smtp-Source: ABdhPJyeJEHpH4P3opkCS6VQefDLqAL7wW0kPJHO1aE4Rm6Ng+v9CzZH4XZaXxORa/Ol5Hh9sA0z3Q== X-Received: by 2002:a63:9319:: with SMTP id b25mr26017714pge.374.1591120990153; Tue, 02 Jun 2020 11:03:10 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id p8sm2740053pgs.29.2020.06.02.11.03.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 11:03:09 -0700 (PDT) From: Andrei Vagin To: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon Subject: [PATCH 5/6] arm64/vdso: Restrict splitting VVAR VMA Date: Tue, 2 Jun 2020 11:02:58 -0700 Message-Id: <20200602180259.76361-6-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200602180259.76361-1-avagin@gmail.com> References: <20200602180259.76361-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200602_110311_787306_9432F70B X-CRM114-Status: GOOD ( 12.00 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 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:541 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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: Mark Rutland , Dmitry Safonov , linux-kernel@vger.kernel.org, Andrei Vagin , Thomas Gleixner , Vincenzo Frascino 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 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 f3baecd8edfb..8b17d7d10729 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, @@ -317,6 +328,7 @@ static struct vm_special_mapping aarch32_vdso_spec[C_PAGES] = { { .name = "[vvar]", .fault = vvar_fault, + .mremap = vvar_mremap, }, { .name = "[vdso]", @@ -488,6 +500,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 Jun 2 18:02:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11584201 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 286BC618 for ; Tue, 2 Jun 2020 18:04:52 +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 03BE52072F for ; Tue, 2 Jun 2020 18:04:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qRixDJ08"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="s4phUVgR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03BE52072F 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=zADpJmKNKXk5puYZbuv5mIkNpyOssMEkPtjsoZGqu+U=; b=qRixDJ08zE53Zicx7eWIbMTvIv wBKdc/f7cbxiWIw1fHs4rL8GsqtNAT7TXbN4mQzer7uxJwtVJrCUXAww9k5qKbwb0ES639lTyGVAS ZpzwwJiA7fbJcWb/9LKOh+gtjkaY39HKV70fSj/NYeR/JTLGsv6YR6rsjwDVexM5N/NZ63bY5rT+E EASYcqs+CcrcSyrhEbIyPQplAz0H98Wg6RP7bFQ7AnMIkUMbyFsWhPYi6a5N879YTXivMuKKj5P5f Ya22I7O7R3DFrnEvrCLsH/BFaEl1IMTu8GqphszE4waFBLoJjmikIrj+eXeMTfoS4D/9/BeH/9wOK adQHva8A==; 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 1jgBHK-0004FI-9v; Tue, 02 Jun 2020 18:04:46 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgBFp-0002kb-R1 for linux-arm-kernel@lists.infradead.org; Tue, 02 Jun 2020 18:03:15 +0000 Received: by mail-pl1-x641.google.com with SMTP id g12so1667194pll.10 for ; Tue, 02 Jun 2020 11:03:12 -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=l+gmiIhsqHKKeV2kb8RamFGYYWZ6op/LuStlHg2Dznk=; b=s4phUVgR+akrp7c/vYhslkZoojsDqIXIGRaVmfYcJ7VHWL8k7vsIvnmfUCezPItguV iwugRLWNaBv1F6cYo0op1aLA2J+ZPwuVe8PT1gyBw6L75Lxt9+IbLm2FgPoGroRcD1Tj kmpBmnkg+Av5XvHdQldRthLk6gWzwKGhpjLBvRUDpLW9bDO08drc71JgCGyYBk+C7X8A 4sMmYC2StL7l4l+a8Wi0NWrIHjXALAfbh4jBYI1zogzP5Dk5RIZ66faYX2+eX29+0EhX WVraLqHSl+DE4jmYvp32KiwSltqHAEFRQE5YafF465RShCf1i+9IVJGuELRKUAl+cBWp 1UKA== 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=l+gmiIhsqHKKeV2kb8RamFGYYWZ6op/LuStlHg2Dznk=; b=rm/PjmqSaDXVT2mRMHrm8+Prt1joc9KAfqUKxUiBst/0lJR5LfEsKIok2gZI+wyjrU haR3zFN2R/kol+P1+0c+RCxTfBpmoq4A0mZ8yLLc1UtS9o7qPlC8NORajYhh31aYZoWL uuioyKPgdBll9eHNKEbL6OIrYzOpK9MJNqT2qmkQfK8Ilodz5PdqeUG/a9t4F5gMagwR 3+g9ZevbMI0YchezvxtWCUoFKuBaDuBR53OCMx0j3noffLziGJowhM102GvZoYoMCAgR v8XNyMzvOKVhvm5GKxxsdt7ilGyeFcxFxkSbo9E7OrBe6d35j5GPhYkzASxmeEvV5OFm 5MAQ== X-Gm-Message-State: AOAM532L7OdKleAnDf+MMyUtxMuXWGDtXFUu5BVD6uSI3F66f6IRgLTs rk2erulvv3h5elOeFz8JagHwEY0m X-Google-Smtp-Source: ABdhPJxfnuS03XcLCUV6KI/FK8sIlZ0kgrEyY9P6ubaAQiCko/R2Xtexh1etML9+59WmTbwZ64/Gaw== X-Received: by 2002:a17:90b:234c:: with SMTP id ms12mr442497pjb.164.1591120991190; Tue, 02 Jun 2020 11:03:11 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id p8sm2740053pgs.29.2020.06.02.11.03.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 11:03:10 -0700 (PDT) From: Andrei Vagin To: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon Subject: [PATCH 6/6] arm64: enable time namespace support Date: Tue, 2 Jun 2020 11:02:59 -0700 Message-Id: <20200602180259.76361-7-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200602180259.76361-1-avagin@gmail.com> References: <20200602180259.76361-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200602_110313_874674_6C7A2B45 X-CRM114-Status: GOOD ( 10.87 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 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:641 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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: Mark Rutland , Dmitry Safonov , linux-kernel@vger.kernel.org, Andrei Vagin , Thomas Gleixner , Vincenzo Frascino 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 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 5d513f461957..27d7e4ed1c93 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -111,6 +111,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