Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp589363rdb; Tue, 5 Dec 2023 13:59:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IHCD3cD4dFO5r76D+FxzOduVq7Gc2cU6xmFZVK5b4KfJd7DGbuvBttqIhqX5YWIdtV2EDAH X-Received: by 2002:a05:6a20:9f9b:b0:18f:97c:9792 with SMTP id mm27-20020a056a209f9b00b0018f097c9792mr9715672pzb.122.1701813576517; Tue, 05 Dec 2023 13:59:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701813576; cv=none; d=google.com; s=arc-20160816; b=d8vs9jWKtVOmo5OADBRhrcM8CUYDvzkM5OSh/yIpnpzO1bSK4gAvBXkJb4IAuzyCfQ u4ajnKa7/bya/dCvRFUw87aFY9TReH/5aTcUxOGTaAk/h/Ya4RiC0M10rbV7icLCM+gn 68Hf2uMo9XqqoA+RTjfxUSNVZ8ta6qGnW71GgUPVXKY/jQo6o0IJwU6ne2O85Nq8SxxY qt8MdsKlZR7grDmeD7b08PjrUSHbF+jaLTRkcvtSUtckFw7KCmeaS0QftUr2X8e2aDrv cSFv/7vAF0tEWsdTrmjGLYs/qy98JvNyHKmZfOVplimoTDOQp1quk7JPJbMSaLKLdlcD J4wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:feedback-id:dkim-signature:dkim-signature; bh=oEPjPECBKCwcLWLM3gvDTaE0OrE/1laiUsggX/0Z8LQ=; fh=/SqMT3xBLd/1vcciXA3y7sVtuJspVt/IITUDPxkmca4=; b=jle941HZWBlrGwwSwsNKZonn1iBfoJefzcl4Dek0W6aEGZ+lUjvosRd85pG1X/t2T6 OTSKX3FJFI93+wf8T5pCai+7ijCDM9pbVg1VEj2NDrnMfwkBwLqt3kWf5a6vpNBUgKCX eq7deHFVA9R/v77TUppVUWpkhfRqEQVZjPhzKETFNUCjVsgqAIzvr7hmmUA++Okl8Aj7 UflRj2+mN+RkR9j40uDlzofoYkPWGWNJoOrFpLuRi6YbDbDrwljZxbQN2F3/YZEVBZZ+ qieuc3uw8bW32VzISwX7YvA7C3IdduYgYU6FEUCgHFOQyK059SuKB3cRMtyukxdi6zeW jGxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm1 header.b=BPXyGSs2; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="Ngsc/2d7"; 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 Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id j9-20020a63ec09000000b005c6075f8a31si4861508pgh.153.2023.12.05.13.59.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 13:59:36 -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=@kroah.com header.s=fm1 header.b=BPXyGSs2; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="Ngsc/2d7"; 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id A3152808EED9; Tue, 5 Dec 2023 13:59:33 -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 S1346322AbjLEV7M (ORCPT + 99 others); Tue, 5 Dec 2023 16:59:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229645AbjLEV7K (ORCPT ); Tue, 5 Dec 2023 16:59:10 -0500 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97E5011F; Tue, 5 Dec 2023 13:59:16 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1EEBC5C023F; Tue, 5 Dec 2023 16:59:13 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 05 Dec 2023 16:59:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1701813553; x=1701899953; bh=oEPjPECBKCwcLWLM3gvDTaE0OrE/1laiUsg gX/0Z8LQ=; b=BPXyGSs2AfntfRuxop23q56kYzZvm6+Z1M1CefAV8RqMaetVgu+ RmgYPipsBCVN0Qygo2br2F+rccLicK4L6zHERNJZ4P+dGBPY89x/byk4GzA9uyOE vS6sM8ps5a+i5fXe4fADcbdgzMuweK3cYjiRiVbzpDl9tah9yLFLz/O08bmbEaId hCnthgGXiBX6mN5AJkww3XccIuViJcO3MI6tHVLI3YOM7Buu/KCyuGAUO+Cu/CEA Rnxna3+q1OZXql8BRJLZ5VEY+Qf8ITJHwJ/7pgpEnAARTU4QgSKfn4enCyIzwuNI PkB00Cx6J5gZpza/j45TCOsh55YCwGQq89g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1701813553; x=1701899953; bh=oEPjPECBKCwcLWLM3gvDTaE0OrE/1laiUsg gX/0Z8LQ=; b=Ngsc/2d74fYMW+HSP88D+5ke7jBDDXg4d65+v0fgLC4M58TgS1I 41L7UrMNxjwdbQros+k4Ijx4V1VSXudVD8iYBN3TOd8aMDTsA2EcG2H3n8VTJm52 eLxaFniSYbmVO066sfcTWq+lVGRxjQGNnFo9QKaczhGshqtAmJMxaOmDT0gOviUp qDhSmpPqeEdPDXLkbj4JEN3xoXZFqIAzW751jHIb3vUN5u6EUZUG+G1UTb0zGJJs lREsrj83MArqrwQgemMLA/fAzqKr+2gOcykwCq57voKxpmNpwC7frAaHYqi9kXjD fTZxFo1FKCSoSs7ssLw9nHDVeeKdJ+04r/A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudejkedgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtugfgjgesthekredttddtjeenucfhrhhomhepifhr vghgucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuggftrfgrthhtvghrnheple ekheejjeeiheejvdetheejveekudegueeigfefudefgfffhfefteeuieekudefnecuffho mhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtghomh X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 5 Dec 2023 16:59:11 -0500 (EST) Date: Wed, 6 Dec 2023 06:59:07 +0900 From: Greg KH To: Nick Desaulniers Cc: Al Viro , tanzirh@google.com, Kees Cook , Andy Shevchenko , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Nick DeSaulniers , Andrew Morton , llvm@lists.linux.dev Subject: Re: [PATCH] lib/string: shrink lib/string.i via IWYU Message-ID: <2023120608-ivy-snowdrop-890d@gregkh> References: <20231205-libstringheader-v1-1-7f9c573053a7@gmail.com> <20231205213807.GE1674809@ZenIV> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 13:59:33 -0800 (PST) On Tue, Dec 05, 2023 at 01:51:10PM -0800, Nick Desaulniers wrote: > On Tue, Dec 5, 2023 at 1:38 PM Al Viro wrote: > > > > On Tue, Dec 05, 2023 at 08:58:53PM +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. > > > > How does it account for arch- and config-dependent indirect includes? > > > > In particular, on sh this patch breaks, since there word-at-a-time.h does not > > contain an include of kernel.h, even though it uses REPEAT_BYTE. This is > > a very simple case (they really ought to include kernel.h, same as all other > > instances of word-at-a-time.h), but I would expect arseloads of more subtle > > breakage in anything less trivial. > > > > And I'm not at all sure that there's no config-dependent breakage as well - > > this had been caught by quick make allmodconfig + make lib/string.o on > > a bunch of architectures; the graph of indirects includes (as well as the > > set of symbols needed for given header) is very much config-dependent. > > We're sending these to Kees to stage in branch flowing into linux-next > in order for the patches to get soak time in linux-next; it's not > possible to test every possible randconfig, but with enough soak time > and the bots chewing on linux-next, I think we can get to a certain > level of confidence. > > We'll ramp up the amount of testing we're doing locally as well. (I > did quite a few randconfigs locally in a loop; didn't test all > architectures) We can probably fetch the kernel.org toolchains for > very extensive testing. > https://mirrors.edge.kernel.org/pub/tools/crosstool/ > > > > > > 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%). > > > > It also breeds includes of asm/*.h, by the look of the output, which is > > not a good thing in general ;-/ E.g. #include *anywhere* > > outside of linux/uaccess.h is a bad idea. > > It's not clear to me when it's ok to #include . Is there a > convention here that I'm missing? General rule, NEVER include asm/*.h, there should be a include/*.h instead that works. So much so that checkpatch.pl should catch this, right? But of course, it doesn't always hold true, there are a few minor exceptions, but they are rare. thanks, greg k-h