Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4457354imb; Wed, 6 Mar 2019 14:00:41 -0800 (PST) X-Google-Smtp-Source: APXvYqzqEl3vW/y71WAuEF8ETVzFa42aoChY0UbxSWpGurqNCaoaVoyWHTTyWKQZvi4rZQW1crZ/ X-Received: by 2002:a62:f54d:: with SMTP id n74mr9267853pfh.98.1551909640903; Wed, 06 Mar 2019 14:00:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551909640; cv=none; d=google.com; s=arc-20160816; b=sLe/OXlK9q3UsaDYVd6Ru/67DEXTHWUEu9dIHuQvGiRs6MdpjV7PwSYsRXCqklwV92 S9TJdm2IrH9sVzAueQr/P8HvC/A5cLCbYiJBTeeoJ/GekhKToy1yRr6vZW2aKXgXOLJz cHO3wDNkZClZc0DsmS1jjoyFi+11/EsrcsVdqwYc1Lkumvxat86+mO3GexqK5ftViTGn mySQM5zzuNuin8T4V+1QMivZWyGRLBRVqM0nNTjZP4tZUuTFuQftdIK1zawYwYG2Gf8Y KRusoM5VBNylHTAdp7117p1kYYV1KfJbxbTafwKx09+FTNsLcxMeDnaFBeRNO2/Xv5Ud enxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=dXXuOePHPijdIwU1kxuY3xQ+U1AiEyTAcKU5h3NgYpQ=; b=TMdYA53M3mU7LT28kBiBK9sMv0lDDdqB7nNJPwJqX6yKrhrO/dzg6034xTHyexfndT BuXfRmN5axuxr7+mtZfdzRaJmG8WLH63UrQ8Rk3qfui9pDKDq7rBKGpKTgeKWr5SH/kx ga1Xb95VX6lc9OsynPRbgvMNDdjGpAWRzz2T7j8xcj8lwFG44ZnWGwv9iWyUxJyq14mH 7VUUCp2+36gheuTtbxTiSMUBt1nlixokbb2zZEhPv81RGlQc+Z+edl0PASsfoCcU83su PJ957JDDHI+jujWsF+O22m1KmAIIPZa0qQaXfkcE/bJ/iyciOS80CewcHcDAjh58Id6W rz/Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v186si2227295pgd.1.2019.03.06.14.00.24; Wed, 06 Mar 2019 14:00:40 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726380AbfCFV6V (ORCPT + 99 others); Wed, 6 Mar 2019 16:58:21 -0500 Received: from terminus.zytor.com ([198.137.202.136]:47271 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbfCFV6V (ORCPT ); Wed, 6 Mar 2019 16:58:21 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x26LwBLV1897174 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 6 Mar 2019 13:58:11 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x26LwA6p1897171; Wed, 6 Mar 2019 13:58:10 -0800 Date: Wed, 6 Mar 2019 13:58:10 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Louis Taylor Message-ID: Cc: louis@kragniz.eu, tglx@linutronix.de, natechancellor@gmail.com, mingo@kernel.org, hpa@zytor.com, ndesaulniers@google.com, linux-kernel@vger.kernel.org Reply-To: mingo@kernel.org, hpa@zytor.com, ndesaulniers@google.com, linux-kernel@vger.kernel.org, louis@kragniz.eu, tglx@linutronix.de, natechancellor@gmail.com In-Reply-To: <20190302184929.28971-1-louis@kragniz.eu> References: <20190302184929.28971-1-louis@kragniz.eu> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/boot] x86/boot/KASLR: Always return a value from process_mem_region Git-Commit-ID: e4a0bd0308f05c1354d28feec8439e869eae6372 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,BAYES_00, FREEMAIL_FORGED_REPLYTO,T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: e4a0bd0308f05c1354d28feec8439e869eae6372 Gitweb: https://git.kernel.org/tip/e4a0bd0308f05c1354d28feec8439e869eae6372 Author: Louis Taylor AuthorDate: Sat, 2 Mar 2019 18:49:29 +0000 Committer: Thomas Gleixner CommitDate: Wed, 6 Mar 2019 22:55:30 +0100 x86/boot/KASLR: Always return a value from process_mem_region When compiling with -Wreturn-type, clang warns: arch/x86/boot/compressed/kaslr.c:704:1: warning: control may reach end of non-void function [-Wreturn-type] This function's return statement should have been placed outside the ifdeffed region. Move it there. Fixes: 690eaa532057 ("x86/boot/KASLR: Limit KASLR to extract the kernel in immovable memory only") Signed-off-by: Louis Taylor Signed-off-by: Thomas Gleixner Reviewed-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Cc: bp@alien8.de Cc: hpa@zytor.com Cc: fanc.fnst@cn.fujitsu.com Cc: bhe@redhat.com Cc: kirill.shutemov@linux.intel.com Cc: jflat@chromium.org Link: https://lkml.kernel.org/r/20190302184929.28971-1-louis@kragniz.eu --- arch/x86/boot/compressed/kaslr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c index fa0332dda9f2..2e53c056ba20 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c @@ -697,8 +697,8 @@ static bool process_mem_region(struct mem_vector *region, return 1; } } - return 0; #endif + return 0; } #ifdef CONFIG_EFI