Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp777244pxa; Wed, 5 Aug 2020 12:29:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzGPevl9v+/xXBcVvSZUwfms28LIcDjwv2mVP1uJymd5xMqDlmCsyGnQkMCoiH14XO9eKs X-Received: by 2002:a17:906:4f0f:: with SMTP id t15mr772231eju.337.1596655793400; Wed, 05 Aug 2020 12:29:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596655793; cv=none; d=google.com; s=arc-20160816; b=JAtGot57OQ5gNzGQQ6e2SUtokhM+KLIuDlMYPs+EYeu1oMNS7LobsT9wHyhuO0gBY0 cAIzweENBJo/0PBJSvimP+q3S/vzP/gcHCr8ML5QBDzKhw3lCkGN6eHXAgQXK8USx19O e7Sc5/HI49XNNMdjEyB5sseXuHLUiBovezh5E2W1TeykkTri1WAhtmCc+ygnnTIx7C5W 2f2ba/vyuVmaGaYTFCJgVkDvITTmUGLA2jBL3T3au3oUzjkN8Jcgm4fgEenaMQwaiPlz z2IY4mjRex/OMMF1Sq8LPkioYouYwknwa5zMo7rYGhoriOKhtA7eselBjZc8OIAYG3cr 7GeA== 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=CmAwPBS28X23oIcYMO3KxCOKnjJuQUt6Q6Beov7H8bA=; b=mf5eBJfgV2VNS9+e2cB/FY6dgCK9zOm3On0t84ZXaBPZN4Wb4LQdFxDuwXAvTWGIdS O8RYniT4j87m/h9bNNRxVjbFC8BNsSPqGBgiCeCET7LZJR0GZlnKXIu5blmkIw/fYnBV MTYMo8XVmYzPwBOWlr716xQmKeUw42eKZwGNVixdPjC9LPJQ5+I5I23Th92ytHyrjWou Jyiot8P3opQ6D/v/Ytk8VTd+2A7PaSLcgNhUhRb3fMLoTJrYQZpvR4+bC33wnNfhv1XL uhLLlflFJfZ17Styb1DhbxVHkVphPMW+nVbIbfVa2IZVwd5QNF4xA1v2fnTD61zqKtyY uUPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sZITPTFL; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gw21si1888152ejb.656.2020.08.05.12.29.30; Wed, 05 Aug 2020 12:29:53 -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=sZITPTFL; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729064AbgHET3L (ORCPT + 99 others); Wed, 5 Aug 2020 15:29:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:33614 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728573AbgHERKf (ORCPT ); Wed, 5 Aug 2020 13:10:35 -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 49949233A0; Wed, 5 Aug 2020 15:53:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596642794; bh=gXEwiYtWJrb+EFFUrwnNNz7Jzhi9gU+IQFe3eDUXoAg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sZITPTFLCeHQKjrT23J7ffPjt2xFmiIJVVG+6hOb5c75SwVse5FVZHTK9t6BV7xHk PtNBwjnx+BSXWSh0TZiFtZLxTMA5k87EH2HZD8rxQXlYt9yLnqTIRAd+gP0xqu1D+n upkeZLQaryFjLiNAyXbfcEaWxqSADrI8E8J1PDpI= 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.19 3/6] random: fix circular include dependency on arm64 after addition of percpu.h Date: Wed, 5 Aug 2020 17:53:02 +0200 Message-Id: <20200805153505.648662836@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200805153505.472594546@linuxfoundation.org> References: <20200805153505.472594546@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 @@ -9,7 +9,7 @@ #include #include -#include +#include #include