Received: by 10.223.176.5 with SMTP id f5csp263721wra; Thu, 1 Feb 2018 19:58:14 -0800 (PST) X-Google-Smtp-Source: AH8x224kek2UoijHsSPwulBTivNbQI7wgxODrhhIDcIS85otR0J1V65gT6WywcqIuLJGqoX3T76r X-Received: by 2002:a17:902:2be4:: with SMTP id l91-v6mr1424963plb.387.1517543894492; Thu, 01 Feb 2018 19:58:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517543894; cv=none; d=google.com; s=arc-20160816; b=WXghupUxhxVIm3aX3K5KVMNZv1QJ0AFdvBuAYMwZf+aHPO4VyovT/2/IoHv7YWjmSN HUTSnzocfyXgVSOtZsKBYd0JPMBDD5Q6+E5yJoBentbwHf9e92JiIipi8ECq3AEAID17 1wsMN58Rnnv+qfgme3xV4hlsKGtypQBR641TKqHfHR4u/Rz84RYtblpDOxB5ZGqpinco Rs+kv2GnRKinIOoo+cm/0ea68ARJskcfPdY0uoFldSwMDABufY6myrNbN4a3AKUBXPc7 o7ZphCUZTtjT3FdmM3RJ+hSXNgVr8rldfVxUyImCrIMBJSbmivCQrVLSOB40Emack7d3 +QYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=4T822ZZmQ+EmmT3oOcrw8cWfGXb3ryq63lVTfFBzVH4=; b=cbn8DBP4whY+h61vzCmv+5NnAtW8oppPwd+M7hLdIcMqqeK7pZs+L63yVjvH5ps4pn N+Zm+4TCVMpshDvKZ8DviRG3YhlaMkZdq2xJ4Nlw5T0UrYx+WJMVI4DBxrEu8J01eZqu SVpfq2oOScbq2RzK6SAS4JOZdsc4NI1+J67inpqkMrqVo9pTpxOFZOeDt7Vv18PP7x/r 2BBQIsJRHGVrRVmFYAm3oJFqec2lVus45hijIOI6ektQSwS5UQxqJIgNzgh9FDW4OOnz 4jkqB1w6kj2MzFETHKTviBRhcN2WA9Lhd1KCyEVx9kfxEK2M8eCwOOBUcrcwO1Ps/CfH xTrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WIfCnFc2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w65si785481pgb.291.2018.02.01.19.57.59; Thu, 01 Feb 2018 19:58:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WIfCnFc2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751993AbeBBD4G (ORCPT + 99 others); Thu, 1 Feb 2018 22:56:06 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:40651 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751756AbeBBDzL (ORCPT ); Thu, 1 Feb 2018 22:55:11 -0500 Received: by mail-lf0-f68.google.com with SMTP id h92so29443628lfi.7 for ; Thu, 01 Feb 2018 19:55:10 -0800 (PST) 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=4T822ZZmQ+EmmT3oOcrw8cWfGXb3ryq63lVTfFBzVH4=; b=WIfCnFc2dTYQSvg8bcWGGQsOPO/v4T/qzk19Cn8FGqlLI/1a23V1Nn1D3I15kvYBMl 8iczTm04Z04Dr/1rU0ikzxCCbwDao3XUulmlb66s7Ybspy+xVoJoMCJGf8ueDh1WWOP8 WDWkpvY8+4wafhbzXrXbzGU4PEdJx6gynavhV6uAN6Y7vAnstoCM+V7AQsH9Yp9TkdpP sFvK4npScoWSWClqbh07yB3D80yBJzPxVrgFgz1k3m5xWnm0cVa7v0fKF2KM8J+2ezgJ SlP+sLL6jB5Aeuh278shr8rGdyjAK+UTolDkd2dAVcaUScDfvO5ftRl4td62rGgf1mor 0GIg== 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=4T822ZZmQ+EmmT3oOcrw8cWfGXb3ryq63lVTfFBzVH4=; b=kIR3rrNW2zgl36/x1uToDfVpEcWTz1u8wSRlL5Gtrf18a3ZGxh6KLvH6AD11plbKFX 37yIufWMN9uxHngQj9OMZGVdRDJGEAGMkslP+qwTj5oJqblG2c3u4+hrbBqKt3IQmCFM uh9/z1Rw2B00BGwCJSevgtmQ1AKiNXCBiJrEY7iNKtWo5N3dawa9xMo55+zaSGciE5te b0gCiRQfU4m8BGXCqaqs3MwJfTViCMZRfkDW6ZM3XmSHvgrG9y3K2VJpoKPEHqR0LSOO QY3satNCPSkqqjcjiP9gH4m9bRhSPehvCnq6Tg/aNllo6U9xCNfFkIPi19k36duYkpib SViQ== X-Gm-Message-State: AKwxytcVIIGhXHqz6/Ye+OlCPJtrqUjSpX5G9FXmtswlg+z7Fq+21jW9 RiIHaFUJBhEIh3EVkdKkrKU= X-Received: by 10.46.117.29 with SMTP id q29mr19137666ljc.65.1517543709867; Thu, 01 Feb 2018 19:55:09 -0800 (PST) Received: from linux.local ([95.79.164.146]) by smtp.gmail.com with ESMTPSA id f14sm190934lje.84.2018.02.01.19.55.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Feb 2018 19:55:09 -0800 (PST) From: Serge Semin To: ralf@linux-mips.org, miodrag.dinic@mips.com, jhogan@kernel.org, goran.ferenc@mips.com, david.daney@cavium.com, paul.gortmaker@windriver.com, paul.burton@mips.com, alex.belits@cavium.com, Steven.Hill@cavium.com Cc: alexander.sverdlin@nokia.com, matt.redfearn@mips.com, kumba@gentoo.org, marcin.nowakowski@mips.com, James.hogan@mips.com, Peter.Wotton@mips.com, Sergey.Semin@t-platforms.ru, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 05/15] MIPS: KASLR: Drop relocatable fixup from reservation_init Date: Fri, 2 Feb 2018 06:54:48 +0300 Message-Id: <20180202035458.30456-6-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180202035458.30456-1-fancer.lancer@gmail.com> References: <20180117222312.14763-1-fancer.lancer@gmail.com> <20180202035458.30456-1-fancer.lancer@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matt Redfearn A recent change ("MIPS: memblock: Discard bootmem initialization") removed the reservation of all memory below the kernel's _end symbol in bootmem. This makes the call to free_bootmem unnecessary, since the memory region is no longer marked reserved. Additionally, ("MIPS: memblock: Print out kernel virtual mem layout") added a display of the kernel's virtual memory layout, so printing the relocation information at this point is redundant. Remove this section of code. Signed-off-by: Matt Redfearn --- arch/mips/kernel/setup.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index b5fcacf71b3f..cf3674977170 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -528,29 +528,6 @@ static void __init bootmem_init(void) memory_present(0, start, end); } -#ifdef CONFIG_RELOCATABLE - /* - * The kernel reserves all memory below its _end symbol as bootmem, - * but the kernel may now be at a much higher address. The memory - * between the original and new locations may be returned to the system. - */ - if (__pa_symbol(_text) > __pa_symbol(VMLINUX_LOAD_ADDRESS)) { - unsigned long offset; - extern void show_kernel_relocation(const char *level); - - offset = __pa_symbol(_text) - __pa_symbol(VMLINUX_LOAD_ADDRESS); - free_bootmem(__pa_symbol(VMLINUX_LOAD_ADDRESS), offset); - -#if defined(CONFIG_DEBUG_KERNEL) && defined(CONFIG_DEBUG_INFO) - /* - * This information is necessary when debugging the kernel - * But is a security vulnerability otherwise! - */ - show_kernel_relocation(KERN_INFO); -#endif - } -#endif - /* * Reserve initrd memory if needed. */ -- 2.12.0