Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1138035pxa; Thu, 20 Aug 2020 03:40:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxx3BZD+2KDt++CNAgJXLiA5A32r7/+NnfKiBsStqSCUScIWXNrNVUjIIkczjcVP0w67dEP X-Received: by 2002:a17:906:b5a:: with SMTP id v26mr2686784ejg.515.1597920047295; Thu, 20 Aug 2020 03:40:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597920047; cv=none; d=google.com; s=arc-20160816; b=Gu7HG6IRxZVN3y8Y8CMEV/f0pl6Lc+DYf0460At8BEjaimlm/3Ug1t/gIh6ba+r2b2 pWNPnHrIyBqw+qPLJcTbweJV3oA4M1OQ8ftgcXLhT9y2cvh6QrPi2kKNAzkPedGOOXgW V5k3py355qMvu5TUvemLseDzuYRnYJhMCDg/ihn6BxQenyVGhuB1h+mBE1SVOgBLJ+XB N0l1rXST0yLZfo2GrxdNBC+je+Rh5J6wLRnL0dtTpm8zVuX9f/vt4YAa1WQvqBdzfSg1 EF4cZpc6yIygMe9UmCh9HxJ8KIO126YNRx8r+g0MrUhvagPc36+vcpdRdQjIy4v4+V9N yAFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aGhrp8x9tIRnlD1aYYKMrizbVc83746Tvdrx+KXf0KY=; b=d2yMJXj+DHppjThnLut+Y/N+JGC5iefMwq6HHChPuETbBAP0vz2ShRoonokmWKXxwR ToFNCJBtyIrfC8kXkG0L6wB1WQNeo9E2tak9ch6+/2COgVSHklm0GoHWaJfvUU3hmnmL 1bitcRzWXvJr+sB0ElEAQYcdXK5ESy+pEAkVjp7rlxOwGkJ+Y+9Njllt8qUHWovbML3p z9MnHd1yvvfKg9RefdykSpLrFC0xPwvAv1D0TNX1d4qDi/2Y5iY49J57vlJS209axV8h 2auOH4yM1emDMnUn7w4yYRJIpzHlht48DezpmJmw/pNQZP+SvcqmJ/AZVolc1hNlgVMY BuWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JUOOGsL8; 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=fail (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 v25si951125ejg.91.2020.08.20.03.40.23; Thu, 20 Aug 2020 03:40:47 -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=@kernel.org header.s=default header.b=JUOOGsL8; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731852AbgHTKj6 (ORCPT + 99 others); Thu, 20 Aug 2020 06:39:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:40070 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729150AbgHTKSG (ORCPT ); Thu, 20 Aug 2020 06:18:06 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1EDB12078D; Thu, 20 Aug 2020 10:18:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597918685; bh=kDdwbS0exRe8DN8NFeJJvNMhH9H4vGfMaNa4HNDdiIg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JUOOGsL8eqQ23F1bvQHKB6LSAUobUb0ZxBZSn3yZLRoPZvsHXOtTyW88NLR2Gs92G obzTmliXQhgwG7p2F/T5u9LwIwOWEmnWN0k2X26lEcfRX08zG3UX3/Iw3zC1wgPyL9 /Bd0B1vIwspYALJzqAV+F9/lACT6GSwKlLaLD6Gc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Daniel=20D=C3=ADaz?= , Kees Cook , Marc Zyngier , Stephen Rothwell , Willy Tarreau , Linus Torvalds Subject: [PATCH 4.4 029/149] random: fix circular include dependency on arm64 after addition of percpu.h Date: Thu, 20 Aug 2020 11:21:46 +0200 Message-Id: <20200820092127.135521257@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820092125.688850368@linuxfoundation.org> References: <20200820092125.688850368@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Willy Tarreau commit 1c9df907da83812e4f33b59d3d142c864d9da57f upstream. Daniel Díaz and Kees Cook independently reported that commit f227e3ec3b5c ("random32: update the net random state on interrupt and activity") broke arm64 due to a circular dependency on include files since the addition of percpu.h in random.h. The correct fix would definitely be to move all the prandom32 stuff out of random.h but for backporting, a smaller solution is preferred. This one replaces linux/percpu.h with asm/percpu.h, and this fixes the problem on x86_64, arm64, arm, and mips. Note that moving percpu.h around didn't change anything and that removing it entirely broke differently. When backporting, such options might still be considered if this patch fails to help. [ It turns out that an alternate fix seems to be to just remove the troublesome remove from the arm64 that causes the circular dependency. But we might as well do the whole belt-and-suspenders thing, and minimize inclusion in too. Either will fix the problem, and both are good changes. - Linus ] Reported-by: Daniel Díaz Reported-by: Kees Cook Tested-by: Marc Zyngier Fixes: f227e3ec3b5c Cc: Stephen Rothwell Signed-off-by: Willy Tarreau Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- include/linux/random.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/random.h +++ b/include/linux/random.h @@ -8,7 +8,7 @@ #include #include -#include +#include #include