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=-11.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 C13A9C433DF for ; Thu, 30 Jul 2020 06:14:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A6D9420578 for ; Thu, 30 Jul 2020 06:14:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726774AbgG3GOY (ORCPT ); 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-next-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-next@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--