Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp34946rdh; Mon, 18 Dec 2023 10:45:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHFWwSx73C4HEMEibBkqkB6qhC52t1jq5i4+sMUWmT0sz8vq6eNq10rcfTs1TzCgWM346wJ X-Received: by 2002:a92:ca46:0:b0:35f:727b:21ab with SMTP id q6-20020a92ca46000000b0035f727b21abmr15548892ilo.45.1702925099915; Mon, 18 Dec 2023 10:44:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702925099; cv=none; d=google.com; s=arc-20160816; b=mfB2H7/+tNcUmfFzgpdAPWYqYHCIHdtCxpKYQIWQOog7wOYRtJV1wMMvggyFNDufoR /f4qlawINco1wgoWf89IXwjcm4Q72U/OwoQUS3HtChv70nA6I3mUDsx46oXQCRzTXn96 +LgZkc+nsfcx+Z/IwPNo0/NErNUijCtRHIlJd1qn+a+s6NEja+KZ13aLmmGr40TJzWc+ JcJ3UDI63UTokDGjlrboh7k2o2Qi47mB8En/WhpH4a5rjSbsj6IVp4wzx5ve88t4j7qd t1Ugx4XxAoszIzKfMKeSUhU67Zwu0Ac9KyPc1ZctMXk+hQOmR1KxeQ/LXv6NFJKNzZjT SRmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=Umcq9pE2qVMi4A7br5lqgMwWQo55dWONwlMYoYlXcJc=; fh=Sn96uMIYbxvXu8NN9D0WQ1og+KuMdWtaWLEr1nKEP5E=; b=l38wGSG2K2rTRym3zfZKVD+OzQWSlZEXKhl5UYcAeGr8qFWkEAMETIkykXtYSm+pTR 6I2o+0b2vb5Lw9MJTqwajyS94LV0FVHE7fxsI4xu+zXaL6N3mNp9aigHG88RExYKHr6Y BihioHFdUy6ZBfa3c/ZdnuMQnjtIyBQLkJkYHGsDDcVB3m2LiIfhihQq4ld6OTJYet91 UxM1P8eCoWnNsUPnm4mh9TJei2FWf/rUPEGWQwmIRL8v4B19zsbY9TxCkSnROEZQN6/3 iRpW/wHXsBBISwJGAgYTnKFE1WQKVvn6rbdPvSd09GnF6T7B9w+0rzWrpCTwV5xcdEDl dD0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=tbau4Ucg; spf=pass (google.com: domain of linux-kernel+bounces-4253-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4253-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h21-20020a63e155000000b005c69765acddsi18076839pgk.87.2023.12.18.10.44.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 10:44:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4253-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=tbau4Ucg; spf=pass (google.com: domain of linux-kernel+bounces-4253-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4253-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 80C08281F50 for ; Mon, 18 Dec 2023 18:44:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AAD1E4989D; Mon, 18 Dec 2023 18:44:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="tbau4Ucg" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 803161DDF8 for ; Mon, 18 Dec 2023 18:44:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--tanzirh.bounces.google.com Received: by mail-pg1-f201.google.com with SMTP id 41be03b00d2f7-5c1b986082dso2338301a12.0 for ; Mon, 18 Dec 2023 10:44:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1702925091; x=1703529891; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=Umcq9pE2qVMi4A7br5lqgMwWQo55dWONwlMYoYlXcJc=; b=tbau4Ucg+1TSUNp8jNMUSJsGz+aUm+qOHGKLlgp78HyMP16dUN0uQ4avAIwQsExeH3 zrs2fwKJBV/HnAhUhzN42cdgYp8qA+LxJojrBB+EglGlI1nOceHTkL8KWXsv9Yct4Zxc RQGMuhaQVJ7kPdNIvOF5iilSSkzxk+QHqcnH1d0sL8uybgTyeRRtNFsCq5NmpLfifGxK vBghrJf1qxarj7+wUDRPVy3xn905zbcrQrFGUminaDVpPeAUxTGUoYPfFILvMZ6JoWpb tsXl5vhtEqxw7d9WscB/hRfAH6x6RtsBGDhP+1QGDmOwS+Cu+ClIp9dqhomF8e4I0C1B BZ0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702925091; x=1703529891; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Umcq9pE2qVMi4A7br5lqgMwWQo55dWONwlMYoYlXcJc=; b=lkMq6JbvoZLpU7pNknbebwPS+IAWhB8n0Sem75mlpz5AZOc1Oq/jm7X/LKyi0lCC9a cuGIihW1nMR0rJmqnN0vGx4h2Dk89+JzMBraU8TcPEujJCka7zCEj3OqDC5RgrFb5TG6 lsJQFAlYJcrDNQkq9mvTeE8pNhSxnaA/t3GL5fnF57tuZM3ouLTUWPYQ6mwTV9qxVmtS OggIrgYIGxmnZ/NuMV0uX46aGI5kJs3WbiScCWNpCzLgQNGuqt3MBJuf+XuE3rh6x2kB Ltx/seeixBYwKEvIcR36uZaKCT1V1s00UW+pI21SBu+orymIdq53hv9WR4ozytAf5/YM VFIw== X-Gm-Message-State: AOJu0YwRApdR9FD6hKNozskWVAl4Pha9dLvd8J+Mx3G2nhBXG96qvah2 ABlptjqMZNIRaz8zwF9bI5CSIupzJeDF X-Received: from tanz.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:c4a]) (user=tanzirh job=sendgmr) by 2002:a65:6a43:0:b0:5cd:9db5:bea with SMTP id o3-20020a656a43000000b005cd9db50beamr67169pgu.5.1702925090774; Mon, 18 Dec 2023 10:44:50 -0800 (PST) Date: Mon, 18 Dec 2023 18:44:46 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAB6TgGUC/4XSTWrDMBAF4KsEr+ui0f90lXuULix5xhEkcbGDa Qm5e2VTSuo4aDmG782T5Gs10pBorN5212qgKY2pP+dBveyqeGjOHdWpzXMlhVQgha6PKYyXIZ2 7AzUtDTVJ5Uk2bIhildXnQJy+lsT3jzwf0njph+9lwQTz1+dZE9RQR9sqbRsZ0OG+6/vuSK+xP 83Zv9BsQ8cYjVPCqMbtu1OTjoubS0yysFjOiwMrF6UGYfSd/9sLm07UKrAjp4IFu134GRQMaNr InCvdw6WxKjRWubE23gnfssdg1ifWBa9nzwF0BHSaae1NwZvsmcGjxnxybdfe3vuNF7Ozl5Ykg 2Afce1dwbvsyQoJyoKn2K69L3ifvWwiYvQIIT6cHwsesxeK8+MyKY1x7UEUAkDkBLQNSiusJ+s fEqCUMP/11ptAxonQtv/u4Ha7/QDw4iUK3QMAAA== X-Developer-Key: i=tanzirh@google.com; a=ed25519; pk=UeRjcUcv5W9AeLGEbAe2+0LptQpcY+o1Zg0LHHo7VN4= X-Developer-Signature: v=1; a=ed25519-sha256; t=1702925089; l=1752; i=tanzirh@google.com; s=20231204; h=from:subject:message-id; bh=RDM8JOpRAJHGe23evuBZKylujjf7/Qb+zvnBcMz4jJs=; b=EEkbJY4feebHBYM69j9pAsvv38o2vJRW6XvSDPqCCEOT19ZRXkDrfelwZHecR/aI/ZfyTTqmn VhWknFpcrqbD4c74Bz7DycdCrOCDvDb1BCDJTNZ87dmBQUQl5wTvmrz X-Mailer: b4 0.12.3 Message-ID: <20231218-libstringheader-v3-0-500bd58f0f75@google.com> Subject: [PATCH v3 0/2] 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, Al Viro , Andy Shevchenko , Tanzir Hasan Content-Type: text/plain; charset="utf-8" This patch series changes the include list of string.c to minimize the preprocessing size. The patch series intends to remove REPEAT_BYE from kernel.h and move it into its own header file because word-at-a-time.h has an implicit dependancy on it but it is declared in kernel.h which is bloated. --- --- Changes in v3: - Moved REPEAT_BYTE out of kernel.h and into wordpart.h. - Included wordpart.h where REPEAT_BYTE was necessary. - Link to v2: https://lore.kernel.org/r/20231214-libstringheader-v2-0-0f195dcff204@google.com Changes in v2: - Transformed into a patch series - Changed asm inclusions to linux inclusions - added a patch to sh - Link to v1: https://lore.kernel.org/r/20231205-libstringheader-v1-1-7f9c573053a7@gmail.com --- Tanzir Hasan (2): kernel.h: removed REPEAT_BYTE from kernel.h lib/string: shrink lib/string.i via IWYU arch/arm/include/asm/word-at-a-time.h | 1 + arch/arm64/include/asm/word-at-a-time.h | 1 + arch/powerpc/include/asm/word-at-a-time.h | 1 + arch/riscv/include/asm/word-at-a-time.h | 1 + arch/s390/include/asm/word-at-a-time.h | 1 + arch/sh/include/asm/word-at-a-time.h | 2 ++ arch/x86/include/asm/word-at-a-time.h | 1 + fs/namei.c | 2 +- include/asm-generic/word-at-a-time.h | 1 + include/linux/kernel.h | 7 ------- include/linux/wordpart.h | 17 +++++++++++++++++ lib/string.c | 14 +++++++------- 12 files changed, 34 insertions(+), 15 deletions(-) --- base-commit: ceb6a6f023fd3e8b07761ed900352ef574010bcb change-id: 20231204-libstringheader-e238e2af5eec Best regards, -- Tanzir Hasan