Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2121702ybg; Thu, 30 Jul 2020 10:50:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnjbTy87VPNAJJWMkbWaiip833bInJMhojBisXLJquxxLZcaizsp9Rc0XHa4Nk/0uarq/p X-Received: by 2002:a17:906:1104:: with SMTP id h4mr238036eja.456.1596131425523; Thu, 30 Jul 2020 10:50:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596131425; cv=none; d=google.com; s=arc-20160816; b=u2ZhQh4/TvPeS59uzdLK/EartZriP1X7Ft3pK6v5WX2ED0cbFWne6Mjb8TXnP6oJJb IID/ktAfg4gL05FNa19erFTVcU0n02BQ6qJoC0EEouimqm6kIWoLeCke5QH4cpkkfJIo jjrAF9uhH93WbmeZTT1dt+m/F3fuOyneufv/Su5/tR2n+L5Wetybsq9LvXBcggD0CUOR jlIUcnWx3PNgp6pgg9rGmB9cI0KrDz09VZw8B1XTHvRARoh3UdtjkAK5tmQ1m2dJRTHe FHMnN6ToNnKbyQkxNOGfxBEYwb8uNSeK2tvkRRbYz3idqm7Im0tPS8FYlwSdPCxxNZHz j41Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zAsQlJjseg79dIzBbf/4vurEEGf0c2eOUDl+PvAPEAI=; b=WQfpWHutDMCMmIMcwFU+T29wDp9ZwR7LOKYhRiee/fGUO3vvCFcxTKQiviwoyUrWVF gcBu82CxVOEi+PEPnHQRi/KZUkY55CihxNM84tFOAT8yDpoMJipTIDhIV2uAzbt3qlNu WiQkAgqSgU7sD8YOZA7GeOY7cOS+H1Gh6FuhRax8plwZuUpebbIbRLfqbNnERwLvEayQ 2iFWK2jFOOCtoZA2wEUt+dMRsTZ9vQdz6sxS/uo8QAage6E51LUb8pMC82pycvhNn28T a+IH8k8wn1mXpnnBLArCA6P8xsk2ZPa/lGOV9EGigiGNfAOfqiADi5IBsMqO+0rmfbgA z1hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XQNHsATM; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si3547539ejr.349.2020.07.30.10.50.02; Thu, 30 Jul 2020 10:50:25 -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=@chromium.org header.s=google header.b=XQNHsATM; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728527AbgG3RtX (ORCPT + 99 others); Thu, 30 Jul 2020 13:49:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727056AbgG3RtX (ORCPT ); Thu, 30 Jul 2020 13:49:23 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B682C061575 for ; Thu, 30 Jul 2020 10:49:23 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id d1so14826762plr.8 for ; Thu, 30 Jul 2020 10:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=zAsQlJjseg79dIzBbf/4vurEEGf0c2eOUDl+PvAPEAI=; b=XQNHsATMjgwdlN+2nu6MR3D1xdDgseWEmpVyZgYm+QWBm9FpEjYCq+VVAAMIRbAAqF 7X9yXtCbgQek2i1LQd2U7B0iW5Nrh8bZER+kJ81L78Q7tJRr2GVqDy8t7XzNMCfl6om7 h3GE++/byH6PTw09HYTwIHWZCcfOV+5bCaVpM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=zAsQlJjseg79dIzBbf/4vurEEGf0c2eOUDl+PvAPEAI=; b=qrA5c1bJzexrJhyOesElq8s9msP0VJljhJXRy5qUGKnl6j/ksPErGzSiK6hKKPpRQk QBLmAacLQ0phOKD99RJ1IMZY1FhfNIponXgynxDrh8fieRMv8OL6Rn39ijxorXQrMR2S yy+CcfGezqordd/x+ucpsNijsGHZTo98zbCUWmh0sL2dAgjHfnq3PVuPKcb9hqkZG80i hW6sKwRaP20dvL4COEWhDlS0ufzOeLbjq2tlLOYXqU0ikW49d4zHwu3jOYoemyKpF665 ntkHaAqYLt2J24fnLwndbEuvDrL41UYFnrd0tR0os6DQM17Wkm9BhLWdoYM4isxi9g2V 1AHQ== X-Gm-Message-State: AOAM532Wa4sYBS5L42x01+SFtHSigSvPEn0/Corc500eh90smE3JjRI9 CpONtAFWLGRgP70sYiYURI0GF5g2rtA= X-Received: by 2002:a17:90a:e390:: with SMTP id b16mr280073pjz.20.1596131362651; Thu, 30 Jul 2020 10:49:22 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id q10sm6508778pfs.75.2020.07.30.10.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2020 10:49:21 -0700 (PDT) Date: Thu, 30 Jul 2020 10:49:20 -0700 From: Kees Cook To: Willy Tarreau 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: <202007301047.5E8561F203@keescook> References: <20200730090828.2349e159@canb.auug.org.au> <202007292007.D87DBD34B@keescook> <20200730032250.GB7790@1wt.eu> <20200730061407.GA7941@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200730061407.GA7941@1wt.eu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 30, 2020 at 08:14:07AM +0200, Willy Tarreau wrote: > 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 > 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 FWIW, I was only a messenger. Sami (in Cc) pointed it out to me right before I got the email from Linus for the x86 plugin breakage. :) But yes, thanks, this seems to work for me. > Fixes: f227e3ec3b5c nit: Fixes: f227e3ec3b5c ("random32: update the net random state on interrupt and activity") -Kees > 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 > -- Kees Cook