Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp2941766rdb; Tue, 26 Dec 2023 10:00:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IGP6TBWkIlT6ejHrsxeOBIfmIPCI7YJ3p/M+uGH8xqM/eSWHVwHBpCFRglVr/TZ0QqCnljL X-Received: by 2002:a05:6214:b8e:b0:67f:99ae:75b2 with SMTP id fe14-20020a0562140b8e00b0067f99ae75b2mr8287889qvb.123.1703613658442; Tue, 26 Dec 2023 10:00:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703613658; cv=none; d=google.com; s=arc-20160816; b=mR09sNullVoVeYFsQZDU9J36+aaegfnR4J3NcRpdvIzvlklyLgHoB84vi+3dsvvpqa j62gQS9nPx2x9Kg0/g9JzpuSUn6jRkiM9OAnbL8gbXSarnzEHWP2HWSNRtsKY53GC9j/ DwwvnN1dydWwLAmMdakA9e2ZgAw3Po4Jf6Kfxuk+oqi6+OIPD0eF16HakKwsjJtJYmL+ V/RWF7qceJ3vAIpWS/l+yKidTLU1m9bsP/ZHWl0TxS4HOOUft5qyHWmztB3TSTCDSBsI P1O7DhMOh68RvVxLb/2VtAuiMxhFxlvCtqglFhemd6BZm2PEEKFCuCooSXFE5Q0zyrs7 l6tA== 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=uL68m7/nloxAmVxHBhyXARaUNsJ4FqLRMv7smk0VXkU=; fh=FbtzLkgqPrL2lUNNvz5lQHVZdp+H3VgNt+iftcSmFZE=; b=D6S+xKfuCBqGwS4REnTq5Y73XvaAnNdreSK8tPhoZfp/3AuXecNd5iSck0zuvbWVEQ 0KmMKNSusqxhz/zwd6MfjsgTmxvleN3WRrlRnDHfg1OWDgBpXDn5smlrvk/sYhYPe/V8 Am2j7VrfzvYxegksETKamT0kLbgKoUjcQ/tN5DvcOHlGda1gJTYWm+oqeuSKI2YQgUWi R2V66GkCXqHGccW19EuwJNBLOzJrRGdqYtCOcq8Bf+b4tdeEP76AYnGu4K0/HZsnehGj 7iVkjYc4Df8xNiCq4CuNibuwvNWlkYCRKnXeuVceW4WGv73kjVIdi0w1aeznj1ZPTigF HU2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=KeNFWTQT; spf=pass (google.com: domain of linux-kernel+bounces-11601-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11601-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 x16-20020a0cda10000000b0066cf06339c8si12801696qvj.197.2023.12.26.10.00.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 10:00:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11601-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=KeNFWTQT; spf=pass (google.com: domain of linux-kernel+bounces-11601-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11601-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 32EE71C21103 for ; Tue, 26 Dec 2023 18:00:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A3DF5024D; Tue, 26 Dec 2023 18:00:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="KeNFWTQT" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.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 816B04F892 for ; Tue, 26 Dec 2023 18:00:49 +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-pl1-f201.google.com with SMTP id d9443c01a7336-1d3e5d18308so50497755ad.3 for ; Tue, 26 Dec 2023 10:00:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1703613649; x=1704218449; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=uL68m7/nloxAmVxHBhyXARaUNsJ4FqLRMv7smk0VXkU=; b=KeNFWTQTn/Gy3ABudQCerTHTVaR6j/S/Z5sXYjm2u/W8O4hdUIPhL34HOVv3xQH4la ZKKOgoNN6CO/9oJycYu7MYQ//OwlEinisljxbyUfvT32OImi1m1K/qL+32+T0T5cHT7x JeLe+tJCCGP0OjMv2GrecLziXS1mfrVsAb2UzllcqJBtb/H/Oaq/q3MpPAxXqmnhfRsx bToL3LU554YggCgxX0X3gHK47SqhWlULJ4ZZdxpGkSUrhOfcWQuGBEw6JQQzAQeCltxf 8zmoC6IzHQEkkNWDULjHsXUgT/XhDCWkp39ayo+alpTUYQo2Nv75mAB2CTHOlRV5/n0V sGQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703613649; x=1704218449; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=uL68m7/nloxAmVxHBhyXARaUNsJ4FqLRMv7smk0VXkU=; b=sSChC1x3T7Rp/ZagvuY6XN8+ZE98iReTyo0e55/yKwDiPcwhqXNvy/m7/3egQikMc1 sFQrPepYH8L5GzVU21mTXbdhsdXK0bZFpcV89AWvDCMAQQplJaYO7fqkv39ciLhnteX7 eJaw+gKqDvmYkm/DgfgVqmmuU5NcP37vCAcWFP4BUdIoEZy/VnTrfn7K6xyoEtRi0DVB CuA3M2iex86hF5H6/Shdx7uUGSO79ZtoFu771JChfIiiLpt9Cac9w0ZcanbE2lKGXC4O zW6K6jeOWZtnZy6cVSjb7Rz1XHQF4uvdvglpsuvFqXSgjRdH8wQQwCnzJtGypi/K0fTH 8QAA== X-Gm-Message-State: AOJu0YzjEmYdhyBZldJ4g+6yUNHlgIGfuU7vQzTrtAJ5qzXmptaHG4WV YU9Y6RUHNrKv5Em6kQSVTHy/Ohparj2pNWtiueA= X-Received: from tanz.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:c4a]) (user=tanzirh job=sendgmr) by 2002:a17:903:1c2:b0:1d4:3bcd:4317 with SMTP id e2-20020a17090301c200b001d43bcd4317mr228480plh.7.1703613648926; Tue, 26 Dec 2023 10:00:48 -0800 (PST) Date: Tue, 26 Dec 2023 17:59:59 +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=H4sIAJ8Ui2UC/42Uy4rbQBBFf2XQOgpV/ajuymr+I2TRjypb4LGCN JiEwf+elgnBsTTIyxKcew/dXfroZpkGmbtvLx/dJJdhHsZzG+jLS1eO6XyQfqht7gwYiwZcfxr y/D4N58NRUpWpF2OjmKRepHSN+jmJDr9uid9/tPk4zO/j9PtWcMHl6+dZF+yxL1Sto2QyB349j OPhJF/L+LZk/wX9NhiUiw8WvE3h9fCWhtONWyQuZqfYLMVZbSjGIXh3x//rxU0Oeps1SLCZkLa FPwNBkX0tqk3pHrwZ2x1j24ydjwFi1cjZbxrHLQ56D5Crjwoa/KrY7RS7pVgzuoIcnMqzxa4VU 9AYHGCGYLePirfBlCQbcu24jK6M/Y6xb8aqGNlxuyRHzxr75Y6SRvBGNEZ+2ngBDVB1SasFTit jujfeeM60GBsSowgaCz9rTK1Yg7YtwJgo5VVx2CkOrVgIDFrCKKU+7lHc4WPjTSrMJTLmIo887 /DceLDaVkbFOi6PPMJOAEJLYEpsCCgKxVUC7iUs/xKKPosPbU3qf2dwvV7/AAPVY7szBQAA X-Developer-Key: i=tanzirh@google.com; a=ed25519; pk=UeRjcUcv5W9AeLGEbAe2+0LptQpcY+o1Zg0LHHo7VN4= X-Developer-Signature: v=1; a=ed25519-sha256; t=1703613647; l=2420; i=tanzirh@google.com; s=20231204; h=from:subject:message-id; bh=vEaBhflrd5vMapldmscLIaaJ/z8U/1AZB7sFpnB7nVk=; b=eCLsBksk7Ew4KMhKgVxOJ0lTDMKkj1WQmj/2pbxoPN3s8KVL4V+lNNy2NA433QAJhnskjoZ0u eB9DdT/PIVNC0Ci9WXitVLr3qccFXLHfRaaVpgh8L22m9iS0ZeiY82L X-Mailer: b4 0.12.4 Message-ID: <20231226-libstringheader-v6-0-80aa08c7652c@google.com> Subject: [PATCH v6 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 v6: - added linux/bitops.h to wordpart.h - removed kernel.h from x86 - Link to v5: https://lore.kernel.org/r/20231219-libstringheader-v5-0-206d4afd309a@google.com 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 | 3 ++- arch/arm64/include/asm/word-at-a-time.h | 3 ++- arch/powerpc/include/asm/word-at-a-time.h | 4 ++-- arch/riscv/include/asm/word-at-a-time.h | 3 ++- arch/s390/include/asm/word-at-a-time.h | 3 ++- arch/sh/include/asm/word-at-a-time.h | 2 ++ arch/x86/include/asm/word-at-a-time.h | 3 ++- arch/x86/kvm/mmu/mmu.c | 1 + fs/namei.c | 2 +- include/asm-generic/word-at-a-time.h | 3 ++- include/linux/kernel.h | 7 ------- include/linux/wordpart.h | 14 ++++++++++++++ lib/string.c | 17 +++++++++-------- 13 files changed, 41 insertions(+), 24 deletions(-) --- base-commit: ceb6a6f023fd3e8b07761ed900352ef574010bcb change-id: 20231204-libstringheader-e238e2af5eec Best regards, -- Tanzir Hasan