From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLACK,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B44E8C433DF for ; Fri, 7 Aug 2020 17:37:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 74FCA204EA for ; Fri, 7 Aug 2020 17:37:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TVvZChs7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74FCA204EA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=m/pjAE/uEjBij0arDq2g15x74EUDq7Yzm7sRLqL5tAs=; b=TVvZChs7rLyLem1/jg1Bl34Zm ZiGBZK8hl3EoeqoC1hB4O72KeapzKxbESXUfQAnDtaYh/3tTGlSWva23gfV4B5GD6WNGlZNac3IpR cIG4t3pRRtX8K0StDBl+5cDXK8fpAcN3YVCTLGbCihH9o7Q645eoRq9bUJQrGFx2zICb629MvpI15 uZ3AoRm0R7oznwylveU65BlSb3tvPdaGxhwcHQkKBEDbtWRpCBd9JGhIpHcjufzxGOTgojCA+BXdD Pow9IDvppdQTF7qzU/2O65eNuLTUjnHSOHzoyGmsFVHbNxFfraYjaMtBWhtbbGGSd1eNym6mXAiJL 6m8qPgnWA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k46HI-0002zG-2z; Fri, 07 Aug 2020 17:35:36 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k46HF-0002yV-If for linux-arm-kernel@lists.infradead.org; Fri, 07 Aug 2020 17:35:34 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6B71E1FB; Fri, 7 Aug 2020 10:35:22 -0700 (PDT) Received: from gaia (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7AA713F7D7; Fri, 7 Aug 2020 10:35:20 -0700 (PDT) Date: Fri, 7 Aug 2020 18:35:14 +0100 From: Catalin Marinas To: Guenter Roeck Subject: Re: [PATCH v2] arm64: kaslr: Use standard early random function Message-ID: <20200807173513.GR6750@gaia> References: <20200807144521.34732-1-linux@roeck-us.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200807144521.34732-1-linux@roeck-us.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200807_133533_727556_25E4D6AF X-CRM114-Status: GOOD ( 17.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel =?iso-8859-1?Q?D=EDaz?= , tytso@mit.edu, Linus Torvalds , linux-kernel@vger.kernel.org, Mark Brown , Qian Cai , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Aug 07, 2020 at 07:45:21AM -0700, Guenter Roeck wrote: > Commit 585524081ecd ("random: random.h should include archrandom.h, not > the other way around") tries to fix a problem with recursive inclusion > of linux/random.h and arch/archrandom.h for arm64. Unfortunately, this > results in the following compile error if ARCH_RANDOM is disabled. > > arch/arm64/kernel/kaslr.c: In function 'kaslr_early_init': > arch/arm64/kernel/kaslr.c:128:6: error: implicit declaration of function > '__early_cpu_has_rndr'; did you mean '__early_pfn_to_nid'? > [-Werror=implicit-function-declaration] > if (__early_cpu_has_rndr()) { > ^~~~~~~~~~~~~~~~~~~~ > __early_pfn_to_nid > arch/arm64/kernel/kaslr.c:131:7: error: implicit declaration of function > '__arm64_rndr' [-Werror=implicit-function-declaration] > if (__arm64_rndr(&raw)) > ^~~~~~~~~~~~ > > Problem is that arch/archrandom.h is only included from linux/random.h if > ARCH_RANDOM is enabled. If not, __arm64_rndr() and __early_cpu_has_rndr() > are undeclared, causing the problem. > > Use arch_get_random_seed_long_early() instead of arm64 specific functions > to solve the problem. > > Reported-by: Qian Cai > Fixes: 585524081ecd ("random: random.h should include archrandom.h, not the other way around") > Cc: Qian Cai > Cc: Mark Brown > Reviewed-by: Mark Rutland > Reviewed-by: Mark Brown > Tested-by: Mark Brown > Signed-off-by: Guenter Roeck Acked-by: Catalin Marinas Linus, could you please pick this up directly? Otherwise, it will wait until we reach -rc1 to avoid basing a branch on a random commit. (at the moment I can't build Linus' tree at all, fails early with some device tree errors) Thanks. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel