Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp713691pxv; Thu, 15 Jul 2021 14:12:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSZ0C9Up7vOFj3SFTzyqQXTh14rQ7dU8GsA7HkJyudqZyrTvvstX/FAUTJo6h1k7KDDeFE X-Received: by 2002:a17:906:1e8a:: with SMTP id e10mr7770425ejj.278.1626383576868; Thu, 15 Jul 2021 14:12:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626383576; cv=none; d=google.com; s=arc-20160816; b=ET83+V/grEZavNhzzlBEFAHNF5GnSLe79AXuo/OzWwcUhW2vMo37+XWQqtJMp49NWe SUHAukPtwIOaLVdOs/N1hVgSB5I+aSxMdfPcCwjfhE8hMnRYb9tN+Uva30kl0kOA7Nli pogbYuoIb7gN2fbGtEN4Lopm7t5XN5qx+on1ETJDqp2ls+BIydbpfubI+9FhO+thjzyl L9n5SSAsXzPyXRcTf4NJWUjql98ntnfsPiZ6ZQs9On5ZUwman1PQDvb7J8TNA96m0ayB mX+mQHiSxipci1gh53hw87IueaA850G7Y4zwJ6EcxJNqqh1P1vq4NbKyik3nnV51vvOU 31RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MtthLtKTidhbLeJqvs+D+cn8uL//mJqeF/MTWkFw8s8=; b=zAQB2x1f44iLxU6IriDEE1Nmucw9VvAdQBSitLCcJuUSl960fx7Iiv3pL/VrcdA+n3 rP005zjj7sJqCz01ABlMiYbl9jvBflTQB6HZlaQBplZCRzWmiFu5PGO4SA9EqUhZohiq myGZY+GUwPtGqoCod9SpLbybZDULi+oWYhaug0B2IJy6maMrW9OiLYCeMVo+99J5caTe ztA0e7pJ0b1HW0z2T8+lJ77zky2DDSMNuQnsvw0sm4PUn+0D9S2zYigaHA75keRpFcUZ 3BFFTdYq0siJS5rvTXjbCnAPizxEqLBlHdxyLc1axlZeIYw1j+GNX8XE4Qk6nE55B7DB vX+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wsSta3ME; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ws17si2082816ejb.374.2021.07.15.14.12.32; Thu, 15 Jul 2021 14:12:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wsSta3ME; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244895AbhGOTX2 (ORCPT + 99 others); Thu, 15 Jul 2021 15:23:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:46396 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242261AbhGOTGx (ORCPT ); Thu, 15 Jul 2021 15:06:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2FF806140F; Thu, 15 Jul 2021 19:02:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375773; bh=36uWLMfmCtfxLVMGxi41DWgaM+LISYVe+Ya879sk9tY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wsSta3MEprn3ABad0faG9QZdEQwHhgw01hSWszgkGmu2ijahwA/qwOc+JGEiuB8F2 7MaCOax3+Xpq9nJKfmWGCCkeS7sXLWqoT5mzFhwRoxJSm9D9dIOV7gn8ZDosquA7Wy qO4ZX7RmVuVqX3mATCTFahwIO197HSo0nQNhuIRo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sven Schnelle , Heiko Carstens , Vasily Gorbik Subject: [PATCH 5.12 230/242] s390/vdso: always enable vdso Date: Thu, 15 Jul 2021 20:39:52 +0200 Message-Id: <20210715182633.356307910@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sven Schnelle commit d57778feb9878aa6b79c615fd029c2112d40a747 upstream. With the upcoming move of the svc sigreturn instruction from the signal frame to vdso we need to have vdso always enabled. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Greg Kroah-Hartman --- arch/s390/include/asm/elf.h | 11 ++++------- arch/s390/kernel/vdso.c | 21 ++++----------------- 2 files changed, 8 insertions(+), 24 deletions(-) --- a/arch/s390/include/asm/elf.h +++ b/arch/s390/include/asm/elf.h @@ -146,8 +146,6 @@ typedef s390_compat_regs compat_elf_greg #include -extern unsigned int vdso_enabled; - /* * This is used to ensure we don't load something for the wrong architecture. */ @@ -268,11 +266,10 @@ do { \ #define STACK_RND_MASK MMAP_RND_MASK /* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */ -#define ARCH_DLINFO \ -do { \ - if (vdso_enabled) \ - NEW_AUX_ENT(AT_SYSINFO_EHDR, \ - (unsigned long)current->mm->context.vdso_base); \ +#define ARCH_DLINFO \ +do { \ + NEW_AUX_ENT(AT_SYSINFO_EHDR, \ + (unsigned long)current->mm->context.vdso_base); \ } while (0) struct linux_binprm; --- a/arch/s390/kernel/vdso.c +++ b/arch/s390/kernel/vdso.c @@ -37,18 +37,6 @@ enum vvar_pages { VVAR_NR_PAGES, }; -unsigned int __read_mostly vdso_enabled = 1; - -static int __init vdso_setup(char *str) -{ - bool enabled; - - if (!kstrtobool(str, &enabled)) - vdso_enabled = enabled; - return 1; -} -__setup("vdso=", vdso_setup); - #ifdef CONFIG_TIME_NS struct vdso_data *arch_get_vdso_data(void *vvar_page) { @@ -176,7 +164,7 @@ int arch_setup_additional_pages(struct l int rc; BUILD_BUG_ON(VVAR_NR_PAGES != __VVAR_PAGES); - if (!vdso_enabled || is_compat_task()) + if (is_compat_task()) return 0; if (mmap_write_lock_killable(mm)) return -EINTR; @@ -218,10 +206,9 @@ static int __init vdso_init(void) vdso_pages = (vdso64_end - vdso64_start) >> PAGE_SHIFT; pages = kcalloc(vdso_pages + 1, sizeof(struct page *), GFP_KERNEL); - if (!pages) { - vdso_enabled = 0; - return -ENOMEM; - } + if (!pages) + panic("failed to allocate VDSO pages"); + for (i = 0; i < vdso_pages; i++) pages[i] = virt_to_page(vdso64_start + i * PAGE_SIZE); pages[vdso_pages] = NULL;