Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp681929pxb; Thu, 25 Feb 2021 12:16:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqdhkOE+qgf9oK9sDLd7MF4PseulAWCrI3RuKvyeBpugPJPYU4r4GGOnS8ptI3Cgttax2E X-Received: by 2002:a17:906:d1d5:: with SMTP id bs21mr4469632ejb.242.1614284173312; Thu, 25 Feb 2021 12:16:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614284173; cv=none; d=google.com; s=arc-20160816; b=OxRJtSwisyCb9FkhsORLygQtUeciA5CNrqZ8hqH1hVa0XZb85FyeCugN65l/PwQwFM 3wpOV1r3vIbom0qwQs1ZiJz8qVxnlUcxrtlYQ8R5zXJnjHXtT0F0yftba2MUryHKykqD 7ONoDYWLNqSdt+iUQdOGUWWX74gHjZ3X+/s7h6wdmaBcaSNvO71F5zEIfhm20VVGJsK1 fdbJjilOFHFT95EwyXKCMnQakJnVzm4k8Cu29QXM0bhjEo497oRZ/0pHa5kHkXFEbdL6 lyhSmV5nlI3+KVkVOZCt7aGiioosYH8NjYJe7diF0BfR8U/l/9ZfNAiqsCRy+zf81aDB sFHA== 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=Zvcw89WwnBGHGgFAGR9HWVcW1flA9Xzl577WVAqCD78=; b=OwyuJYmNAhHBucg14Iw6WZBVcWrioDc8bizAUQ6mEF+XVUB4squnrFgO2OJ76AmMrp DVnpOrGizUKKNkGvl0niMbNs9lwSxFGMbq72QUGerhjnMJX7OyWSOfRz8otZC8Hw4LAa bFIBp+d5GPN9p1VUZkvZ4OQvnzXbwhJjqjKRSe8vV6Aen0gzD/3NnkM8OgF9K9AN1swe mniVZixWGCAdyfwCeutw3bQSEl6vN2duXC9avhTRQtI7pcK2Xjki9783XcGLijIF/at9 YU5/wOSR/u9bjnQvwXPP9sSGRAqGUOuCZXSc7E0SVuvbDlCXXdbhoQPbq1UPD59zX2TJ 76hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=b4JTddy5; 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 q21si4107851ejo.166.2021.02.25.12.15.50; Thu, 25 Feb 2021 12:16:13 -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=b4JTddy5; 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 S233286AbhBYUO7 (ORCPT + 99 others); Thu, 25 Feb 2021 15:14:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbhBYUO7 (ORCPT ); Thu, 25 Feb 2021 15:14:59 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09606C06178B for ; Thu, 25 Feb 2021 12:14:19 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id o6so4231892pjf.5 for ; Thu, 25 Feb 2021 12:14:19 -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=Zvcw89WwnBGHGgFAGR9HWVcW1flA9Xzl577WVAqCD78=; b=b4JTddy5ZgIX5TyNAyX/EEuoNzxOG0Ow6i26OWTw8EyLQHndl+mLZKBhliG57ThFoa Itked0FH9fWMyBenWUMsZfa/zlwigfp55KoaxBZKMiW5Lap7oOBSDmqTK6nAnthr8AsR HcpsajH5997DalFpyc3an0eLbNF7w35iQBXxs= 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=Zvcw89WwnBGHGgFAGR9HWVcW1flA9Xzl577WVAqCD78=; b=QMX6vfbQ/I0LSBxa4KhzdV9gSn4bNe+5Zco7b1/l3f3d44+cBlNxlTvnyOk42nj3JZ +MtC9ENdbwWnvVACWFUEzCmacZ2dfUjjltHbyHbhSUZtTUldOX9nilCv9jBe5AE+F4f+ nuYH9C39KwPMmy0+SSNPrifk+w+M7sEYaMIkqHwlKnS4qdomdp6Uf/OIf5NwEFETvaty HbowMoPXeWBs5bEO9Rs1HQPOqrlZYEhWBhMLVnmSwv+hhABV6Ju0jOtol/5C/AL0Myor taOep8M3TUVdoHB+BI1k17JFMQDnGqbxEMQMVIQeIWQ0ECv/PF2OocegNWEr3RAT8ijU +Fmg== X-Gm-Message-State: AOAM532B9SQuFzoyc2Fg3wBuwqha2ihgjomLW+bzeA0KHtGPNxcFansY QLVWBn9eFw9f7orpCbWVuhRvyA== X-Received: by 2002:a17:90b:4c8c:: with SMTP id my12mr100914pjb.35.1614284058580; Thu, 25 Feb 2021 12:14:18 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id d124sm7012807pfa.149.2021.02.25.12.14.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 12:14:18 -0800 (PST) Date: Thu, 25 Feb 2021 12:14:17 -0800 From: Kees Cook To: Andrew Morton Cc: Arnd Bergmann , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Arnd Bergmann , Miguel Ojeda , 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: <202102251213.5815C9B33@keescook> References: <20210225164513.3667778-1-arnd@kernel.org> <202102251203.03762F77@keescook> <20210225120637.8e2a234f192952829fc5f471@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210225120637.8e2a234f192952829fc5f471@linux-foundation.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 25, 2021 at 12:06:37PM -0800, Andrew Morton wrote: > On Thu, 25 Feb 2021 12:03:48 -0800 Kees Cook wrote: > > > 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 > > I figured 4% better compile time isn't significant enough to justify a > backport. Thoughts? It's a trivial change, so I think it's worth it? > > > Reviewed-by: Kees Cook > -- Kees Cook