Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp714594rdb; Tue, 5 Dec 2023 19:09:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQIg5o/hTK/EXO5Y9IpPV+cz1iFA0EwbhgCfBZw43mID49X3h6+ceetHEpe38x8DRz8gLu X-Received: by 2002:a05:6358:9144:b0:170:5d43:3888 with SMTP id r4-20020a056358914400b001705d433888mr345236rwr.47.1701832189149; Tue, 05 Dec 2023 19:09:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701832189; cv=none; d=google.com; s=arc-20160816; b=JOVqvOqeHUb+/d953TB+Xj10ncAvy1p07i/FUyyLUKIoCukfTbaWJwiC+mesvAzTAx wiYffRcHALYjB9dW6FzFzZU2ZCMP8b1+1CTn0tnxwBwf0Ohgplgqa0RUYtVeB5a6Ipqw gys2bmVgUzpvPD/qnfBYgMdZz+IeeSgxY1NvZODt2BlWuBgb+z6coAjqTE1njNjIYId+ jBREP7MgZYgVsPKmp8xXo7g24XRHBcHwH5pWbOkpKBM5JNCKFl4aupdiHhp4ImQxF2Ej 3gvt6TcIoYJMPGrYZeYaAs9tVygMhFYtl/7ihcDjp4zf3EHgka8V3kV2Tq8ZYztz65Ob a1sA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=Gxdi2p1Yk4cVJg6E5kznzYfmmylAHaLEa4Ys452Wccc=; fh=LCjxNlQ/yuPbM2hH59WbOy8cHW48P3ruGIqOd+mrKmo=; b=mrq1nDtAQfYtxvSyy3VDdxTXfZFIpd+1M5ToTmsxAlT50qgjYiiDJGGIwG6AyaK40J 9Bgm4W5ehkCZvWop51ZoPNXuuqxwsjM0JkXmqJYsvKux9BA8v4AtK4EuopypiD8zdy1C ajW7bVWOlWs6OANRNIJ3yIZekxRlV0l0FJVHjJVuAXExAYfeuNF+hWZ3s32wjhwNhkgN PW8ppLzuuFFy+tboRcoiaT3y4mISPAyTUtfY9O+OlrD8HTFG+7GP/Kfx9gQAOrYPAmHA vDPdxizor1vQYNBEw/3LZpAopr+hzmqIxATiMtuauuV82H2wQtNAcKgXzKvMVE9DP4l/ ifGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm1 header.b=i4hdYtqI; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=H51r7g3H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kroah.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id b9-20020a17090ae38900b0028654b61b78si9116299pjz.165.2023.12.05.19.09.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 19:09:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kroah.com header.s=fm1 header.b=i4hdYtqI; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=H51r7g3H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kroah.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id DE745802557F; Tue, 5 Dec 2023 19:09:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229577AbjLFDJY (ORCPT + 99 others); Tue, 5 Dec 2023 22:09:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbjLFDJX (ORCPT ); Tue, 5 Dec 2023 22:09:23 -0500 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C69DD1AA; Tue, 5 Dec 2023 19:09:29 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 60A255C0280; Tue, 5 Dec 2023 22:09:26 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 05 Dec 2023 22:09:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc: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=1701832166; x=1701918566; bh=Gx di2p1Yk4cVJg6E5kznzYfmmylAHaLEa4Ys452Wccc=; b=i4hdYtqIFUOVf+8n84 PjgoROde2ekdUMDbZ8s+3AYfuvufs3hppWaaikpS/RnDiGfMI4Q1JLZhBYJ77n4n kKAVTy8aI6PAnh7I3HV1d6EYJaDu+a7eKbBcTcvcWUK0PVpTCgcij+NngvPL82q5 IJzLp9iInZ1JNKxxZrGpe/XntMmmJCW7dN7vesRgk9frbuEXrPE8xZQ71PmVx6EW oq9OHjalRzfG6d3+faG3barDAB1xEk9uUfRYYQEtM7SjGDPg1hQd1z8ApuXanPxp 5A3yuMWb8oMNN0hx+LPehjCw2+LTQF0bRqvgc8VBFVss/62WnxH2g6E3MXADU83u 4jNw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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=1701832166; x=1701918566; bh=Gxdi2p1Yk4cVJ g6E5kznzYfmmylAHaLEa4Ys452Wccc=; b=H51r7g3HoBensEOkyoaIOWc0/6sh2 Ph/AgYEHfJbThnTYjxLiKJ1T6bFuVg55E+bTLPGBrWCHO7K0xRgGv9251tt/a2oc EESLCRhy8DxnWiLpM9MqzIAVVnr6s2u8nRh5FdTAsAPv11OSIk0ENFi4Saqac7D/ Okf76KWsfoyX6ufuaxmYpc2kXGAt1gTLZSUqZsmJsbKKuAJNh7SUG4AIgldiUPh+ pstlhp4sjZnhT3siM2XeOEBL6qTPWL2Ychae65es0xFnyPNiIumuVM3q2RhSziFV y2wuxlI0BmhBbdy9C3AMeCEkviD+BChKGqKQt5l1J9ce0Ioau6GLP5uFg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudejledgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepifhrvghg ucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuggftrfgrthhtvghrnhepheegvd evvdeljeeugfdtudduhfekledtiefhveejkeejuefhtdeufefhgfehkeetnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorg hhrdgtohhm X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 5 Dec 2023 22:09:24 -0500 (EST) Date: Wed, 6 Dec 2023 12:09:17 +0900 From: Greg KH To: Al Viro Cc: Nick Desaulniers , 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: <2023120650-faucet-palpable-f1a3@gregkh> References: <20231205-libstringheader-v1-1-7f9c573053a7@gmail.com> <20231205213807.GE1674809@ZenIV> <2023120608-ivy-snowdrop-890d@gregkh> <2023120657-henna-spongy-9ef6@gregkh> <20231206005542.GJ1674809@ZenIV> <20231206030047.GL1674809@ZenIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231206030047.GL1674809@ZenIV> 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 pete.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 (pete.vger.email [0.0.0.0]); Tue, 05 Dec 2023 19:09:46 -0800 (PST) On Wed, Dec 06, 2023 at 03:00:47AM +0000, Al Viro wrote: > On Wed, Dec 06, 2023 at 12:55:42AM +0000, Al Viro wrote: > > On Wed, Dec 06, 2023 at 08:46:50AM +0900, Greg KH wrote: > > > > > > > > > > But of course, it doesn't always hold true, there are a few minor > > > > > exceptions, but they are rare. > > > > > > > > $ grep -r \\#include lib | grep asm > > > > > > > > shows quite a few exceptions, and just in lib/. > > > > > > > > For example, lib/math/int_log.c includes asm/bug.h. Is that a case > > > > where lib/math/int_log.c should be #include 'ing linux/bug.h rather > > > > than asm/bug.h? > > > > > > Probably yes, but we don't normally go back and take coding style fixes > > > for old files like this as it doesn't make much sense to do so. > > > > > > But, if you are cleaning up the headers for large portions with the goal > > > of faster builds, that's a good reason. > > > > FWIW, the most common (by far - about 13% of such includes, over drivers/, fs/, > > mm/, net/ and sound/) is asm/unaligned.h. > > Why the hell is unaligned.h in asm/*, anyway? > > We have 3 variants: arc, parisc and generic (== everything else). > Both arc and parisc instances have an explicit include of > asm-generic/unaligned.h (i.e. the generic variant). > > On arc there's also misaligned_fixup() extern or stub, with exactly > one user (in arch/arc/kernel/traps.c). On parisc there are > externs for handle_unaligned() and check_unaligned() (3 call sites, > all in arch/parisc/kernel/traps.c). > > How about we take those into arch/{arc,parisc}/kernel/unaligned.h, > slap #include "unaligned.h" into their traps.c and unaligned.c > (callers and definitions resp.) and strip those from asm/unaligned.h? > At that point we can remove arch/{arc,parisc}/asm/unaligned.h - everything > will pick include/asm-generic/unaligned.h. > > Then the next cycle we ask Linus to run the following: > for i in `git grep -l -w asm/unaligned.h`; do > sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i > done > git mv include/asm-generic/unaligned.h include/linux/unaligned.h > sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild > right before releasing -rc1 and asm/unaligned.h is gone... Please do, it's really annoying and would be great to fix up. thanks, greg k-h