From patchwork Thu Apr 16 05:26:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11492277 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 63B7B6CA for ; Thu, 16 Apr 2020 05:27:07 +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 1A16C2076A for ; Thu, 16 Apr 2020 05:27:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="I/BCZdYu"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HUErtq3U" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A16C2076A 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=I9yb+rZUPjSayKNHDd/ntAuTLZjbMwtCQJRlaBfbpl8=; b=I/BCZdYuB5N/abp3SwJ9W1WquF menLeHgIB3sjMplBqxsCOq1BylqfKLCmoKA93Opz/UP+Dw5udzdCWs6aHu/yB7dmC9/WFLURxlyKx Q3v4XFuv4sVZk1mUb6hCY6AFnaBu6LK8tx6FOa2wxqBsrFmvhi5Yqz1MJDYfgOeqC9o1hc9Xb4IOb 02MZ0XRLodbYcJvsMdi3KM1Mh9uK5gHMYYAPOY/gdTLVF8hphM6zQCDeh+8/J2EoAOQhDa1YOfTg4 uVgdXEpAB5farwu462VnOWxB4tIS9oIoJvP0Mwv/ImzWGBKP1rDPLBLwSy3BO3pJl/cz0YgwzBNIO U9oM40gw==; 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 1jOx3C-0006ts-7b; Thu, 16 Apr 2020 05:26:58 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOx2y-0006fm-Lf for linux-arm-kernel@lists.infradead.org; Thu, 16 Apr 2020 05:26:45 +0000 Received: by mail-pl1-x644.google.com with SMTP id w3so951834plz.5 for ; Wed, 15 Apr 2020 22:26:44 -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=oYx3rFG6KM20BdDmNDmRew1PF1Kw/jTeIMBMcMn6Uag=; b=HUErtq3UvZ5uwOow+WJX2AdXLUZNH3EYTmjk1UnWAicVd/8Oq4rS+5iZT/pPWIgopr 9vtmrNOLGfSrNontxw2/IvOKbuFu7qJJfOp4VFegTfW17BiCSbbuFDoxOZhIezEuq7ft w1VYv0JrqmzhoTrE4ru74gTH76FFMWJCCXRPIenWlCbIVXKKjC9m82YAZ2Xd1g0aVlSw LcpbVAKIdnCq23MpjjQGF3uHQqJDX1ebFQC6m06JL7NDw1aXI34fUprRI4+mhYHq6H+D GzDf7ykQ9EKJ7NkvyTfird2NPNLRVH6h6KmXbhygnHQ669kjabD1gkP7f/5QmNMgnrP5 zWzw== 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=oYx3rFG6KM20BdDmNDmRew1PF1Kw/jTeIMBMcMn6Uag=; b=bIM6yjFj38dyP2N10w3M5yFSHHiyVJ2rtYNpSzSow7LOd0PWRjRP8rrax1QEkDDtVK gxbus9V6024DfY/SImIlXAhSiKNs/siW6TpQt5ZVVqOQnuLD5l/5ywJZydTgK+4mu6tK YcfZ4uzklW7ly6VzB2o9wZSmtoof2++vzrCa4DcLSqah6lcvLjWOB7JPg/bs5LNZh7Mt J25HDd90cT6P6ot5JLNZEwmPdE++KDrAUwiN6L/2HLNad4DMV/5K5hMY37Uy5ojH+qPH Plz8W8cnUu0rBNJrk//1PoLCWl75Hn6pw4todzrTP2cGW9g9sGvAYMUVDQ6M/q4lbJ1v MoKQ== X-Gm-Message-State: AGi0PuYxl+fzlT4agAfVkH8TCs8yJkYrUlyNaGifJV8iUsgnhg5VB+Lp f7UXQ2kLLyEbtsr0sQsNm5Q= X-Google-Smtp-Source: APiQypK/2FwQOgHFn/PlAUl6famODzCE4lTGQ6yxpTUvumbVbDZFXkExYLzU004YRAurasnvaR75mg== X-Received: by 2002:a17:90a:cc2:: with SMTP id 2mr3160651pjt.33.1587014803490; Wed, 15 Apr 2020 22:26:43 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id c21sm53699pjr.2.2020.04.15.22.26.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 22:26:43 -0700 (PDT) From: Andrei Vagin To: Vincenzo Frascino , Catalin Marinas , Will Deacon Subject: [PATCH 1/6] arm64/vdso: use the fault callback to map vvar pages Date: Wed, 15 Apr 2020 22:26:13 -0700 Message-Id: <20200416052618.804515-2-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200416052618.804515-1-avagin@gmail.com> References: <20200416052618.804515-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200415_222644_704974_1C06F251 X-CRM114-Status: GOOD ( 15.05 ) 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:644 listed in] [list.dnswl.org] 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.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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 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 , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 354b11e27c07..290c36d74e03 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -114,28 +114,32 @@ static int __vdso_init(enum arch_vdso_type arch_index) PAGE_SHIFT; /* Allocate the vDSO pagelist, plus a page for the data. */ - vdso_pagelist = kcalloc(vdso_lookup[arch_index].vdso_pages + 1, + vdso_pagelist = kcalloc(vdso_lookup[arch_index].vdso_pages, sizeof(struct page *), GFP_KERNEL); if (vdso_pagelist == NULL) return -ENOMEM; - /* Grab the vDSO data page. */ - vdso_pagelist[0] = phys_to_page(__pa_symbol(vdso_data)); - - /* Grab the vDSO code pages. */ pfn = sym_to_pfn(vdso_lookup[arch_index].vdso_code_start); for (i = 0; i < vdso_lookup[arch_index].vdso_pages; i++) - vdso_pagelist[i + 1] = pfn_to_page(pfn + i); + vdso_pagelist[i] = pfn_to_page(pfn + i); - vdso_lookup[arch_index].dm->pages = &vdso_pagelist[0]; - vdso_lookup[arch_index].cm->pages = &vdso_pagelist[1]; + vdso_lookup[arch_index].cm->pages = vdso_pagelist; return 0; } +static vm_fault_t vvar_fault(const struct vm_special_mapping *sm, + struct vm_area_struct *vma, struct vm_fault *vmf) +{ + if (vmf->pgoff == 0) + return vmf_insert_pfn(vma, vmf->address, + sym_to_pfn(vdso_data)); + return VM_FAULT_SIGBUS; +} + static int __setup_additional_pages(enum arch_vdso_type arch_index, struct mm_struct *mm, struct linux_binprm *bprm, @@ -155,7 +159,7 @@ static int __setup_additional_pages(enum arch_vdso_type arch_index, } ret = _install_special_mapping(mm, vdso_base, PAGE_SIZE, - VM_READ|VM_MAYREAD, + VM_READ|VM_MAYREAD|VM_PFNMAP, vdso_lookup[arch_index].dm); if (IS_ERR(ret)) goto up_fail; @@ -215,6 +219,7 @@ static struct vm_special_mapping aarch32_vdso_spec[C_PAGES] = { #ifdef CONFIG_COMPAT_VDSO { .name = "[vvar]", + .fault = vvar_fault, }, { .name = "[vdso]", @@ -396,6 +401,7 @@ static int vdso_mremap(const struct vm_special_mapping *sm, static struct vm_special_mapping vdso_spec[A_PAGES] __ro_after_init = { { .name = "[vvar]", + .fault = vvar_fault, }, { .name = "[vdso]", From patchwork Thu Apr 16 05:26:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11492279 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 1B4876CA for ; Thu, 16 Apr 2020 05:27: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 D69922076A for ; Thu, 16 Apr 2020 05:27:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dLJVCQkD"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nEFR40jz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D69922076A 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=1umFAaieuWkWxx4C0o1h/E/mED4NLiQnm0Ex8BcsyY8=; b=dLJVCQkDlyQfigV14W6YsfPx/n TLkvvaBEDsqfnr9Dr83yydhA2f+AhBl43lRjYfrvOEx5/smi/jgYlxccIsGo5B+RNDlwe8CDfcgBp j38LFjU6tcEIvBg8uE5JDpnCR9ePX6ZA1rVxt7U2+fEfkZZ85S5NL5pGna7Py7lZu7U0STyQ8H4eo 8vAM1ng6R463tdljk5lHV6Y6h04opwkUrz1reoYOBn1oyIrKbgewpjEc7B0qUGBfsMyTXaV+Zr/D+ 6SrkflRB6v2gELVszicTIJbOT0xm1z2vH1VrqMaIc0h/GdNxoEYjLptE3ePodOZ8w8zNx9qb+3YZL 3GZD9C5Q==; 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 1jOx3W-0007D8-OO; Thu, 16 Apr 2020 05:27:18 +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 1jOx2z-0006g9-Rv for linux-arm-kernel@lists.infradead.org; Thu, 16 Apr 2020 05:26:47 +0000 Received: by mail-pj1-x1042.google.com with SMTP id cl8so869877pjb.3 for ; Wed, 15 Apr 2020 22:26:45 -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=Qrvi9cfOMWugmztCzSRhVUwuOgDWuroc1zUU7Jui6fE=; b=nEFR40jzawzbAo86Fn7AlbI47j6RcYuIHU57HJodL+mJEh/+ODMMd0houcnmMRTDQm CmNFos10maNtWktoQ/xvzPG0knqvXQR5Lj9P5NaI9lto16D140T3cud32vm4qRGYF7aN bEkIpF0d16foHYOPyDCbUIK3CCmetinOblwsamt90Rqtvta2GkhCPmXmU5J1HVybRdOS kYRb/4ivlnxk16x/UPxjYKNWtKjCOjYObTVuJbBg5kpbuaOmNH2E4JA4HXkXE7nemtEG BOZsq2UU0iOk8vh8GdP0OUNqkZjolusbFMks/2NAmsEHRaHca+9q2Ya9SzKX/Xd+A5FO fBLQ== 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=Qrvi9cfOMWugmztCzSRhVUwuOgDWuroc1zUU7Jui6fE=; b=nYCK/7fPH+KLPA+QZlTEuGB2BU2WRbo2U8BodX/cAC6noq8DzUJDacn87MLluS6mjr TcbY5xrq8iEk+K7njbhq4PgQTYt7acj9C47vLiss0FklZNPBsd9WAVEpmA6xx7iNB6E0 jgRkDgbrH8I0EhXzbUUC5UjQFR25ajtfdOwIbUDjRECmcYYRoAKrVNySuUK4ip0SEUc3 aOw/pyLF8MOzlrqYYScuXebBl6EJb0xQ2T2ICuG0qz/wtMAHaiZ4jeytCaybpcmLI4KA 5Vsushs5/GHKzMkuTzRvDXy+uOM9gDhh1ITJIpRBoZ0rf9ZhwN7JwBOCi25ShAUtzISJ xLRQ== X-Gm-Message-State: AGi0PuZ2t6jJ97dV08Be5KYXnHwwF5j5GxkU6r1g227+XLxWQxdVBBwA 2DdvtmMxpW/12OAV98SlbXU= X-Google-Smtp-Source: APiQypKao4SzdhZEtr7vlpmK90LbMhqJidYVNIjSwySwr3ySDyw4BnlPpNR50T9Hw+R9x2EN5QA2EA== X-Received: by 2002:a17:90a:3726:: with SMTP id u35mr3113764pjb.162.1587014804922; Wed, 15 Apr 2020 22:26:44 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id c21sm53699pjr.2.2020.04.15.22.26.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 22:26:44 -0700 (PDT) From: Andrei Vagin To: Vincenzo Frascino , Catalin Marinas , Will Deacon Subject: [PATCH 2/6] arm64/vdso: Zap vvar pages when switching to a time namespace Date: Wed, 15 Apr 2020 22:26:14 -0700 Message-Id: <20200416052618.804515-3-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200416052618.804515-1-avagin@gmail.com> References: <20200416052618.804515-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200415_222645_900429_CDD4E9AB X-CRM114-Status: GOOD ( 13.27 ) 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_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.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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 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 , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The 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 290c36d74e03..6ac9cdeac5be 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -131,6 +131,38 @@ static int __vdso_init(enum arch_vdso_type arch_index) return 0; } +#ifdef CONFIG_TIME_NS +/* + * The vvar page layout depends on whether a task belongs to the root or + * non-root time namespace. Whenever a task changes its namespace, the VVAR + * page tables are cleared and then they will re-faulted with a + * corresponding layout. + * See also the comment near timens_setup_vdso_data() for details. + */ +int vdso_join_timens(struct task_struct *task, struct time_namespace *ns) +{ + struct mm_struct *mm = task->mm; + struct vm_area_struct *vma; + + if (down_write_killable(&mm->mmap_sem)) + return -EINTR; + + for (vma = mm->mmap; vma; vma = vma->vm_next) { + unsigned long size = vma->vm_end - vma->vm_start; + + if (vma_is_special_mapping(vma, vdso_lookup[ARM64_VDSO].dm)) + zap_page_range(vma, vma->vm_start, size); +#ifdef CONFIG_COMPAT_VDSO + if (vma_is_special_mapping(vma, vdso_lookup[ARM64_VDSO32].dm)) + zap_page_range(vma, vma->vm_start, size); +#endif + } + + up_write(&mm->mmap_sem); + return 0; +} +#endif + static vm_fault_t vvar_fault(const struct vm_special_mapping *sm, struct vm_area_struct *vma, struct vm_fault *vmf) { From patchwork Thu Apr 16 05:26:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11492281 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 E3629913 for ; Thu, 16 Apr 2020 05:27:43 +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 B612B2076A for ; Thu, 16 Apr 2020 05:27:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="q2vRGwon"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iXzKzmzU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B612B2076A 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=uP3MplaqzxPCIF6leKNEHOTLkKELACcvbCvLq+Qccg8=; b=q2vRGwon5F20oTrT9/XkXyFuSI GHd6vGQe56qEhpXWSX9TobjxJkkEut1OwKo0HJzzzdhlDWl1lBl3Hd1cGrTIe4rYUV3myZAnOSGar 43s3e1TvYMUYAOW9XJ0fRpgTOgJlwXHQ/a/smle7mIXBLUdk4K/Djv9awydniJVKdfdX0Sp49keFg KsSB/GhYNVdGM9T9Gbx4RQDvRGmprALQ3RwXj/qwS/KgyV4lmSgLDAREfJkVc7iod6rf1Zo4ubwyg fh7fgZBj5whdqKOOG9UfgICWHaxxd9LsvLFpzwTn3W+oMwdTnw4j93RX8oGV4XHSpzmBQ2mUfyeux Axx6Rihw==; 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 1jOx3m-0007Si-M8; Thu, 16 Apr 2020 05:27:34 +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 1jOx30-0006gT-Sk for linux-arm-kernel@lists.infradead.org; Thu, 16 Apr 2020 05:26:48 +0000 Received: by mail-pj1-x1041.google.com with SMTP id mn19so888597pjb.0 for ; Wed, 15 Apr 2020 22:26:46 -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=N78dzL9RDjNSrVVXaZvpSrsYlDpWnvFa6LeaBKX6A3M=; b=iXzKzmzUGRZ79DNzqp7Lm+96DzIAkVxUTU2OnyiqdTZmvNoMrc0iD4LPGynFQSP+hw 0c7kvDtIBgG6eYGVdCTQnMHe9Phq+c++xfNmu5KsQgnLrhvDg3XzWYsfD1P420v2bywR 9w6UoP738FCjKhaQ/IQ5/smJEnWLeuFcfs3gsgchpYb9S+XTfVCcl6B1OfuHtCPNmfDw XsOD2ZZeYBEMkkLU8UyqokIC2AejpI1ZCS1LX3vhTkFM1uauH6P6/b6lbVZpGyEftgLp XQbEU7aL3hFQL5PLQsQyZO+3KIhEXnXbnR8nEUdH63EZjdW1y6Tk3jMz0xxSxWcBoUY9 Kj9Q== 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=N78dzL9RDjNSrVVXaZvpSrsYlDpWnvFa6LeaBKX6A3M=; b=fCx6VTS4+IIGyCRVV4xn7exJ+CGxb4j/qwMqqAVaXYaCbUBd6RsYgHfH5c0XGLkuMO g4hApX+Owd5ABNV+g2JLrSulazNX+xYdJ9g9Nru+ZY9DzL06L8oqMRM+feMOxAkbszQ4 qZguERrO1Woe/kdD1ai9xBy0gjD5wwixj22bmy6HWwiOlyuqwcj+/XdbAFFDS1kYn8Ao IzUl48GmGgMKjWQJhQ2qXaTICbE3lwQY4Kz+k0rU6m5WeYuhioqhTzHFyDLinkFbjXNL eb2GIKVBW/vxWPMs9Z+UB9xI/IaB0IgqH4yVsazW+PzRVsi03Bg+4t/l+wtZN7CmAFO9 7Tng== X-Gm-Message-State: AGi0PubdZdJaKEUeX9CQu4thzlLmCFapeio+6IteZ0SbXhLwFS/NAX04 Ix3rFaA9HUGtwmOs/xnLZ20= X-Google-Smtp-Source: APiQypJm6qkvdje68GzeVvp/6hKrvxEOUtOBYSXGJ6Y+l9oTaF/eE9HzlwVrZWRqtor//umHCg6UtQ== X-Received: by 2002:a17:90a:1743:: with SMTP id 3mr3162889pjm.106.1587014805842; Wed, 15 Apr 2020 22:26:45 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id c21sm53699pjr.2.2020.04.15.22.26.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 22:26:45 -0700 (PDT) From: Andrei Vagin To: Vincenzo Frascino , Catalin Marinas , Will Deacon Subject: [PATCH 3/6] arm64/vdso: Add time napespace page Date: Wed, 15 Apr 2020 22:26:15 -0700 Message-Id: <20200416052618.804515-4-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200416052618.804515-1-avagin@gmail.com> References: <20200416052618.804515-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200415_222646_925674_DA800A5F X-CRM114-Status: GOOD ( 20.35 ) 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_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.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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 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 , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Allocate the time namespace page among VVAR pages. Provide __arch_get_timens_vdso_data() helper for VDSO code to get the code-relative position of VVARs on that special page. If a task belongs to a time namespace then the VVAR page which contains the system wide VDSO data is replaced with a namespace specific page which has the same layout as the VVAR page. That page has vdso_data->seq set to 1 to enforce the slow path and vdso_data->clock_mode set to VCLOCK_TIMENS to enforce the time namespace handling path. The extra check in the case that vdso_data->seq is odd, e.g. a concurrent update of the VDSO data is in progress, is not really affecting regular tasks which are not part of a time namespace as the task is spin waiting for the update to finish and vdso_data->seq to become even again. If a time namespace task hits that code path, it invokes the corresponding time getter function which retrieves the real VVAR page, reads host time and then adds the offset for the requested clock which is stored in the special VVAR page. Reviewed-by: Vincenzo Frascino Signed-off-by: Andrei Vagin --- arch/arm64/include/asm/vdso.h | 6 ++++++ .../include/asm/vdso/compat_gettimeofday.h | 14 +++++++++++++ arch/arm64/include/asm/vdso/gettimeofday.h | 8 ++++++++ arch/arm64/kernel/vdso.c | 20 ++++++++++++++++--- arch/arm64/kernel/vdso/vdso.lds.S | 5 ++++- arch/arm64/kernel/vdso32/vdso.lds.S | 5 ++++- include/vdso/datapage.h | 1 + 7 files changed, 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..6ce9cdf5e08b 100644 --- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h +++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h @@ -7,6 +7,8 @@ #ifndef __ASSEMBLY__ +#include + #include #include @@ -152,6 +154,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; + + ret = _timens_data; + OPTIMIZER_HIDE_VAR(ret); + + 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 6ac9cdeac5be..b3e7ce24e59b 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -46,6 +46,14 @@ enum arch_vdso_type { #define VDSO_TYPES (ARM64_VDSO + 1) #endif /* CONFIG_COMPAT_VDSO */ +enum vvar_pages { + VVAR_DATA_PAGE_OFFSET = 0, +#ifdef CONFIG_TIME_NS + VVAR_TIMENS_PAGE_OFFSET = 1, +#endif /* CONFIG_TIME_NS */ + VVAR_NR_PAGES = __VVAR_PAGES, +}; + struct __vdso_abi { const char *name; const char *vdso_code_start; @@ -81,6 +89,12 @@ static union { } vdso_data_store __page_aligned_data; struct vdso_data *vdso_data = vdso_data_store.data; + +struct vdso_data *arch_get_vdso_data(void *vvar_page) +{ + return (struct vdso_data *)(vvar_page); +} + static int __vdso_remap(enum arch_vdso_type arch_index, const struct vm_special_mapping *sm, struct vm_area_struct *new_vma) @@ -182,7 +196,7 @@ static int __setup_additional_pages(enum arch_vdso_type arch_index, vdso_text_len = vdso_lookup[arch_index].vdso_pages << PAGE_SHIFT; /* Be sure to map the data page */ - vdso_mapping_len = vdso_text_len + PAGE_SIZE; + vdso_mapping_len = vdso_text_len + VVAR_NR_PAGES * PAGE_SIZE; vdso_base = get_unmapped_area(NULL, 0, vdso_mapping_len, 0, 0); if (IS_ERR_VALUE(vdso_base)) { @@ -190,13 +204,13 @@ static int __setup_additional_pages(enum arch_vdso_type arch_index, goto up_fail; } - ret = _install_special_mapping(mm, vdso_base, PAGE_SIZE, + ret = _install_special_mapping(mm, vdso_base, VVAR_NR_PAGES * PAGE_SIZE, VM_READ|VM_MAYREAD|VM_PFNMAP, vdso_lookup[arch_index].dm); if (IS_ERR(ret)) goto up_fail; - vdso_base += PAGE_SIZE; + vdso_base += VVAR_NR_PAGES * PAGE_SIZE; mm->context.vdso = (void *)vdso_base; ret = _install_special_mapping(mm, vdso_base, vdso_text_len, VM_READ|VM_EXEC| diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S index 7ad2d3a0cd48..d808ad31e01f 100644 --- a/arch/arm64/kernel/vdso/vdso.lds.S +++ b/arch/arm64/kernel/vdso/vdso.lds.S @@ -17,7 +17,10 @@ OUTPUT_ARCH(aarch64) SECTIONS { - PROVIDE(_vdso_data = . - PAGE_SIZE); + PROVIDE(_vdso_data = . - __VVAR_PAGES * PAGE_SIZE); +#ifdef CONFIG_TIME_NS + PROVIDE(_timens_data = _vdso_data + PAGE_SIZE); +#endif . = VDSO_LBASE + SIZEOF_HEADERS; .hash : { *(.hash) } :text diff --git a/arch/arm64/kernel/vdso32/vdso.lds.S b/arch/arm64/kernel/vdso32/vdso.lds.S index a3944927eaeb..06cc60a9630f 100644 --- a/arch/arm64/kernel/vdso32/vdso.lds.S +++ b/arch/arm64/kernel/vdso32/vdso.lds.S @@ -17,7 +17,10 @@ OUTPUT_ARCH(arm) SECTIONS { - PROVIDE_HIDDEN(_vdso_data = . - PAGE_SIZE); + PROVIDE_HIDDEN(_vdso_data = . - __VVAR_PAGES * PAGE_SIZE); +#ifdef CONFIG_TIME_NS + PROVIDE_HIDDEN(_timens_data = _vdso_data + PAGE_SIZE); +#endif . = VDSO_LBASE + SIZEOF_HEADERS; .hash : { *(.hash) } :text diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h index 5cbc9fcbfd45..2022e8c653c1 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 Thu Apr 16 05:26:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11492283 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 AA0E8913 for ; Thu, 16 Apr 2020 05:27:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E8F32076A for ; Thu, 16 Apr 2020 05:27:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lC27hp1Q"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ki4VmJyQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E8F32076A 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=JoLKjtaonXcAASHN6hhIXjatg/iRNY08dBLQhiY0aUY=; b=lC27hp1Q8TUy6NDJQlvfQ4GhYY daVpwFWBqFKLVy5R3m3lj4YqhUB2aJV9nXWLkeaYQu3fbGeikkjuIv+K+45/f5tFk7GgSg8qAL3lN wdflrEpoe4HCxkuS7DrBmJN2b+JMKJwto3NWFCFsQCO0EKw4Ob2H9/0nvpAA4K7tAk5qoZYH2/Zlf Bmah1OTo0/He7pM/qEAk0jze92UlwUW+0BwF7+rZ9D6r/hRzE2TvaLuAOalJr2GX7Mffsmoqkpne2 YPFFAZqjitR+Hg/JYIxNtZlqepotcuJ+mEEiwAY768q3kDgWj5w0v8RvBZFakTsO3p/f0T7oza+z6 +GKYuK3A==; 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 1jOx44-0007oA-Hj; Thu, 16 Apr 2020 05:27:52 +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 1jOx32-0006hD-34 for linux-arm-kernel@lists.infradead.org; Thu, 16 Apr 2020 05:26:49 +0000 Received: by mail-pl1-x641.google.com with SMTP id w3so951897plz.5 for ; Wed, 15 Apr 2020 22:26:47 -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=HkFB2IFB6eu4Qsibzpvaj5eV40S/BQoyfyZyOgKqRdU=; b=Ki4VmJyQMAakb5h1e5GCup2A4dLJWYNrW9MVsygLyscRN0NtUNWyro1UJ79U6GamhL wCx0wQUMRrNE+eoV514UXPJfpSWfXwd/3IHLfUk7UWgk8sO0sytG8qn9wMNCphu5wfoA j8s/9IqOnvtdc3P7CFy4kIIh1PUcLynMIEp7OJR0DVd8pp4f+MPRtnxtR5va94odSYpX yG+5UUBFUvYTREJAAkL8dHdRh4P+ezpXrpSV6EMhdTIK779brbdv0TyVZT7Xs0Zh7uA+ e0GzurT7JqT08V+9p9slejCqK9EsZHcZH7RkNygBLU+Mw0QM+4veSdGqdPob9bxI2R0a feNQ== 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=HkFB2IFB6eu4Qsibzpvaj5eV40S/BQoyfyZyOgKqRdU=; b=QJ+ADlOEDpCuRm4398lLK4tbS/z44+xBR893gZzQPSQ+hDfOc06IGC8iXpmOnRc5A9 RjIIDho+y23cx9ywKJ/p39WF8ylPpzDSC861UPzxTWEfQGpgmM7/eWgpnGFfO1KSnHLj el7AJtJHT0JHpfEivG+zx/96Cr4oTbfxQmIP4wiNOTJbtt+5KhPcRzOxYvCrUpKtqiao A2WsOPTXjLHOKAJIcV7r/QX9kGVpnCpe8CR0pvnwPhH3y/zNAfYPq9Zsni3DIQ6I0teY +jKsCYu/ABTVgQgNuIe6/S9uH6EJi1NzUBRUSM8dugb87UrR2g4QGKCfxnDXCMfMkZc6 vCdA== X-Gm-Message-State: AGi0PuYmrkqvfyPJRrHJnIc8jsECarUCV++X0CCSNE+XTmJXnKJJNZOo VbOBDJq4sjyYB1aV3BdzJwE= X-Google-Smtp-Source: APiQypJl6jnFydHzld8Y6PdrjF3ChQCmvwCzlPXym6IsyBAFXmPGRV+0P3/LzKyTAxQ+iI6harv6Sw== X-Received: by 2002:a17:90b:19c9:: with SMTP id nm9mr3171152pjb.86.1587014806945; Wed, 15 Apr 2020 22:26:46 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id c21sm53699pjr.2.2020.04.15.22.26.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 22:26:46 -0700 (PDT) From: Andrei Vagin To: Vincenzo Frascino , Catalin Marinas , Will Deacon Subject: [PATCH 4/6] arm64/vdso: Handle faults on timens page Date: Wed, 15 Apr 2020 22:26:16 -0700 Message-Id: <20200416052618.804515-5-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200416052618.804515-1-avagin@gmail.com> References: <20200416052618.804515-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200415_222648_166068_A0837907 X-CRM114-Status: GOOD ( 15.56 ) 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_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.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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 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 , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org If a task belongs to a time namespace then the VVAR page which contains the system wide VDSO data is replaced with a namespace specific page which has the same layout as the VVAR page. Reviewed-by: Vincenzo Frascino 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 b3e7ce24e59b..fb32c6f76078 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -175,15 +176,63 @@ int vdso_join_timens(struct task_struct *task, struct time_namespace *ns) up_write(&mm->mmap_sem); return 0; } + +static struct page *find_timens_vvar_page(struct vm_area_struct *vma) +{ + if (likely(vma->vm_mm == current->mm)) + return current->nsproxy->time_ns->vvar_page; + + /* + * VM_PFNMAP | VM_IO protect .fault() handler from being called + * through interfaces like /proc/$pid/mem or + * process_vm_{readv,writev}() as long as there's no .access() + * in special_mapping_vmops(). + * For more details check_vma_flags() and __access_remote_vm() + */ + + WARN(1, "vvar_page accessed remotely"); + + return NULL; +} +#else +static inline struct page *find_timens_vvar_page(struct vm_area_struct *vma) +{ + return NULL; +} #endif static vm_fault_t vvar_fault(const struct vm_special_mapping *sm, struct vm_area_struct *vma, struct vm_fault *vmf) { - if (vmf->pgoff == 0) - return vmf_insert_pfn(vma, vmf->address, - sym_to_pfn(vdso_data)); - return VM_FAULT_SIGBUS; + struct page *timens_page = find_timens_vvar_page(vma); + unsigned long pfn; + + switch (vmf->pgoff) { + case VVAR_DATA_PAGE_OFFSET: + if (timens_page) + pfn = page_to_pfn(timens_page); + else + pfn = sym_to_pfn(vdso_data); + break; +#ifdef CONFIG_TIME_NS + case VVAR_TIMENS_PAGE_OFFSET: + /* + * If a task belongs to a time namespace then a namespace + * specific VVAR is mapped with the VVAR_DATA_PAGE_OFFSET and + * the real VVAR page is mapped with the VVAR_TIMENS_PAGE_OFFSET + * offset. + * See also the comment near timens_setup_vdso_data(). + */ + if (!timens_page) + return VM_FAULT_SIGBUS; + pfn = sym_to_pfn(vdso_data); + break; +#endif /* CONFIG_TIME_NS */ + default: + return VM_FAULT_SIGBUS; + } + + return vmf_insert_pfn(vma, vmf->address, pfn); } static int __setup_additional_pages(enum arch_vdso_type arch_index, From patchwork Thu Apr 16 05:26:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11492285 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 237CB6CA for ; Thu, 16 Apr 2020 05:28:12 +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 EF7DE2076A for ; Thu, 16 Apr 2020 05:28:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jInp2fQa"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sWvjSCgN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF7DE2076A 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=0E2VdaAgrETpYPgcXfGXHP7GKRDKppbAVxDAsBpB3bk=; b=jInp2fQafY0YMH+HHKjPrLSOn3 D/+WRtqwo8vtNisIuerup6VgBh+bs4O+za06yfLtj+o7KQVjdDXiDhtu456t2Sy9VGjopm5k+taXw NGqOIlkOr7tMgfNVyhF+byfwEfS1NeIiC3mb1oLsUufTDd5vU2+PvaSefscdHwXwU/OY3RbaC8dkK V3A9SsTDiZnfMx4h8x3i83SSnjLguLmZ2vQS0mIr3kYxe4oiRIUDUoZHLn9DbqXeMWvpkXK7QROF8 7xtoI8xCFpfZ9lzonM7OUyk+c0mhkbQ9eqgVDsl+ltjs8e74XQzCl9VuhIqXJ65RdLAZ5sCzcVkC5 6bdshDzA==; 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 1jOx4F-0007zg-A5; Thu, 16 Apr 2020 05:28:03 +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 1jOx33-0006iG-Gd for linux-arm-kernel@lists.infradead.org; Thu, 16 Apr 2020 05:26:51 +0000 Received: by mail-pj1-x1044.google.com with SMTP id a22so874532pjk.5 for ; Wed, 15 Apr 2020 22:26:48 -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=AEQhnnrMzAKTzUbyWrr7Pn4129iWSFF1XGDPYTPl2Oo=; b=sWvjSCgNi/pGxJ8po/5HgKguAxlQRy+wCBCGw8arJtEyunm27lNPBjARK9WhHOxtuN PCDJQbLfnmWLVk1MnPOlWVYUs97/Wy2E8cJHx8x/J01Ub27iy/U2s/wFJUeZQRgmeG6v nv6a2yjc5r19eVoqvfywnonahteeHbS/nJzY6SiJKvzAhSQXJxZaHeUUHOzp4rvfXg3o PhvP8YF87YuawnruPOYOd55HhIJc6LsLXSgAe3BY+WNbTr2TY+NJAmMfjbXZj3G8Fn3G u8lJSQ928A4dYFDNmfcwgxQJf16qA6B0PT+kT6jmI2cbwspu1P46Q26TJ6FqsuI8L+cW HfbA== 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=AEQhnnrMzAKTzUbyWrr7Pn4129iWSFF1XGDPYTPl2Oo=; b=i0q6Z0voIGIKgd8Nou+KI6DM2JLzUxBdOs3aHM5BiOQ+4nZuorTzvKGyS3KQM5cJvU mLDBcqOoVOp7pOOnD2OKH50qXy/+UCU/hexwRD+5mle88/VY1t/Js+HxxuoGB7dWP8W4 zHOdTFOpApIfv4F2lsx0DDqUMFUKtESt2oxZm6DGMkAz2TH/c+IJFbY1i91yfGT2VaL1 LxyeBW/rX0xlRiV/1vtEq+I2ANO78qSjYh7BEGj/QxyYg4YOQ7pok5Tl66L+Nkws6W7t Sl/EYww4x9QUASWJ8HjnRuKYnQ7nDP4EfGBhn6cm9sHrU940oxnLZV3Qpolf/jjEBg/G WM+w== X-Gm-Message-State: AGi0PuYs+eLbtsyOtr3fSSDqNkxAmkbjr6b2M4Yv99/FOt7nu4lOtEPH aEMFspNBsHX/R9StL/9YS2SrDEMUMtM= X-Google-Smtp-Source: APiQypIgTAWtfPtyJjPPgrd+7oA27QM8CD3i2vxGeg9P6ikV7cBNyesXqbfzDxy45o2NIKtFDcNuEQ== X-Received: by 2002:a17:90a:a402:: with SMTP id y2mr3199895pjp.55.1587014807867; Wed, 15 Apr 2020 22:26:47 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id c21sm53699pjr.2.2020.04.15.22.26.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 22:26:47 -0700 (PDT) From: Andrei Vagin To: Vincenzo Frascino , Catalin Marinas , Will Deacon Subject: [PATCH 5/6] arm64/vdso: Restrict splitting VVAR VMA Date: Wed, 15 Apr 2020 22:26:17 -0700 Message-Id: <20200416052618.804515-6-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200416052618.804515-1-avagin@gmail.com> References: <20200416052618.804515-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200415_222649_639746_C595DE98 X-CRM114-Status: GOOD ( 12.22 ) 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_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.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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 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 , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Forbid splitting VVAR VMA resulting in a stricter ABI and reducing the amount of corner-cases to consider while working further on VDSO time namespace support. As the offset from timens to VVAR page is computed compile-time, the pages in VVAR should stay together and not being partically mremap()'ed. Reviewed-by: Vincenzo Frascino 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 fb32c6f76078..c003f7ee383a 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -235,6 +235,17 @@ static vm_fault_t vvar_fault(const struct vm_special_mapping *sm, return vmf_insert_pfn(vma, vmf->address, pfn); } +static int vvar_mremap(const struct vm_special_mapping *sm, + struct vm_area_struct *new_vma) +{ + unsigned long new_size = new_vma->vm_end - new_vma->vm_start; + + if (new_size != VVAR_NR_PAGES * PAGE_SIZE) + return -EINVAL; + + return 0; +} + static int __setup_additional_pages(enum arch_vdso_type arch_index, struct mm_struct *mm, struct linux_binprm *bprm, @@ -315,6 +326,7 @@ static struct vm_special_mapping aarch32_vdso_spec[C_PAGES] = { { .name = "[vvar]", .fault = vvar_fault, + .mremap = vvar_mremap, }, { .name = "[vdso]", @@ -497,6 +509,7 @@ static struct vm_special_mapping vdso_spec[A_PAGES] __ro_after_init = { { .name = "[vvar]", .fault = vvar_fault, + .mremap = vvar_mremap, }, { .name = "[vdso]", From patchwork Thu Apr 16 05:26:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Vagin X-Patchwork-Id: 11492287 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 176806CA for ; Thu, 16 Apr 2020 05:28:26 +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 E70F620936 for ; Thu, 16 Apr 2020 05:28:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="l8btfhLP"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="V5pdJaOv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E70F620936 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=DEmnd1OPAA0sLcYjyU/gIjs+XHTY1fnunmvA50kX3l0=; b=l8btfhLPpRDNIBzNNQjk30Pe2B mUpDOIC2ao5UsznGLcG0k8KmzdzaKDkXkwojP3fl/q1Kzn9eRK26UaNQ5ZxeBaatX1D6157DiH2OY PV3zDvt+tPFni55TNGEaleraf7OCqqIWnbe5oI6z06tdo5Dswg2bKMhCYuDU3cosamb+yZD1T67Ls KvicBR0GxUeUYAqXbwZP7H8oHBtuVC2fAOqkIcydzjOFT6sqYR7C6vMH2M4gUxzSZs5/rLCqMuJTE FOM+IjEJ4pw/F/mFpfbWHLGNkEi3okJMDSPJbi5dMNBgbdSP3pm+X1iVUjMBlv1KBnw9j4kYMs30a QUMEZgLg==; 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 1jOx4V-0008Et-HJ; Thu, 16 Apr 2020 05:28:19 +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 1jOx34-0006jf-PD for linux-arm-kernel@lists.infradead.org; Thu, 16 Apr 2020 05:26:52 +0000 Received: by mail-pj1-x1043.google.com with SMTP id b7so879555pju.0 for ; Wed, 15 Apr 2020 22:26:50 -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=+clC7a2/1FEkxH5L412Da4FtFwUsVwwlBRiREeEjlLw=; b=V5pdJaOvRn+DHbnxN6QoJiCMe7RWYYKUXbeReCoVSsHWYcF7ML2ovCf36gqPglEB9T X2kXrmroM/bHXrc6F+99r+yIBpvSN6LNCnCCcDE9JhkfhYH6VP4fouEiOyHGKPj9sK9w SVvNje5mZ1JA3oz7WM7MST0a7UMZSg3EwpWthfJ5TjTF5mcpsQA7QvDDAo62sb3WcjxL PJ6/cbRib1prgDgG5P/7bLl/IFbnTGC6bRIy+zrBmQ8TvdCOxiiAnsGZg26r5KXeq75M byXsvMAXEPvE4lNzgUEX0DA6kD9HCEg6xVHwwVjjpAKwScHqYa6Gar6yoSmNkjEX3t3B ObFw== 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=+clC7a2/1FEkxH5L412Da4FtFwUsVwwlBRiREeEjlLw=; b=LihgNXf2k8xr23Ja46xWdysQyw2ODR9wZffdHeQNwSg15J6jP/j1ATkK/wewxPgADg 4BWOC2rg3pdm2Scsy6TxFG6z3P7ee5lDdw5tTmkfcXi+o2yl0w4iegH2Gff8LPUkye6I BHm9QdHZeAQJcalvwIGCI9RRIGFaw1lxiMgDj33jwYzrWZMKPYhhXIBobLB/C7Klb8zK qCoOzYtNy9k3XteIok/ef5cqyH7W358LKRTsx+RfHxWboFhwimfHDZy0Cy/0TN3S5uUr uVedABjLj4vdJf2yxz6HaJ47qfq+GDNKm025TuLWfqklcd8/HRmafVOqBsPeivJsvG/8 pXHQ== X-Gm-Message-State: AGi0PuYfW4YBXj3U4TYJRhn4w0cPDAFdWPTtpmOD6TdJ6GdC0qLRHpIO XkrkGKp+83y/KllxLJiP82Q= X-Google-Smtp-Source: APiQypJYSDvwlGCvr5dvbD0A+DHSbieYwKyY0491/Fvf4ywv0PRbK0VmBw+hCLL1KjNWod/U2Q8B/A== X-Received: by 2002:a17:90a:1910:: with SMTP id 16mr3074324pjg.119.1587014809274; Wed, 15 Apr 2020 22:26:49 -0700 (PDT) Received: from laptop.hsd1.wa.comcast.net ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id c21sm53699pjr.2.2020.04.15.22.26.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 22:26:48 -0700 (PDT) From: Andrei Vagin To: Vincenzo Frascino , Catalin Marinas , Will Deacon Subject: [PATCH 6/6] arm64: enable time namespace support Date: Wed, 15 Apr 2020 22:26:18 -0700 Message-Id: <20200416052618.804515-7-avagin@gmail.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200416052618.804515-1-avagin@gmail.com> References: <20200416052618.804515-1-avagin@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200415_222650_921307_684DD1DA X-CRM114-Status: GOOD ( 10.89 ) 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_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.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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 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 , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org CONFIG_TIME_NS is dependes on GENERIC_VDSO_TIME_NS. Reviewed-by: Vincenzo Frascino 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 40fb05d96c60..68619faf0838 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -110,6 +110,7 @@ config ARM64 select GENERIC_STRNLEN_USER select GENERIC_TIME_VSYSCALL select GENERIC_GETTIMEOFDAY + select GENERIC_VDSO_TIME_NS select HANDLE_DOMAIN_IRQ select HARDIRQS_SW_RESEND select HAVE_PCI