Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp663699pxv; Thu, 15 Jul 2021 12:51:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbGWs59TiAzI6Nbgsl8MZbL8GrD2ju6fzzhTUctyeSmtB8S8ZCD1wcxsm5P3L/kYmE23eM X-Received: by 2002:aa7:dcc5:: with SMTP id w5mr9358666edu.355.1626378664790; Thu, 15 Jul 2021 12:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626378664; cv=none; d=google.com; s=arc-20160816; b=H9Hyhvo8mrAOPB7fas9iQW+959JT8KD600SV0lcf8p+lFP6/XsdBn/O3HDb0MzllFG tPjmVE5QwkpEIVUmyCPp3fv1BbOHI6vkjKPrub4r+1MCwIC2mcOeioCQZ8HNgYNn0SxT Xx7iQrt8yDBSAJsqyLbWJmDZ8xCKG9J9E8goo0L3yQpxxw5KOGm1OAKvBqkbyZuwEYF7 mc5BXtDwsOvfN+Bd3roO5gz8h27Wupw46PMfSl2/JZCbj5Gd272KpJXzt5BmPyDKHQSp Yt4dMD0S/pmvAeLBnHji4zOJhVhsHbyktyeIXFeY8Sf6+2NKhw5UVwOXP4dz44veF/3y dMSQ== 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=F+PsYHbFhO4hyfEmpbyGZBS+N7dQqI2PQIcL+k3gqYYD+IZoYgTTj8S+jCWMg4Af5P HTzoECxpeVluO2e1JEt1a10rYGOyw6NRD6VIa+PZNpyI2hzxKc6JM7uXbGOXFlu3DwYE c3jQc3lq32fZb1HKr3RwcTZsKmuOmHn6D0P3V5YxlbODbl7qhTnQsLaJPahkuZNMEcdT 7RZ5rFyjtbQNL1hfzT6Hlni+ebI78zq3QeAsUj94z17G0fWIInkxehGC1u0bhbKRVcv2 2Oizb6CIGpi7lUljX7EhaoJKzrjZF/kTWIjTx7iwNRyvrpDRS8i6BeJ2Rs5AtnQtZIVh APLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LmzqTLGn; 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 e16si8119908edr.340.2021.07.15.12.50.40; Thu, 15 Jul 2021 12:51:04 -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=LmzqTLGn; 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 S1345180AbhGOTuD (ORCPT + 99 others); Thu, 15 Jul 2021 15:50:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:57374 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245058AbhGOTTP (ORCPT ); Thu, 15 Jul 2021 15:19:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D802161426; Thu, 15 Jul 2021 19:13:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626376433; bh=36uWLMfmCtfxLVMGxi41DWgaM+LISYVe+Ya879sk9tY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LmzqTLGn6Jukil/okGSCFg/ge8Np8xI/wzIHIT4VzqN5R529aErJH4N1QTQkRsyr0 jBkWTmz2ziJ4FYjo4b1FRT0/DmPvp6c3Cm5kY7G/Kgmz7SFd58dWsz27iTaZ+/pjJx AluzucMoK2XpBLx82AjPBmKe0zmKf1bOXYlNYDDw= 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.13 254/266] s390/vdso: always enable vdso Date: Thu, 15 Jul 2021 20:40:09 +0200 Message-Id: <20210715182652.455014546@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182613.933608881@linuxfoundation.org> References: <20210715182613.933608881@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;