Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp112585rdb; Tue, 19 Dec 2023 10:48:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGDc419uvKGItrslTUXWaeqdgCeGLn2+gqL3Qv0azR4VlxKk/lUvR5hxCG+YRoN29I8DKzW X-Received: by 2002:a05:6214:2622:b0:67a:d238:8e31 with SMTP id gv2-20020a056214262200b0067ad2388e31mr27632737qvb.105.1703011705018; Tue, 19 Dec 2023 10:48:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703011705; cv=none; d=google.com; s=arc-20160816; b=jhkZik6Fn7NL8VtNeiHXQKDvWGfMsNR4ufDCrpVS+NmvXMvjBQTeEu2FFEjozbHnjK B0VcfCfVHDMpe6lKEJXcsCyN2yGG5eUK2ktSXeYV4Umf1KVz45cuwcYxaIeNpQloWANs Y3H0Hpty3rr2JA7PlHfDhW+Xx36wPNAOzwktMaRj6EGLrrJ0OS2EHmBITNUo4AgbfeBj p0lAZibVWVHqL5Lb9C94ML6zBXWhKJu3+w1sLBNt82A8+LLpOsRRNW/3M2MG+fZmrYYH 00dbMjWpAA5l98SbFY1eqCpVKCvWZXkvoWz/ZOwI2eAjszWHfyd5IncTk4JfeGlIryIZ bMyw== 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=AH7uJyoYvXfA7ti80+MOcTI9tFmh1yE9F3ak/L9o5YU=; fh=FbtzLkgqPrL2lUNNvz5lQHVZdp+H3VgNt+iftcSmFZE=; b=CWZzMG8sHPNunDfZUTwsYqbdSkcJg9SYXX1lMSNS23+lriE0G9iDhWx3u0vEi9gOyX 9WTYd2z28Jme0TcEwoSLVkwjc5HmDs5agRUmlrgzWrsJnr1qXkhiNhVYGSDLE06s2NsC 71/3OEtA29WCkREfECXsRJ676xKHizW8qHD6ak7SDKn/Nb5f7ZReixpYIBBpRC6QzMSb GtuRq0rmls7TTbEOHBIVaPksH4Oa1ARhm8OGNBJUaNszbVs8Z82cNuy6U3SwU6dPYgCi z4+yAadTr/FuPSwU+9HUCUNmGnJfEvON4fGi2LFDVMYEaTKxF0ESqwP/3sbjX4K8V12E 6nAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RWASHrIn; spf=pass (google.com: domain of linux-kernel+bounces-5828-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5828-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q6-20020a0c9a46000000b0067f610329bfsi1570491qvd.489.2023.12.19.10.48.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 10:48:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5828-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RWASHrIn; spf=pass (google.com: domain of linux-kernel+bounces-5828-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5828-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B16731C2147B for ; Tue, 19 Dec 2023 18:48:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05C9438DEE; Tue, 19 Dec 2023 18:48:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RWASHrIn" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.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 E43C93C6A3 for ; Tue, 19 Dec 2023 18:48:04 +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-yb1-f201.google.com with SMTP id 3f1490d57ef6-dbd59ddfd66so933514276.0 for ; Tue, 19 Dec 2023 10:48:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1703011684; x=1703616484; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=AH7uJyoYvXfA7ti80+MOcTI9tFmh1yE9F3ak/L9o5YU=; b=RWASHrIn3kAs92Xf7MZqKRKxUUiOL31fD5CSJ2+EGbyoTopYQmnzFPO8XZuh1mU1wd WGkk5HHkB4R1Bp8FWMj4jodfBZiaSxBP4ZuuXKlb8QRpTAZwGGCAhg6MxpG90dBH1Cl5 3jpf4BgDrOV6M0otQUiiyvswptcOBjKccI3yDyVQj0Zuju198Cdb/OaSdCNynBoVwZmK h979Q4t0KEz0uPD/XxDUArjHXssSzmZwsFx5d3Q1oK+yBc/Xr0paWGhsJ8JVVKFXm081 UqVy9z2Zc8Nm/ZWI1RdRFJqHDsf11h/zOobAM3vzhE94qIDywg9f9o8QXDry6VH9Zznt 0jtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703011684; x=1703616484; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=AH7uJyoYvXfA7ti80+MOcTI9tFmh1yE9F3ak/L9o5YU=; b=QZa+WnnG3S3i5xVOXNCRJYOJcLIdYHrZyoJc2QVhwQpL2MkBqFK8zQ2FEKW0ej1qJq WBhvgSb+wo8u8/auB9dstZaSQmwo0LfjM49ED3WtDnmujNmmma+NkJt4zk+Vf9G0KBRp A8NVgo6AqzI0GIIJYXB59UQKfkdkDyNjyxuDa0NCIRkhnmtDIxvq2HzAFSodJB1gqWnm Sd9q6zQcGrg8lHJtRJcy9m/C4EGHC8x35Ehoe0ksh4f6f8z03UxTS7g32b4Eq9F0CSyL 77UKDxEymBjvur419M2AX4cgpTzZNTAUXCAII0cTdy0Trz5GBjVyMQwCQ15J8fILhFzl mwKw== X-Gm-Message-State: AOJu0YzOopGmkFrYrj/oQhiH2b0ca31G+7d0iHfNXLnzHPRxQnQ4eivn JsgWRJw3vfX4nowThpgGp0sPV6gM5fD3 X-Received: from tanz.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:c4a]) (user=tanzirh job=sendgmr) by 2002:a25:be92:0:b0:dbd:2c5a:6c53 with SMTP id i18-20020a25be92000000b00dbd2c5a6c53mr565316ybk.6.1703011684012; Tue, 19 Dec 2023 10:48:04 -0800 (PST) Date: Tue, 19 Dec 2023 18:47:52 +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=H4sIAFjlgWUC/42U3WrjMBBGX6X4ul5m9DMa9arvseyFJM84hjQud gm7lLz7ymFZ0tjFuRzD+c6HNPJnM8s0yNy8PH02k5yHeRhPdfDPT005pFMv7dDVuTFgLBpw7XH I88c0nPqDpE6mVoxlMUm9SGkq9T6JDr+viT9/1fkwzB/j9OcqOOPy9fusM7bYFuqso2RyDPG1H 8f+KD/K+LZk/wP9Nhg0Fh8seJvCa/+WhuOVW0qczY7YLOKsNhTjELy74f97cZOD1mYNEmwmpO3 C34GgGH1XVGulW/Da2O40trWx8xyAO+WY/WZj3uKg9QC586ygwa/EbkfsFrFmdAVjcCqPil0VU 1AODjBDsNtHFbfBlCQbcvW4jK4a+53GvjZWRY4u1kty9Ghjv9xRUgZvRJnjSky34o2tpEVsSIw iKJf4qJiqWIPWZUZOlPJKHHbEoYqFwKAlZCnd/XPgHZ4rb1KJsXDEXOSejzt8rDxYrZuvYl0s9 zzCTgBCTYiUoiEgFuJVAu4lLL8EYp/Fh7rt3ZczuFwufwEJ9zqx+gQAAA== X-Developer-Key: i=tanzirh@google.com; a=ed25519; pk=UeRjcUcv5W9AeLGEbAe2+0LptQpcY+o1Zg0LHHo7VN4= X-Developer-Signature: v=1; a=ed25519-sha256; t=1703011682; l=2179; i=tanzirh@google.com; s=20231204; h=from:subject:message-id; bh=43BPgdbj/Ms3cbxr1wobnwnr0jH7BWniivgiGR2rpqc=; b=coinp79Ec0TAuh3fiFjsDVNEqMFsREd1n2Mt0feZKhSdtKEaXxLqyVStXKcahXivUexhHkdMi bJMQGmZWzlzDrK/7mRiG4DzabmHFPttI3RUcew83zYCphbMi7L0UfF2 X-Mailer: b4 0.12.4 Message-ID: <20231219-libstringheader-v5-0-206d4afd309a@google.com> Subject: [PATCH v5 0/2] shrink lib/string.i via IWYU From: Tanzir Hasan To: Kees Cook , Nick Desaulniers Cc: Andy Shevchenko , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Morton , Greg KH , 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 v5: - Removed bad copyright. - Link to v4: https://lore.kernel.org/r/20231219-libstringheader-v4-0-aaeb26495d2f@google.com Changes in v4: - Fixed personal email client so name appears instead of just email - Removed kernel.h where not needed. - Sorted include list in lib/string.c and used linux/limits.h - Link to v3: https://lore.kernel.org/r/20231218-libstringheader-v3-0-500bd58f0f75@google.com 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 | 2 +- arch/arm64/include/asm/word-at-a-time.h | 2 +- arch/powerpc/include/asm/word-at-a-time.h | 2 +- arch/riscv/include/asm/word-at-a-time.h | 2 +- arch/s390/include/asm/word-at-a-time.h | 2 +- arch/sh/include/asm/word-at-a-time.h | 1 + arch/x86/include/asm/word-at-a-time.h | 1 + fs/namei.c | 2 +- include/asm-generic/word-at-a-time.h | 2 +- include/linux/kernel.h | 7 ------- include/linux/wordpart.h | 14 ++++++++++++++ lib/string.c | 17 +++++++++-------- 12 files changed, 32 insertions(+), 22 deletions(-) --- base-commit: ceb6a6f023fd3e8b07761ed900352ef574010bcb change-id: 20231204-libstringheader-e238e2af5eec Best regards, -- Tanzir Hasan