Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp565220rdb; Tue, 5 Dec 2023 13:04:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IFfQGUu3V0UxDm1wUqwDVtYBPoLfylH2xnmnHLb1yIXgCXuXWhiDil5KF90hmjknhKzlVyk X-Received: by 2002:a17:90b:1d89:b0:286:ceb9:97f1 with SMTP id pf9-20020a17090b1d8900b00286ceb997f1mr1445689pjb.16.1701810295369; Tue, 05 Dec 2023 13:04:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701810295; cv=none; d=google.com; s=arc-20160816; b=fkHq/RdjSPvDhb2irw367D5uQ09xkD2a/vLDyvMoCGa/3CmvZAacHA12muxD1r3D/W gg86FgL/dUp0wF15bNrx7BJ24FqhpC11Ita1GoV5FYIsTszLfvG5H2ZnAjxpXXcEmfD9 JWbbzVJp4B4k4tPpXeTvPtPkB/Fsv9xaQGaTbxhLWrAhE9Z2zAF1gwfhcS+XgT0/smMU k8SPm4m//iBqE2u9OHvAMO7teELgApxj0VZaefLXvREXcTOqrc3wAn+IOYaqSXTwBOC4 9uq0Ece2PwGa3ln+4BeOuJCbAB467WEKsSahrid9KJi1V68Nuw+wPkGh/tsSok4R8y7a g/wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=IDzbVjgOWRfD5lpzC2BeAde1mbVTzqh7Gv5+dpfQty0=; fh=g0iWkyz+vErEHBukzKPf2Zgfl6VHSVU8c2kITPEvcJM=; b=hIkRwWAcr4evCH42Pcf1t/PNdWBRqFtFa54oZbRCQ/g9T/IjsGaGEzqwUwjV6NGclk lrYCFnVHmjhig9V9ojYbjc6yF37zUuQHX6naURw5Ch0LVRli3QL+F4Fu0zVQfrW6CKC3 U1N35liW+zGE+CwWY036OMsae4pw4lgDAIO9r9WerRCS8lU6b3Oo46S2SdFFGLeSsGIv dOGEnMVBYyy7J+3Mzt1Gy3GLW/6CxNuUKrPWL/XGIbLYWAbO83YR5d8+N+1FkT8EQdxp zdRckT85gkyjvUR/LTQJXNOE8QKeKJ/ztf8y/Cy2HOJwPKJy0HMaQkn7ypbR+bXzWP9Z alZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=Umm13VIf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b3-20020a17090a800300b0028644ca706dsi9613413pjn.171.2023.12.05.13.04.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 13:04:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=Umm13VIf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id EFB6F80BD276; Tue, 5 Dec 2023 13:04:53 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345870AbjLEVEo (ORCPT + 99 others); Tue, 5 Dec 2023 16:04:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbjLEVEn (ORCPT ); Tue, 5 Dec 2023 16:04:43 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56C41188 for ; Tue, 5 Dec 2023 13:04:50 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3C92C433C8; Tue, 5 Dec 2023 21:04:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1701810290; bh=oBo9P7E2H1qo/8P7D4Gn1bqot50xulgDivPddX3B360=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Umm13VIfsxObQ8ml3mnlVj2Ggug4q74F5giIj1ChM2SJpMGqfOoIJm/I/zwxWurWb UO3nMTeKUpysC/bdJyiBA/s/ehpIBbSeHj6P+xggFewzgSUQw6z1xt+5uNePlJR/MN WX7rq/HoUa6w6xG42vWWspTCu+TsBaCrNZzf6wT0= Date: Tue, 5 Dec 2023 13:04:49 -0800 From: Andrew Morton To: tanzirh@google.com Cc: Kees Cook , Andy Shevchenko , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Nick DeSaulniers , llvm@lists.linux.dev Subject: Re: [PATCH] lib/string: shrink lib/string.i via IWYU Message-Id: <20231205130449.8e330a26ecbed1f7b5ad5d7a@linux-foundation.org> In-Reply-To: <20231205-libstringheader-v1-1-7f9c573053a7@gmail.com> References: <20231205-libstringheader-v1-1-7f9c573053a7@gmail.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 05 Dec 2023 13:04:54 -0800 (PST) On Tue, 05 Dec 2023 20:58:53 +0000 tanzirh@google.com wrote: > This diff uses an open source tool include-what-you-use (IWYU) to modify > the include list changing indirect includes to direct includes. > IWYU is implemented using the IWYUScripts github repository which is a tool that is > currently undergoing development. These changes seek to improve build times. > > This change to lib/string.c resulted in a preprocessed size of > lib/string.i from 26371 lines to 5232 lines (-80%). > > If there are any problems with the output of the tool please raise an > issue on the github. > > Link: https://github.com/ClangBuiltLinux/IWYUScripts Issue: > --- a/lib/string.c > +++ b/lib/string.c > @@ -16,16 +16,16 @@ > > #define __NO_FORTIFY > #include > +#include The preferred way to import bit-fiddling stuff is to include . Under the hood this may include asm/bitsperlong.h. Or it may not, depending on Kconfig settings (particularly architecture).