Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp561684rdb; Tue, 5 Dec 2023 12:59:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFGnruNGYIBNDk9fqqGOQVz7OOmHGmBbd1YjOI4/pf4pPvMdsdphL5TgKahNfqQa53j/Ine X-Received: by 2002:a05:6a20:12d4:b0:187:29f9:e12e with SMTP id v20-20020a056a2012d400b0018729f9e12emr2814869pzg.29.1701809972613; Tue, 05 Dec 2023 12:59:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701809972; cv=none; d=google.com; s=arc-20160816; b=NGvdEj38TDxFySLindHoxIaAAs1l3Cv+bHFpWzFLBE7gC7tlBm/7hCBjurcsGh7t2X Dlm+fYwQ8dnsIGAjn6ltUL1FiMTtyx7C+mqZVwUdIqFnvLvUXki8oGLv7vbdjyWNPtDE OHuL+jrkGpxCJdx5p71cEY8S/zW4IEM57udwUiBqUgqdJwktMD+ryatvODQewPVo56wC i4MxKjPyD0rc36kaHDl5LgrvbRTmKRwS+H64ndCTrqSEAoyGU4TZpufVf2pxuHwkEuh8 pmqb3LaU3Lfemv9Qkv4Z7dHn91oUACpS1lF92+w7aWF04LlqN3gNAUB9hJ6g6qoFJcni 52Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=W7RafG7nAWDAAGrW/jUsNIHCRJDj/ZzkUDLX/nKv/hI=; fh=SdGHvL56GsiXeB19fcxrduM11NRqdUWswpTqJn7DH14=; b=NOomIPAT1R5DZes7SsHeEP8Lc7IrxGm2kn8eAq9OzUQ1hCVOIRqDxKsg61dLn/tnBj Aon0X7hyT4/NDEHn9L/k/HBYSXlDpWPPoWyxM8cPMKar5dR9G+XoQPGWVtgo21zErdls PrMdhy3widcczVbxLhC8unuxkeeLI/qCdD+MXGepkGQBl5pd1QdZ1Up2Hpsgd+sJcGYs VnGitYh8A2+k+RtDcgZAj1Pp1sM+JNdx4D0Elp6G2YdHvm/5Wkuj6ovFviVQv/oGZ1Qw bYF8ngh2xdebdZvOvuH0t3rqfHaBJM9LkBx0Q9W5LN1wpONizciYwkbb8MjaTmEUWc/B xo2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=bSbhY2ad; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id r195-20020a632bcc000000b005c660a37af2si5982230pgr.255.2023.12.05.12.59.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:59:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=bSbhY2ad; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 6020C80966CD; Tue, 5 Dec 2023 12:59:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230162AbjLEU7H (ORCPT + 99 others); Tue, 5 Dec 2023 15:59:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbjLEU7G (ORCPT ); Tue, 5 Dec 2023 15:59:06 -0500 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B13431B1 for ; Tue, 5 Dec 2023 12:59:11 -0800 (PST) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-5d340a9cf07so93308617b3.3 for ; Tue, 05 Dec 2023 12:59:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701809951; x=1702414751; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=W7RafG7nAWDAAGrW/jUsNIHCRJDj/ZzkUDLX/nKv/hI=; b=bSbhY2ad88ELW9pZX6M9AVWET1WR1YpZt6ZhCraQIsAHFtR6oNI766yKez9B63i7mx xJWbbWx3qgK3UijO9Pygn/w4RBZtjT6kZgqav6NczRR9WBTQUjh48ShBfnf40Owp5KHM QYT5AK4ajSMzwUCXJdeN5zK1LqO/LTPg71Qlla74G5prsTGhz1hDqDaQm7ye+oaWIuOU iqzwVNZVFjSDp2blKgrGvKdBJnz3ZJNOVDbmKsf+fhdLISkiXAO0M+eaPYPkZQSIC/HW PxFb76uCZwNNfQVYCcLAXSKwnfNui6H3yfOB2uR4QMusQtgpTVjfReVg9Fivp+73jDZi Vdag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701809951; x=1702414751; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=W7RafG7nAWDAAGrW/jUsNIHCRJDj/ZzkUDLX/nKv/hI=; b=tzXkxkazaetM4PV+LsWprBFlz2n3fcpxsl6ue62kXSR9tjtPHZ3OqhpKiAIyzGyz2H b3HWHxFhb79pxLS1iVSg4rmsdN4dcHXO83WQwv7NCkv3zTto0SN8t4US2k0cVdZ+qxXo 2cFZtaZxC4L53QHMwO8uQ8oOadAXUvWNbR0Qj78bjxr01fy8y82D2+tTN3/Q5ycuG0Pg X29c++/oGKdz09/2yx6t4XpCk0O+xhdkD/TFDFVC9nLkud/kp7VbqPJNGkG1/In1jWHG vt0Jl7SDP0N92YEBQV49673nWApFE7FqaNLw9ltQ104stLHbq/5UKguLEdUmnVoVeZLk O4GA== X-Gm-Message-State: AOJu0Yw/ZDO+5N2J/ejRGRinBHHngE3L0HolXjtvQJAB+Cs5+IUXTizg aJF0JFw+dlsEsPCaDenMuNRIdLMVroo4 X-Received: from tanz.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:c4a]) (user=tanzirh job=sendgmr) by 2002:a81:6d91:0:b0:5d8:39ca:4824 with SMTP id i139-20020a816d91000000b005d839ca4824mr138285ywc.4.1701809950939; Tue, 05 Dec 2023 12:59:10 -0800 (PST) Date: Tue, 05 Dec 2023 20:58:53 +0000 Mime-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAAyPb2UC/4XSS2rDMBCA4asEreuiGT2nq9yjdGFJI0eQxMEOp iXk7pWzaetQtBzB9wsNuomZp8KzeNvdxMRLmct4rgO87EQ89OeBu5LqLFCiApS6O5YwX6dyHg7 cJ546RuUZ+2yYo6jqMnEun4/i+0edD2W+jtPX44IF1tP/Wwt00EWblLY9BnK0H8ZxOPJrHE9ij S3YCOAaCFm5iBqk0fvh1Jfjj1cNr6rXxjvpU/YUzNbrhterzwF0BHI689abhjfV5wyeNAUL2m6 9/e3Ns7erR8uYQWYfaetdw7vq2UoEZcFzTFvvG95Xj30kip4gxKf3U8NT9VJlhLo7pSluPchGA GQtkO0JrbSerX8qQKuwfkLrTWDjZEjpzw7u9/s33ZJMGjMDAAA= X-Developer-Key: i=tanzirhasanhasan@gmail.com; a=ed25519; pk=UeRjcUcv5W9AeLGEbAe2+0LptQpcY+o1Zg0LHHo7VN4= X-Developer-Signature: v=1; a=ed25519-sha256; t=1701809949; l=1597; i=tanzirhasanhasan@gmail.com; s=20231204; h=from:subject:message-id; bh=OpBF4JO9qEH0eFq9aQn9Qy1e2TtS+Dvl+rfyupEM/hU=; b=G2C30+8JBiyLP+brqVYCFRKKsEOwWYcODMl+8oBzBX4I1wKHBpcIzqzsZmbtSf8ei4tm2bXDd 3Pj/70/QYYoBhZTVzJcLoI/enQ4fP7Pa/1o5uPYJUjjXNAO3gnbLJiY X-Mailer: b4 0.12.3 Message-ID: <20231205-libstringheader-v1-1-7f9c573053a7@gmail.com> Subject: [PATCH] lib/string: shrink lib/string.i via IWYU From: tanzirh@google.com To: Kees Cook Cc: Andy Shevchenko , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Nick DeSaulniers , Andrew Morton , llvm@lists.linux.dev, Tanzir Hasan Content-Type: text/plain; charset="utf-8" X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Tue, 05 Dec 2023 12:59:29 -0800 (PST) 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 Signed-off-by: Tanzir Hasan --- --- lib/string.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/string.c b/lib/string.c index be26623953d2..aff066e9da9f 100644 --- a/lib/string.c +++ b/lib/string.c @@ -16,16 +16,16 @@ #define __NO_FORTIFY #include +#include +#include +#include +#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include - #include -#include #include #include --- base-commit: 33cc938e65a98f1d29d0a18403dbbee050dcad9a change-id: 20231204-libstringheader-e238e2af5eec Best regards, -- Tanzir Hasan