Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1688233ybg; Wed, 29 Jul 2020 23:16:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5xzlf/UO8RWZRaeLLrl1yTe11WiD5uRk7CbEOqI5b50SBlyuqAQR6ITEd6u0DmQgZn7pr X-Received: by 2002:a05:6402:cb3:: with SMTP id cn19mr1227968edb.368.1596089805956; Wed, 29 Jul 2020 23:16:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596089805; cv=none; d=google.com; s=arc-20160816; b=wqlBzrLHTX50SgMeU8uU/tUnAcG5gxQs5dvQbewiKYCLXJceNa/QXlHYkawHThd6JR WhXshh/kQHWg9zvPQe8k/IDUqAEST1g9GvCQomck2GESQTr5vnf6xayvfuUOIZqYusCs uT/VRlr0xxozbjMQ4LJCRmmVF1IvR4Ouqw2TFcA4bB54LAwDK9VjUXjxC1X660/8Kqwz o0nBIumlSj9qw3sct++4t0y30PmQobiCMdWmihZr/G7yYB0hXyZU/8k8EppmrOIPJUka ECcDdtidv+jwp6HtqttLw8KSbWiOSoCT40WgMfyxw+EmkdkTgD1tZ3+gdVqS4/2tMnHZ StsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=fHH/b3SiYJK0vSAx8b+yGjuB7As/pCMM8RD91Gk4gEU=; b=zgxu5yfv2M57WeEJncpAiy61PiLDaQeKBJk5vAq4dlaXSWbe3EyoRAOPrclKpfEyXG nSzIQ5twvGkF5Cyyo+PtcbxcYpxCw/1o+Hf4R6N1JAHgkYQKMXyXQ3fd78oazrynV6+j wpSKBVLX+ZJ0EHUuXTV/nC0zuHS+aIj/QqrQXDlfk3EaxxAULUa8PELZtsetmt38FbxN W/6I/2/sWJz0UkZ52uL6tjabazYQxfglfttZo1wa1asZ2VnNweQ2KekdbtRHeEOt/BnZ 0HO736zDUdcBkAjbasMOBt5HfK7x6d/FExBfnuKvY/z9EDMIYVb9EigBcqjAp8JL1smd YL7Q== ARC-Authentication-Results: i=1; mx.google.com; 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 bx11si3034337edb.24.2020.07.29.23.16.23; Wed, 29 Jul 2020 23:16:45 -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; 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 S1728645AbgG3GOY (ORCPT + 99 others); Thu, 30 Jul 2020 02:14:24 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:39189 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725892AbgG3GOY (ORCPT ); Thu, 30 Jul 2020 02:14:24 -0400 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 06U6E7kL007952; Thu, 30 Jul 2020 08:14:07 +0200 Date: Thu, 30 Jul 2020 08:14:07 +0200 From: Willy Tarreau To: Kees Cook Cc: Linus Torvalds , Stephen Rothwell , Emese Revfy , Linux Next Mailing List , Linux Kernel Mailing List , Catalin Marinas , Will Deacon , Sami Tolvanen , Daniel =?iso-8859-1?Q?D=EDaz?= Subject: Re: linux-next: build failure after merge of the origin tree Message-ID: <20200730061407.GA7941@1wt.eu> References: <20200730090828.2349e159@canb.auug.org.au> <202007292007.D87DBD34B@keescook> <20200730032250.GB7790@1wt.eu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1yeeQ81UyVL57Vl7" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200730032250.GB7790@1wt.eu> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jul 30, 2020 at 05:22:50AM +0200, Willy Tarreau wrote: > On Wed, Jul 29, 2020 at 08:17:48PM -0700, Kees Cook wrote: > > And just another heads-up, the patch[1] (which was never sent to a public > > list) also breaks arm64 (circular header needs?): > (...) > > Definitely, we've just got a report about this, I'll have a look once > I'm at the office. I'd like to check that we don't obviously break > another arch by just removing percpu. If at least shuffling them around > is sufficient that'd be nice. Otherwise we'll likely need a separate > header (which is not a bad thing for the long term). So Linus proposed a clean solution which might be harder to backport but looks better for 5.8. However the attached one addresses the issue for me on arm64 and still works on x86_64, arm, mips. I think we should go with this one first then apply Linus' one on top of it to be long term proof, and backport only the first one. Linus ? Willy --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-random-fix-circular-include-dependency-on-arm64-afte.patch" Content-Transfer-Encoding: 8bit From 18fba9e2dfb16605a722e01f95d9e2d020efaa42 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 30 Jul 2020 07:59:24 +0200 Subject: random: fix circular include dependency on arm64 after addition of percpu.h MIME-Version: 1.0 Content-Type: text/plain; charset=latin1 Content-Transfer-Encoding: 8bit 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. Reported-by: Daniel D?az Reported-by: Kees Cook Fixes: f227e3ec3b5c Cc: Stephen Rothwell Cc: Linus Torvalds Signed-off-by: Willy Tarreau --- include/linux/random.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/random.h b/include/linux/random.h index f310897f051d..9ab7443bd91b 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include -- 2.20.1 --1yeeQ81UyVL57Vl7--