Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4430857imb; Wed, 6 Mar 2019 13:15:06 -0800 (PST) X-Google-Smtp-Source: APXvYqz0krzBtwNfouNuq5+hEOuG/cepxRXtCSIJmDp7WKXciYjctVDE3DrZZwjsr3QnPz7j5aiA X-Received: by 2002:a17:902:28a7:: with SMTP id f36mr3331320plb.169.1551906906905; Wed, 06 Mar 2019 13:15:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551906906; cv=none; d=google.com; s=arc-20160816; b=KQ2ihkhElnI8XExo2IBZ4L/+OuibBFtOuOm3Cm1qMmAyTAImBi5c+zbciONBlJMpGd WDZvUV5IuvlIbqtbHI/WrNhxSuXM+3eP8nsSBRKfNI+Rs/+4zIsDeJ6SFpj+f6rxK4NK w01zJPDKCh7fMXl8w5MkuhHFG/MD03eqeFF6QYwiIy5jcmNcZevolKwZCctobHDQSmI2 L0R1/JnUsvvejtj3vUeFiP9cEl8iLqGd8fCt2HM/NGZMlv5Kia52bke9xN3WjqBtddb+ 8FOmMqlN1X6Svgv0oyt34wcjEvaWeu4Sz8a2tgUxPtwfsHa4q/wfVex8CV9EO79oUG+S KpyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=Vq1ZSXUzvQhZA07uwh8/fbF0Z4vX+8yA14I0hhjBBdM=; b=xLztH21OUZIhHT2r1B+1H7NuibqltB5unL8sVtNMGchAJG6haXge13UP+9j3YCToSQ nanUMOwPS2ffHLM6iiwu5gUA5YM3f2qdIXXDLOJSnznwnvmAaRtyxmiNT5/pNvWCt2rF FkTDRr1Z9F4eFYmgy5VOv1JSsGG3akDJlIdGzBFLiA3NWP5OqhDkSOaUiZ+n1MPmNIFg iFXiHIiR7yiKSyuKJcA7+tShbimNO9bB3n8dtjr0RMzcT+6RWiItQu95j5ojM1NTjUTK hVY/8evDEUOS1pP5NT/1OC5gmpavxzIgv4jse8lJqNy+1LroAc6rIA6ZXbLiApotD6M1 hWDw== 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 a73si2191090pge.5.2019.03.06.13.14.48; Wed, 06 Mar 2019 13:15:06 -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 S1729312AbfCFUDA (ORCPT + 99 others); Wed, 6 Mar 2019 15:03:00 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:52198 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726233AbfCFUDA (ORCPT ); Wed, 6 Mar 2019 15:03:00 -0500 Received: from p5492e2fc.dip0.t-ipconnect.de ([84.146.226.252] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1h1cka-0003yB-9H; Wed, 06 Mar 2019 21:02:48 +0100 Date: Wed, 6 Mar 2019 21:02:47 +0100 (CET) From: Thomas Gleixner To: Louis Taylor cc: mingo@redhat.com, bp@alien8.de, hpa@zytor.com, x86@kernel.org, fanc.fnst@cn.fujitsu.com, bhe@redhat.com, kirill.shutemov@linux.intel.com, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, ndesaulniers@google.com, jflat@chromium.org Subject: Re: [PATCH] x86/KASLR: always return a value from process_mem_region In-Reply-To: <20190302184929.28971-1-louis@kragniz.eu> Message-ID: References: <20190302184929.28971-1-louis@kragniz.eu> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Louis, On Sat, 2 Mar 2019, Louis Taylor wrote: > 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 probably have been placed > outside the #endif, so move it there > > Link: https://github.com/ClangBuiltLinux/linux/issues/360 > Signed-off-by: Louis Taylor This lacks a Fixes: commitsha1 (".....") tag > 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; > } This does not longer apply to mainline because the function does not longer have a return value. So if that's important, you need to hash that out with the stable folks. Thanks, tglx