Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp677625pxb; Thu, 25 Feb 2021 12:09:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzh1MTBqQVv84irtFnRANowiUQIG4A69tzFyk2U5sd02jOX8q4l0TQ7NP2IE2CiHyJmJIFu X-Received: by 2002:a50:9dc9:: with SMTP id l9mr4794920edk.377.1614283767751; Thu, 25 Feb 2021 12:09:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614283767; cv=none; d=google.com; s=arc-20160816; b=uk1nViQbOwGDOSb8AvX1Q0UG7ZrX6IhYidLAutvdX8S9C8BfhfTsFI0dqT40zRg4jk IcsPj/cEGZaNesR8RrXjd4hEYJOnecDWa54qMDLLmvenld3PYB8ofsCyf3zdSY6b+/OB EKUoNYcj8mJESmb9MawBSSyKGnWV4/h9YMa+cEoqQghXpTzN5zd5MVMIzRkuVCZnmSM5 0RXZyKVt/ep70faEkwAigULi5icDQIE/K4vvB+JnUPn7VS5lRYA0hqQ6HO6P5OsZjEc0 Ep6ma1nxqbrBMUUldJ5NezRp5udbB1LbeHU/dM6IFpezPtK8LW5pM7I7yKT303dgRVZ/ HTJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6RPrBVjVcwXNTAfTo4qsgsTEVWd5UOOmYaIsIS+INyA=; b=dFYzgmUmUfYgHVPY2EJTE3zF2LDOF9wH1vKEc3l/wKcCz8zo0fV/7jnMmKiKPXz2q5 saZN5h3C1aJSYjJDkMeywASgwnBJnYCtydCnFa+9MCJYyGn04PoDQYiCGd0pp/Ja4+El qvcxPJ2n49hlBW+29n/Apr6yNIp9yWICLXGl9F2zEX9FUCAc1u3bTu/DI+JeohaBfOIz m37LVO3vzxVQokwBoHx1Hi03kkg+puuW9+R6J8rfcfTOP6i8tYANIvM6XL40l4LzowgG jrGQin1mwE/M7NRFinXN2p8rvrMmwWWTlq/Hxc8Zc4IO+oEBAbRmJLSAPOq5te1jRHsC +T4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KHFmrqKy; 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 w25si4493752ejy.70.2021.02.25.12.09.04; Thu, 25 Feb 2021 12:09:27 -0800 (PST) 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=KHFmrqKy; 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 S234048AbhBYUFP (ORCPT + 99 others); Thu, 25 Feb 2021 15:05:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233952AbhBYUEd (ORCPT ); Thu, 25 Feb 2021 15:04:33 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB6F2C061574 for ; Thu, 25 Feb 2021 12:03:50 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id t25so4542016pga.2 for ; Thu, 25 Feb 2021 12:03:50 -0800 (PST) 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:in-reply-to; bh=6RPrBVjVcwXNTAfTo4qsgsTEVWd5UOOmYaIsIS+INyA=; b=KHFmrqKyyAn/C+4Esw6fFW8E7n1/tbMANIPjWmeVvCK47Yng3sg1nsQwx6jtzV/KwG zyOLf3BriP6qL273XcfogmFHtxlu9chPRLPbBtnMitXveKZVhmfQQ536lBp2nM9FyF5v CrFJJxikyWs1e6dpf++pd1XNq+sW+4xt/iKqI= 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:in-reply-to; bh=6RPrBVjVcwXNTAfTo4qsgsTEVWd5UOOmYaIsIS+INyA=; b=qzV1MrrvrldlL1o1A+lGvsmVcWVJBu68QTZxw2DMk5oiIIz8ZCazCsfMdwYIQhaFei Ko7pSDIJIamustwgs4EmcKlvGc1q2tr2xtFPiTiEdq5Isz2SzrMBhasZfiIF2KSi1U3q rBDmpT+QOnD712w8S579vkSxdGCeuwU9FCi84CflpXvGsSIo1QQN0oz4vO1G9u7+26Mj Kgp31crI4m66kOjUBj5aruXxnomna16YxzZTxwNdBzQNj8pQLVRD8DXvQTAOQtqIO2tk DxDMA1c2y+9maSsIGMsm9pa6abn624lDxOCcjHN8bVIMcykVg8PiPXiO0QQUpHz/eIo6 K8cg== X-Gm-Message-State: AOAM533umat/+uzwzf4Ukq2fmVrKc/FuNpHM7wwZlGuf5qry9RmNFoCy rQMuN2DTxt4UTv46wFbfhTRHsg== X-Received: by 2002:a63:2f86:: with SMTP id v128mr4382566pgv.241.1614283430319; Thu, 25 Feb 2021 12:03:50 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id x9sm6546989pjp.29.2021.02.25.12.03.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 12:03:49 -0800 (PST) Date: Thu, 25 Feb 2021 12:03:48 -0800 From: Kees Cook To: Arnd Bergmann Cc: Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Arnd Bergmann , Miguel Ojeda , Andrew Morton , Marco Elver , Sami Tolvanen , Arvind Sankar , Randy Dunlap , clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] linux/compiler-clang.h: define HAVE_BUILTIN_BSWAP* Message-ID: <202102251203.03762F77@keescook> References: <20210225164513.3667778-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210225164513.3667778-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 25, 2021 at 05:45:09PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > Separating compiler-clang.h from compiler-gcc.h inadventently dropped the > definitions of the three HAVE_BUILTIN_BSWAP macros, which requires falling > back to the open-coded version and hoping that the compiler detects it. > > Since all versions of clang support the __builtin_bswap interfaces, > add back the flags and have the headers pick these up automatically. > > This results in a 4% improvement of compilation speed for arm defconfig. > > Fixes: 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") > Signed-off-by: Arnd Bergmann Cc: stable@vger.kernel.org Reviewed-by: Kees Cook -- Kees Cook