From patchwork Tue Jun 16 07:55:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11606779 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 64A3E60D for ; Tue, 16 Jun 2020 07:56:19 +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 118D0206F1 for ; Tue, 16 Jun 2020 07:56:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WK3mfRRi"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Cp8t/bjO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 118D0206F1 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=1/TgXIx4FNAMGNIkmHqGrZc59ss9oPyehpTcrzaElVw=; b=WK3mfRRi+iu0gddvc2s9Io/Z1b ybXY5Nd2//XFs3hs4U5xirAbDM7zMBeS6QOeRVIEZnPbxvN5rDEiOCOkr84oOLUr4wUYZnggjA44/ 88p+t7+DcxYaICFIMcWxpbwurEWtaILRxw/1E1ZWXL2osjtitOPdxYGBCi0ad9kkueK1zeHgRTaou NGow9t6iufmEGqw3eOqUh1QYF+5QxOH3UBjr6Fatuc6c8mr5qiKZS1gAT+xvGKtyTG3B6XvO4+P5Z ZPST3nCNIqiN90GWO2cyY2b3KSN4m8WlHk1sDFK5mvZq3jWrx0e0bMqPikA4zuZgCVh1Tden9/7kB 0/3Mz3Kg==; 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 1jl6S1-0000C5-N6; Tue, 16 Jun 2020 07:56:09 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jl6Rp-0008Un-Uj for linux-arm-kernel@lists.infradead.org; Tue, 16 Jun 2020 07:55:59 +0000 Received: by mail-pj1-x1041.google.com with SMTP id ne5so1060834pjb.5 for ; Tue, 16 Jun 2020 00:55:56 -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=3w3acXY0ruvQ2cOAk5Y6lKlS5LzTqXqZJuB6w0EA294=; b=Cp8t/bjOY0qFMLYTzt16FoouVp9eINWmU8mmUpHX+AsFrDKIXkcT19z0suqBLghibO OsWPTbNQ78wf/cMk9oUek30lb6kngbCTL91Ip4B4OBjsGHxi5xA/ijlrqrQlNLoGn/bn l/7vyPUklqJG1Baun2pVxMHTasoW42ICl3Es6lVrZb83u6aebgtl+kJzIuZw8wkSuD5y eWg48lc4rfg+C2iE2LQQqoBLqeCS++0+HVWVXWygJpkK1vDfoep1tzRrEdYp2cVb/jvQ JC/cob986QCwZA/FpwkUZqZkbS85NacBJV0l0OpFKfn0vQWwu3XC3bjPcGWjDJb+aU5E KZMw== 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=3w3acXY0ruvQ2cOAk5Y6lKlS5LzTqXqZJuB6w0EA294=; b=pseeP7N6XcCvFIeEqd8/iMTJgjxH/wDvDz81oVnrzqgNSJB/8WMuHUUuXv+OPEOZaI 1qiDFJvU7zYJ/TIqlGNH5RSnO93f/Cq2KVl10YOuE2bNJFP7mzPcWHyOrJb4gGkXyGRI rTzQ7RSPpQOGd7Qpg8t0Owf6/NBtIXXwYxPi6yIu9aQvbs3izwknjmORtsZU26m4GvGQ NqW+P0bQT4Ebpy9ArNcMJwNCqf57IdtYPOAfleIWts6MByOkyzu1AxvnBS5wDFLXJZFT 78jZg6gwLI8SVJj8x+Oi6rO/ZJ7bsyesL8vX0g2BfRI1rPNd/uLn8hmco/Bqz7PAzlAN yUHw== X-Gm-Message-State: AOAM530QZu3P8uXodeyHOWfV9DXWw6hyGfOV8bGTRDoc1u1Ri8aYxrNT OO+37qF+F8mQZwk7W9R3nsqP4vO5 X-Google-Smtp-Source: ABdhPJxhqk6SDQGJkU/TNYIJx17AQr2syQ5Y+J3NJhmvTDGSm/ZNzAFmXitcdYEV3AsxC8vPnrV8xw== X-Received: by 2002:a17:90a:356a:: with SMTP id q97mr1861201pjb.110.1592294155840; Tue, 16 Jun 2020 00:55:55 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id g6sm16168984pfb.164.2020.06.16.00.55.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 00:55:55 -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, 16 Jun 2020 00:55:40 -0700 Message-Id: <20200616075545.312684-2-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200616075545.312684-1-avagin@gmail.com> References: <20200616075545.312684-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200616_005557_986961_425E4EB5 X-CRM114-Status: GOOD ( 14.66 ) 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:1041 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_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_SIGNED Message has a DKIM or DK signature, not necessarily valid -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: 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 Reviewed-by: Dmitry Safonov 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 4e016574bd91..b0aec4e8c9b4 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -108,28 +108,32 @@ static int __vdso_init(enum vdso_abi abi) PAGE_SHIFT; /* Allocate the vDSO pagelist, plus a page for the data. */ - vdso_pagelist = kcalloc(vdso_info[abi].vdso_pages + 1, + vdso_pagelist = kcalloc(vdso_info[abi].vdso_pages, sizeof(struct page *), GFP_KERNEL); if (vdso_pagelist == NULL) return -ENOMEM; - /* Grab the vDSO data page. */ - vdso_pagelist[0] = phys_to_page(__pa_symbol(vdso_data)); - - /* Grab the vDSO code pages. */ pfn = sym_to_pfn(vdso_info[abi].vdso_code_start); for (i = 0; i < vdso_info[abi].vdso_pages; i++) - vdso_pagelist[i + 1] = pfn_to_page(pfn + i); + vdso_pagelist[i] = pfn_to_page(pfn + i); - vdso_info[abi].dm->pages = &vdso_pagelist[0]; - vdso_info[abi].cm->pages = &vdso_pagelist[1]; + vdso_info[abi].cm->pages = vdso_pagelist; return 0; } +static vm_fault_t vvar_fault(const struct vm_special_mapping *sm, + struct vm_area_struct *vma, struct vm_fault *vmf) +{ + if (vmf->pgoff == 0) + return vmf_insert_pfn(vma, vmf->address, + sym_to_pfn(vdso_data)); + return VM_FAULT_SIGBUS; +} + static int __setup_additional_pages(enum vdso_abi abi, struct mm_struct *mm, struct linux_binprm *bprm, @@ -150,7 +154,7 @@ static int __setup_additional_pages(enum vdso_abi abi, } ret = _install_special_mapping(mm, vdso_base, PAGE_SIZE, - VM_READ|VM_MAYREAD, + VM_READ|VM_MAYREAD|VM_PFNMAP, vdso_info[abi].dm); if (IS_ERR(ret)) goto up_fail; @@ -209,6 +213,7 @@ static struct vm_special_mapping aarch32_vdso_maps[] = { #ifdef CONFIG_COMPAT_VDSO [AA32_MAP_VVAR] = { .name = "[vvar]", + .fault = vvar_fault, }, [AA32_MAP_VDSO] = { .name = "[vdso]", @@ -376,6 +381,7 @@ enum aarch64_map { static struct vm_special_mapping aarch64_vdso_maps[] __ro_after_init = { [AA64_MAP_VVAR] = { .name = "[vvar]", + .fault = vvar_fault, }, [AA64_MAP_VDSO] = { .name = "[vdso]", From patchwork Tue Jun 16 07:55:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11606781 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 211F6913 for ; Tue, 16 Jun 2020 07:56:35 +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 DAE4E2074D for ; Tue, 16 Jun 2020 07:56:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UrkltjP5"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HW8gH2+T" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DAE4E2074D 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=KfTVdaA7m1UDO3KwkvRiQ05Qx8pxvHGNI4AAulEQoEY=; b=UrkltjP525GIQy1r0Y88HYsIDL avbe3bl1iAiYTa0+lu6H1xi3OiKpgRBygfh70cmUQJHU8bMstGZHX59WviIRgo48ApeqPUgeIVne8 zbakD09HS74HGYVhPazHDfuHGQc1YneRSqusquc03S8UrfrXrdk7Xojit5WWW8dNsxJp9sutFYqwD aiEDdidB2IJ+VxNcQPwBzHvPwJLHK/jtUAV+YSL/rojs3V82RVNo1EnKwJhUeqIbzwhjGpqi+J9m4 erpaBkv3olS1URqYKV7y+67VOnesH0qWAR1NrKTn+sNeYLv36bbAIxF6bmWOB7zzQXhh0CBAR8/nf xJqzcatA==; 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 1jl6SI-0000W7-Vc; Tue, 16 Jun 2020 07:56:26 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jl6Rp-0008V2-VH for linux-arm-kernel@lists.infradead.org; Tue, 16 Jun 2020 07:55:59 +0000 Received: by mail-pj1-x1041.google.com with SMTP id m2so1169710pjv.2 for ; Tue, 16 Jun 2020 00:55:57 -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=7Pc3zQ9D2av6U7xF9LkytuVQ3TEKU9mvAt7OV64zjjY=; b=HW8gH2+TWNb0LHKZx/L2PoIBSnyiXdbLTjOzJ/095pH2++lNTMOONJ7xnnd0H+jHXW cy2ds/KJlPcq6GvcObZ0FRsBjmMtjKWL04vJrlL98/z3To2opDDDxNgkBGN8RuF7Ae3x 26fr4H4QJtPjynRAQ+ouigUzMUv/iRlDT0tVGf/ctsZen6y3c52pZY+T9a7+kTgc7hfX +JWpN6PEiFPBEQX8/EqL6YsmcotVfmmhSi+4UuWoXiZEhIsClFPnNzka2k7W8rVdpxFy p/t6p2eVOdaj9vQ12Q81vUnfC+XghwjgAFfIukI5h4ap265404FgcNAAVN7Y1VA0acZ9 uP9g== 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=7Pc3zQ9D2av6U7xF9LkytuVQ3TEKU9mvAt7OV64zjjY=; b=TCXlvVRvBMeXzA2k5/djbNZtFuWW7z2LF2ox/KS/c1Ju6rIvEO/irqGS2BQPdUV2rq JuvVAl/ZowjFTexwaU0yPrSbvOZeVu/B4wJ17od/Vuv79diN6s7MHMsq2B6w6qblU10f buTfv+TjjsQ8lP0gPdZRiluDVe62ety57PvCfNGCT5A+zK/aTdHnV75pmv2ZWdaxQZBb sXQJdsSfaLKOTvsafarfldivZwPaK/FucF16MFK8UZ4T9Re54lrLqO6L+yUBjVNjyISI y2vuhZCeGBgjbHN/5GPdnEkbS1nM85mXLuSAQG/YsYbm0abqTcB2PUwl4FMUucy6/2Gb satQ== X-Gm-Message-State: AOAM530n6c1rkLwqeUrx2rB8+2dpKAzKibyb5uc2gr1W6QVNvicSKN6E XaQflKM6rW2ozZPAjO8DMuwMwCf0 X-Google-Smtp-Source: ABdhPJysK/fjxfmRiTrNZmw9EgjGa6tFHoxvuUSFZZaxSjSNA9SxfwRSCAcSao3vO+Osm947ZTQLzw== X-Received: by 2002:a17:90b:3448:: with SMTP id lj8mr1567308pjb.163.1592294157009; Tue, 16 Jun 2020 00:55:57 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id g6sm16168984pfb.164.2020.06.16.00.55.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 00:55:56 -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, 16 Jun 2020 00:55:41 -0700 Message-Id: <20200616075545.312684-3-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200616075545.312684-1-avagin@gmail.com> References: <20200616075545.312684-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200616_005558_000880_81BB1350 X-CRM114-Status: GOOD ( 12.66 ) 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:1041 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_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_SIGNED Message has a DKIM or DK signature, not necessarily valid -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: 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 Reviewed-by: Dmitry Safonov 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 b0aec4e8c9b4..df4bb736d28a 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -125,6 +125,38 @@ static int __vdso_init(enum vdso_abi abi) 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 (mmap_write_lock_killable(mm)) + 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_info[VDSO_ABI_AA64].dm)) + zap_page_range(vma, vma->vm_start, size); +#ifdef CONFIG_COMPAT_VDSO + if (vma_is_special_mapping(vma, vdso_info[VDSO_ABI_AA32].dm)) + zap_page_range(vma, vma->vm_start, size); +#endif + } + + mmap_write_unlock(mm); + return 0; +} +#endif + static vm_fault_t vvar_fault(const struct vm_special_mapping *sm, struct vm_area_struct *vma, struct vm_fault *vmf) { From patchwork Tue Jun 16 07:55:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11606785 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 5F246913 for ; Tue, 16 Jun 2020 07:56:53 +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 2143A206F1 for ; Tue, 16 Jun 2020 07:56:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lOL7Gtqj"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HVStFhta" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2143A206F1 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=0jTOV1YxpABJccTxADDJ7Q4xGjSSU63Cm453EL8Q3Zs=; b=lOL7GtqjWSZsfUHddKayxNZp3X I/rAHW0EzY49G28I2B1L+a7wreJ2Q8TXSUHgmlKXp1HScnejEL7jBD7g6Y0CwNt6RblRYeonhwRpx GHPGG9yeJkVDbL8UrpSiAjfYb93APUE1JQaQOhvehXC7tk62Y3PVb9KJLWDYnQHiayS8yb/iAJrE7 VmcLYsvJKdGQJnlQq2bSfK513XQEmbFBJjCU/ijoUlLPevxKrcWqDLjq36Mdx5H9gXGR+QhaHo2S0 ng8piMbD6DiBwuSN6AJyVV0vIDsbIEXKC5p5u9Y3uJADD8Y6lZVoBP9y7aKz1RSpnpcRXGxA9au8b dUID87aA==; 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 1jl6Sb-0000mF-UB; Tue, 16 Jun 2020 07:56:46 +0000 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jl6Rr-0008Vf-Gc for linux-arm-kernel@lists.infradead.org; Tue, 16 Jun 2020 07:56:01 +0000 Received: by mail-pj1-x1044.google.com with SMTP id u8so1062511pje.4 for ; Tue, 16 Jun 2020 00:55:59 -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=4qJjSzS3qsc/46vw3CAVyVPzMy5PIT8l5/oTWqdt8oo=; b=HVStFhtaoA2oLF72yHWaH/McQnIrOlDwaKg8cD6LXc1gm6z/rS8aECm4aW7xb5L79G SR8v1GrrjvToggZbmD1d9zSXOcnOCLfQXXXa8veQEc9f42hxhzx+iN9S8c7akoRoXVMc 0KX6grxPxdmn9fDmYiHahHxTIMTwBVaxmeiuQ7k4nU95/AiyqpMGGDDShKj7kD3hQ93W bWNIJhfap7tg48tWcNm9oysqFA59xleUGku8kKDhISjmlzTKlcktfup9ZrOPJxO3JN21 Ak+Y4vIL0E0g/3Rsg9W74pZqZa3AEhOqfrEi5FMzfGcFzCm6Pr/9DXTLTsXQg6ipAAoS rRHA== 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=4qJjSzS3qsc/46vw3CAVyVPzMy5PIT8l5/oTWqdt8oo=; b=lzKIa3LBngI2+9sR9LvCK/cOB9CSfF/NAmu76IzoLRz+r1AWqF19ExzAaoVEow4L4f V/5E6gwMJHzgjU3P1KTdrTZVbbe3OEu2o2XV+j9VqCUZjo07ffLxQysxqyqqQUAQN0ru U5TvYwZEngrRMdtMfY7surEbOpqfGJDerM10F+Kjo6RcgriitQxN0IifJQY+ZW/4EWLq mp8srgF2RdeHg9Ibam/CVFxlAASGcFHRcBpgLH1DThA2/B5oFfLcSdi1Qz1B/1FwoYOt r43j4WuC0fRDptRcOy5j/2MbTNA0ekkPKsxAT1qf3o19X5jG+i5XgJU/CBIvKoJZlaF6 j1oA== X-Gm-Message-State: AOAM531k7G53Bt2avxMoFUq8TncSGeQgE0VAuLTsP6euuevjtmURwO5z MJTENIUEfd13IBiIE7TQZn0A6PhC X-Google-Smtp-Source: ABdhPJw8nrhSAbQv6U6JtmU757YOBHe90s7/C0KYZ4X97oly+vlar7iFJYWGJ/U5Y0JhYw5w0OSwgg== X-Received: by 2002:a17:902:7204:: with SMTP id ba4mr1003927plb.250.1592294158483; Tue, 16 Jun 2020 00:55:58 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id g6sm16168984pfb.164.2020.06.16.00.55.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 00:55:58 -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, 16 Jun 2020 00:55:42 -0700 Message-Id: <20200616075545.312684-4-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200616075545.312684-1-avagin@gmail.com> References: <20200616075545.312684-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200616_005559_551289_278CD334 X-CRM114-Status: GOOD ( 20.83 ) 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:1044 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_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_SIGNED Message has a DKIM or DK signature, not necessarily valid -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: 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 Reviewed-by: Dmitry Safonov Signed-off-by: Andrei Vagin --- arch/arm64/include/asm/vdso.h | 2 ++ .../include/asm/vdso/compat_gettimeofday.h | 12 ++++++++++++ arch/arm64/include/asm/vdso/gettimeofday.h | 8 ++++++++ arch/arm64/kernel/vdso.c | 19 ++++++++++++++++--- arch/arm64/kernel/vdso/vdso.lds.S | 5 ++++- arch/arm64/kernel/vdso32/vdso.lds.S | 5 ++++- include/vdso/datapage.h | 1 + 7 files changed, 47 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/vdso.h b/arch/arm64/include/asm/vdso.h index 07468428fd29..f99dcb94b438 100644 --- a/arch/arm64/include/asm/vdso.h +++ b/arch/arm64/include/asm/vdso.h @@ -12,6 +12,8 @@ */ #define VDSO_LBASE 0x0 +#define __VVAR_PAGES 2 + #ifndef __ASSEMBLY__ #include diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h index b6907ae78e53..b7c549d46d18 100644 --- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h +++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h @@ -152,6 +152,18 @@ static __always_inline const struct vdso_data *__arch_get_vdso_data(void) return ret; } +#ifdef CONFIG_TIME_NS +static __always_inline const struct vdso_data *__arch_get_timens_vdso_data(void) +{ + const struct vdso_data *ret; + + /* See __arch_get_vdso_data(). */ + asm volatile("mov %0, %1" : "=r"(ret) : "r"(_timens_data)); + + return ret; +} +#endif + #endif /* !__ASSEMBLY__ */ #endif /* __ASM_VDSO_GETTIMEOFDAY_H */ diff --git a/arch/arm64/include/asm/vdso/gettimeofday.h b/arch/arm64/include/asm/vdso/gettimeofday.h index afba6ba332f8..cf39eae5eaaf 100644 --- a/arch/arm64/include/asm/vdso/gettimeofday.h +++ b/arch/arm64/include/asm/vdso/gettimeofday.h @@ -96,6 +96,14 @@ const struct vdso_data *__arch_get_vdso_data(void) return _vdso_data; } +#ifdef CONFIG_TIME_NS +static __always_inline +const struct vdso_data *__arch_get_timens_vdso_data(void) +{ + return _timens_data; +} +#endif + #endif /* !__ASSEMBLY__ */ #endif /* __ASM_VDSO_GETTIMEOFDAY_H */ diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index df4bb736d28a..14d5b7642b62 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -40,6 +40,12 @@ enum vdso_abi { #endif /* CONFIG_COMPAT_VDSO */ }; +enum vvar_pages { + VVAR_DATA_PAGE_OFFSET, + VVAR_TIMENS_PAGE_OFFSET, + VVAR_NR_PAGES, +}; + struct vdso_abi_info { const char *name; const char *vdso_code_start; @@ -126,6 +132,11 @@ static int __vdso_init(enum vdso_abi abi) } #ifdef CONFIG_TIME_NS +struct vdso_data *arch_get_vdso_data(void *vvar_page) +{ + return (struct vdso_data *)(vvar_page); +} + /* * The vvar page layout depends on whether a task belongs to the root or * non-root time namespace. Whenever a task changes its namespace, the VVAR @@ -175,9 +186,11 @@ static int __setup_additional_pages(enum vdso_abi abi, unsigned long gp_flags = 0; void *ret; + BUILD_BUG_ON(VVAR_NR_PAGES != __VVAR_PAGES); + vdso_text_len = vdso_info[abi].vdso_pages << PAGE_SHIFT; /* Be sure to map the data page */ - vdso_mapping_len = vdso_text_len + PAGE_SIZE; + vdso_mapping_len = vdso_text_len + VVAR_NR_PAGES * PAGE_SIZE; vdso_base = get_unmapped_area(NULL, 0, vdso_mapping_len, 0, 0); if (IS_ERR_VALUE(vdso_base)) { @@ -185,7 +198,7 @@ static int __setup_additional_pages(enum vdso_abi abi, goto up_fail; } - ret = _install_special_mapping(mm, vdso_base, PAGE_SIZE, + ret = _install_special_mapping(mm, vdso_base, VVAR_NR_PAGES * PAGE_SIZE, VM_READ|VM_MAYREAD|VM_PFNMAP, vdso_info[abi].dm); if (IS_ERR(ret)) @@ -194,7 +207,7 @@ static int __setup_additional_pages(enum vdso_abi abi, if (IS_ENABLED(CONFIG_ARM64_BTI_KERNEL) && system_supports_bti()) gp_flags = VM_ARM64_BTI; - vdso_base += PAGE_SIZE; + vdso_base += VVAR_NR_PAGES * PAGE_SIZE; mm->context.vdso = (void *)vdso_base; ret = _install_special_mapping(mm, vdso_base, vdso_text_len, VM_READ|VM_EXEC|gp_flags| diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S index 7ad2d3a0cd48..d808ad31e01f 100644 --- a/arch/arm64/kernel/vdso/vdso.lds.S +++ b/arch/arm64/kernel/vdso/vdso.lds.S @@ -17,7 +17,10 @@ OUTPUT_ARCH(aarch64) SECTIONS { - PROVIDE(_vdso_data = . - PAGE_SIZE); + PROVIDE(_vdso_data = . - __VVAR_PAGES * PAGE_SIZE); +#ifdef CONFIG_TIME_NS + PROVIDE(_timens_data = _vdso_data + PAGE_SIZE); +#endif . = VDSO_LBASE + SIZEOF_HEADERS; .hash : { *(.hash) } :text diff --git a/arch/arm64/kernel/vdso32/vdso.lds.S b/arch/arm64/kernel/vdso32/vdso.lds.S index a3944927eaeb..06cc60a9630f 100644 --- a/arch/arm64/kernel/vdso32/vdso.lds.S +++ b/arch/arm64/kernel/vdso32/vdso.lds.S @@ -17,7 +17,10 @@ OUTPUT_ARCH(arm) SECTIONS { - PROVIDE_HIDDEN(_vdso_data = . - PAGE_SIZE); + PROVIDE_HIDDEN(_vdso_data = . - __VVAR_PAGES * PAGE_SIZE); +#ifdef CONFIG_TIME_NS + PROVIDE_HIDDEN(_timens_data = _vdso_data + PAGE_SIZE); +#endif . = VDSO_LBASE + SIZEOF_HEADERS; .hash : { *(.hash) } :text diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h index 7955c56d6b3c..ee810cae4e1e 100644 --- a/include/vdso/datapage.h +++ b/include/vdso/datapage.h @@ -109,6 +109,7 @@ struct vdso_data { * relocation, and this is what we need. */ extern struct vdso_data _vdso_data[CS_BASES] __attribute__((visibility("hidden"))); +extern struct vdso_data _timens_data[CS_BASES] __attribute__((visibility("hidden"))); /* * The generic vDSO implementation requires that gettimeofday.h From patchwork Tue Jun 16 07:55:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11606787 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 2135760D for ; Tue, 16 Jun 2020 07:57: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 EF308206D7 for ; Tue, 16 Jun 2020 07:57:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DDTdFIjh"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dUudr8te" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF308206D7 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=1lsK/crvWq6GYfnuiG3p/oFVCb0GW1HQEwwm9HJV2eQ=; b=DDTdFIjh0g6T2ih4IuHATUTKnE MkIjXWgCum92nbxM9EyiPgbijaxEy9mAuAr1UOmwM24/UoKx4Z48Fc1OM5qtJ1kVVmlMWHH7ED2dK za7fwnSpIRhT9AzMn5dP2Hjkacb0r/otfBOZzY+5MipxF+l+Apq2FzAQ6O+V2FLqarrz860sD2VgS emzGkvvY+43GqgCUD8VE4nMWV8a5lq+MJWtLMQYc6A3ja65o1aeEj53zH3T6qO5/wj1cqQNjdf97I FRsQ3Hjwrzj5XKDn0oX+Pkk8p3gqAoCeg0Mx67gDxlOAEE7ZaE9JNRgGjpfdFrMEv642M4G3ihS0P CBI7WBPA==; 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 1jl6Sn-0000yc-DC; Tue, 16 Jun 2020 07:56:57 +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 1jl6Rs-0008WV-U3 for linux-arm-kernel@lists.infradead.org; Tue, 16 Jun 2020 07:56:02 +0000 Received: by mail-pj1-x1042.google.com with SMTP id h22so1172588pjf.1 for ; Tue, 16 Jun 2020 00:56:00 -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=8oQ1io/qQi+y3itntJsBYA2dRhXjx47tAO/g5lp+Xfc=; b=dUudr8tehj5H24uL5Ho0iwb+sZ5G6JJdKuZ/zEFCnEYnP0ATralz+E+Z8at+Z8YTJh ROT3Vnf0VnaKvwVQY2AdbYf9YmGavQkooUekLQkRuZykW0uHVxr4fC+R8O9NAHTympvy C1zyK5SJO9VhTxh5y3BLeq0yb3AnXqjj0dJmSvT+gpdYtVoXxG2fA6ZQRjyZ57VMhIWK 6kLdGdvV2+vyWs5VUAJ3tYdVeKju9EG1K4rQnQF+O3/8Vp+kSc5lm9z7SEnarZZohFIt DWl0nIOa7kJ/aODibBgLCCK2xJ1JWkFjqA3hQ1nmIWRwU2B0k1dwPECsOyq4/KcfSjJM +BTw== 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=8oQ1io/qQi+y3itntJsBYA2dRhXjx47tAO/g5lp+Xfc=; b=cuIZkHxAZaVRXPpOO2vgbdG+PFRe5fYqE+igB7xw6X06phjqQ1DfA6VaeOic28QJiU xlTVKugT6FM0Hee/TkNBdnxcLTkMssoAe+AB4bxvcC8qG21dG5xUSsI4Ehkdd8yogvAX 7h1TCCs8jx4OctASgUR/vV8vFTLR79Fis8C6ryC3Nj5NO0bBd7hDIET0cN9qwYUnuvli bxeoBzArAtn10pfG9HKy5vHcKjCNwmW57v6JrjxJ+MfwsoYImcuhFXQ5Vw+g6w/bb7tq iKbxUHePtixf3rQ6Q6EzxAdpuolr0lEBI0iWkIbd7a+kiYNyr6TN4nzK96YXBLFgUVsO daDg== X-Gm-Message-State: AOAM532jYmQpI0uXN41umzdpuPDI/1crlWeO5BmYMdducS/iXDhc9Alq rAmzkAPy2bsJ7fn4EqfMdS25eU1F X-Google-Smtp-Source: ABdhPJyBbHCAFPTNgi+mnpbvSvrE+TrECh5PjtavYN/bmJ9l5eb5ApOgY5NzKWJ5Wy7Yqg/KjNDG+A== X-Received: by 2002:a17:90b:23c6:: with SMTP id md6mr1884893pjb.122.1592294159866; Tue, 16 Jun 2020 00:55:59 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id g6sm16168984pfb.164.2020.06.16.00.55.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 00:55:59 -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, 16 Jun 2020 00:55:43 -0700 Message-Id: <20200616075545.312684-5-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200616075545.312684-1-avagin@gmail.com> References: <20200616075545.312684-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200616_005600_973630_2F4B0A41 X-CRM114-Status: GOOD ( 14.97 ) 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_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_SIGNED Message has a DKIM or DK signature, not necessarily valid -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: 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 Reviewed-by: Dmitry Safonov Signed-off-by: Andrei Vagin --- arch/arm64/kernel/vdso.c | 57 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index 14d5b7642b62..21bdd0d74f40 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -166,15 +167,63 @@ int vdso_join_timens(struct task_struct *task, struct time_namespace *ns) mmap_write_unlock(mm); return 0; } + +static struct page *find_timens_vvar_page(struct vm_area_struct *vma) +{ + if (likely(vma->vm_mm == current->mm)) + return current->nsproxy->time_ns->vvar_page; + + /* + * VM_PFNMAP | VM_IO protect .fault() handler from being called + * through interfaces like /proc/$pid/mem or + * process_vm_{readv,writev}() as long as there's no .access() + * in special_mapping_vmops(). + * For more details check_vma_flags() and __access_remote_vm() + */ + + WARN(1, "vvar_page accessed remotely"); + + return NULL; +} +#else +static inline struct page *find_timens_vvar_page(struct vm_area_struct *vma) +{ + return NULL; +} #endif static vm_fault_t vvar_fault(const struct vm_special_mapping *sm, struct vm_area_struct *vma, struct vm_fault *vmf) { - if (vmf->pgoff == 0) - return vmf_insert_pfn(vma, vmf->address, - sym_to_pfn(vdso_data)); - return VM_FAULT_SIGBUS; + struct page *timens_page = find_timens_vvar_page(vma); + unsigned long pfn; + + switch (vmf->pgoff) { + case VVAR_DATA_PAGE_OFFSET: + if (timens_page) + pfn = page_to_pfn(timens_page); + else + pfn = sym_to_pfn(vdso_data); + break; +#ifdef CONFIG_TIME_NS + case VVAR_TIMENS_PAGE_OFFSET: + /* + * If a task belongs to a time namespace then a namespace + * specific VVAR is mapped with the VVAR_DATA_PAGE_OFFSET and + * the real VVAR page is mapped with the VVAR_TIMENS_PAGE_OFFSET + * offset. + * See also the comment near timens_setup_vdso_data(). + */ + if (!timens_page) + return VM_FAULT_SIGBUS; + pfn = sym_to_pfn(vdso_data); + break; +#endif /* CONFIG_TIME_NS */ + default: + return VM_FAULT_SIGBUS; + } + + return vmf_insert_pfn(vma, vmf->address, pfn); } static int __setup_additional_pages(enum vdso_abi abi, From patchwork Tue Jun 16 07:55:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11606789 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 E8A6A60D for ; Tue, 16 Jun 2020 07:57:23 +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 ACF8F206D7 for ; Tue, 16 Jun 2020 07:57:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cZFPCih2"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jAeqV5Hh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACF8F206D7 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=5dLHcGZSqAQuysiU789l6fzNh1bLp2gzvVbJMdGwv+Y=; b=cZFPCih2n3Oz4EGgmjwVJzBdIv QLoWY1LmObq4DlxSNZa7UDRfND9dofbdGeK9eknF76jWhwn+3LzaOQgJGwh4oNhPpuCplSiULh7iw I/AR4prpuAQsqVVPBj33lvCzfU+SSQIjmn71UyNZAInTZEZ0HnGiE8IDNhWU4rSPwsOdIsuiWAixO RCVm/0OAgPKFvjACBFrGi71RFHJWhNFhH+s42aggUbG0IClQhyyf+PP7GA/iLWTy3qF9pjrUe77V6 wSI5Bdf3JH0P7rKmBRjB5TJ+SSEk+oKfehSQI9wxqnUpHYOi1D/zPJAwNqr4CKZA0+7bWNGXFma4k LnAlnzng==; 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 1jl6T6-0001HQ-My; Tue, 16 Jun 2020 07:57:16 +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 1jl6Ru-00006o-JP for linux-arm-kernel@lists.infradead.org; Tue, 16 Jun 2020 07:56:04 +0000 Received: by mail-pj1-x1042.google.com with SMTP id u8so1062552pje.4 for ; Tue, 16 Jun 2020 00:56:02 -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=hOFeWxf8l/srSoyQCmE9FGPNMQ1rcx/B9OKWA2Lr1tw=; b=jAeqV5HhZyYxsZ6KIgb17STQuBSzaVIfIkrSMQqXQaIfT/6CO29PLWJ41t8hnU2hZ6 RRlwvDlZ762LVTmAA/TnYh8g2Qz9mmqGZP9VJOMhmuHLLDqAwzOYo5y0M2+PYMo6+Fd4 hq9WbgYrztbgiLFbhTFTFgpUIaqSg8a1GhgBxFlTYgf/J/hHUnGx+2QqZlBY+J4ASr1T uRe9p0Tv+7dA8VR02tJ0/q8G1mKuUzhjB/I0us9MRRnC+D9ag7v8aB+Ylc6YSHSN19Ta 6Mf3lUNDx5PL5k3VXxcFQcxY6zZfR3xNSHcXXXk373+q6KyZGheOSNoVEnY5aUukplNE 7jWA== 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=hOFeWxf8l/srSoyQCmE9FGPNMQ1rcx/B9OKWA2Lr1tw=; b=YsO+N/sFe3c7OTUc4XlE7oZULeV1/o9AaimxZrAiql55ZEoUdm3Uo0f57g5ejOjhGB 2kCLGPOBZCY5UDC3IK8xlfsa2lpcVxZLpkvmArh2ZyeIOKr9irZsIMAJKGCJMYgV90WG LXdrHVcOOYLIrW5HcydlQCWbtI4rW1wv17IAUC5U4ejNww+ceKUWKVMBInMOZ9x7ceom w114+pxOSUzWylN/8u3iLQXtIo7PP/a3GLTTXrKtw2/AHLNrgig2rWf0vdPcLkL3RuXl RCwiw/Zd9SPr5DX1gkuPLBW3Vkc2Nh8GV8E9tic3fDOxYmOQ34AKyPcuwQ6PEwovD2JT zALA== X-Gm-Message-State: AOAM531k0Anv8+6xsjQrzjv+CEeon0pD6dpc304wrlc0qYELko5j+gBg TLU8Ccl3/54PTOCYkTrmMQelNErr X-Google-Smtp-Source: ABdhPJwOLCQsaIcJ1fFhE4hHC2egwIAnM+ejAPlFCeoi+Hbz5kYsARxJoXcjq2ZGwtsHiTohUaG5vw== X-Received: by 2002:a17:90b:3612:: with SMTP id ml18mr1671017pjb.153.1592294161414; Tue, 16 Jun 2020 00:56:01 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id g6sm16168984pfb.164.2020.06.16.00.56.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 00:56:00 -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, 16 Jun 2020 00:55:44 -0700 Message-Id: <20200616075545.312684-6-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200616075545.312684-1-avagin@gmail.com> References: <20200616075545.312684-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200616_005602_722558_8BC5DD76 X-CRM114-Status: GOOD ( 11.72 ) 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_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_SIGNED Message has a DKIM or DK signature, not necessarily valid -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: 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 Reviewed-by: Dmitry Safonov Signed-off-by: Andrei Vagin --- arch/arm64/kernel/vdso.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index 21bdd0d74f40..68e021324113 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -226,6 +226,17 @@ static vm_fault_t vvar_fault(const struct vm_special_mapping *sm, return vmf_insert_pfn(vma, vmf->address, pfn); } +static int vvar_mremap(const struct vm_special_mapping *sm, + struct vm_area_struct *new_vma) +{ + unsigned long new_size = new_vma->vm_end - new_vma->vm_start; + + if (new_size != VVAR_NR_PAGES * PAGE_SIZE) + return -EINVAL; + + return 0; +} + static int __setup_additional_pages(enum vdso_abi abi, struct mm_struct *mm, struct linux_binprm *bprm, @@ -308,6 +319,7 @@ static struct vm_special_mapping aarch32_vdso_maps[] = { [AA32_MAP_VVAR] = { .name = "[vvar]", .fault = vvar_fault, + .mremap = vvar_mremap, }, [AA32_MAP_VDSO] = { .name = "[vdso]", @@ -476,6 +488,7 @@ static struct vm_special_mapping aarch64_vdso_maps[] __ro_after_init = { [AA64_MAP_VVAR] = { .name = "[vvar]", .fault = vvar_fault, + .mremap = vvar_mremap, }, [AA64_MAP_VDSO] = { .name = "[vdso]", From patchwork Tue Jun 16 07:55:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11606791 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 F15F760D for ; Tue, 16 Jun 2020 07:57: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 CF2FC206D7 for ; Tue, 16 Jun 2020 07:57: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="M2c6BNv+"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kvnIEHlY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF2FC206D7 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=K22yFfwjbopm22D0IzkWwRupJwOF9zMeP0kXwy7NKR4=; b=M2c6BNv+MgJoG7IsoEgM1jzgQ0 yuFHQJIJJQZT7v2tCwxSZGDdXPodjMLwH7B2LscmrxhZJnbBFb1rB4m+WtaNlfPZ79EdjR9jp8DM1 wiSxDGE0eczqLyamvhH1XiSFVAHFFy1kR8TwO+GpwJNZEtVSod6HvWOaPCOKCEgTIs+kDaHIdbY28 Uk5YX/Ci3U45WLIdQ51Itf1Ipu7TFjUFiUf/7fyejJQrxzewwhCvD5v2WR/G9vFkd77K4UuZg+rJC h/lr43nCb75iWw+5nCXBN2o1wSoIYWUTy9oOzoP/zTOHXQw7g/GIq5L4pjTJhHFdaHTpjl1ltqhVz kbthkmSg==; 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 1jl6TJ-0001Vf-DT; Tue, 16 Jun 2020 07:57:29 +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 1jl6Rw-000090-Ih for linux-arm-kernel@lists.infradead.org; Tue, 16 Jun 2020 07:56:05 +0000 Received: by mail-pl1-x641.google.com with SMTP id m7so8023831plt.5 for ; Tue, 16 Jun 2020 00:56:03 -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=nMU0QpWstwt4mPNSQHpH9spCG7iWFS4Lj2/e7Jbs4Y8=; b=kvnIEHlYsYhqIQvEykdlOvGT5aFbVPQ0I5NSmr0OO2ZOpjGbjlD36ksZRVkRxfowl9 vgkH+aovCyNbmpHJcp3be1kpq9U1Nv3Bad7lLecV29/XunIvflIvYslGhmKAjiJOCBRm C3bDW7XceDDovvrB/IiUWpKSzdzSpXuxP+unqJWwgQqkxjfKzJn330cfoAWgdMf4OaiJ 458bRdJeljnBWXvbodsbPhT2j1R8ZcUzFhv09FLb6JMqfIzAjlzgWoHZOmZiFdyJCiG/ 8qT6PuT7ruWMKRCrJ74s9thXxHq2OxvN48cQKvrXqkOUypNbwRPGRbIMOsQrESEK2fGJ ZIlg== 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=nMU0QpWstwt4mPNSQHpH9spCG7iWFS4Lj2/e7Jbs4Y8=; b=t8wzOrDjY9F8dH15YLAnG4YyMzNnQOdIJSbo3jS8GOOduKuxNmdfok4BQOLXaS6+lw zGBHnvViw/by356YRZP7L1C0MwrF7MD+z3oCRia2lHu1YLs5ACUHXm4S7lUZclKjuF67 zZF17X9GbYLXHj50XbnEhQ6cCxi6b34lqyE0pom6ZIkJNmSG7lOV79mZdnCElbDjYrgT uwlFFkT616I18a8jlN+nsU6VOZ4BgGmwLHvEJMYB9Pa4VQ4G+sNJJ72eW+gvEKsT+4rn ljVxVSRwb7XOnaBjsUmbAHOXU6zWyPA42OIgiJeHQQB6HQNT+eQG65MmgfKMdAZGoVZx UUSg== X-Gm-Message-State: AOAM532Y5kCAdcdLb3GVby+oDdcAEf29SmoUKXFdmlF1Fe5h8JF04FAB 2DKSB6FzVXQUqhqVFK1pwG0s2119 X-Google-Smtp-Source: ABdhPJx9ESgFJYgJixb9EpAL0K0/DKoBFxAGTlq4+BbivpEmofTqN4UTPSDg8vPFiadrqeTQricL4g== X-Received: by 2002:a17:902:ab98:: with SMTP id f24mr1108812plr.154.1592294162652; Tue, 16 Jun 2020 00:56:02 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id g6sm16168984pfb.164.2020.06.16.00.56.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 00:56:02 -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, 16 Jun 2020 00:55:45 -0700 Message-Id: <20200616075545.312684-7-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200616075545.312684-1-avagin@gmail.com> References: <20200616075545.312684-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200616_005604_622950_259561C2 X-CRM114-Status: GOOD ( 10.09 ) 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_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_SIGNED Message has a DKIM or DK signature, not necessarily valid -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: 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 Reviewed-by: Dmitry Safonov Signed-off-by: Andrei Vagin --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 31380da53689..e3956cbfd8a9 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -118,6 +118,7 @@ config ARM64 select GENERIC_STRNLEN_USER select GENERIC_TIME_VSYSCALL select GENERIC_GETTIMEOFDAY + select GENERIC_VDSO_TIME_NS select HANDLE_DOMAIN_IRQ select HARDIRQS_SW_RESEND select HAVE_PCI