Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp588828rdb; Tue, 5 Dec 2023 13:58:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8SItpSOehUlb4sN6IwIQd4VpZYrGL5kr1ZCw8pQtupW6V6qXOXlinmlo+JkNMlLJ+3z0Z X-Received: by 2002:a05:6a20:5492:b0:18f:97c:975f with SMTP id i18-20020a056a20549200b0018f097c975fmr8356002pzk.71.1701813494025; Tue, 05 Dec 2023 13:58:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701813494; cv=none; d=google.com; s=arc-20160816; b=bU+uylJFlNItU6/BvT5/z/NokU/bpeAJL6k+m/gwHur1AC7UqorGybkeF/yU+1PT+h lLw83e7jr8/CEpfSPL7gV+p3CaUoq3695zNsNvPHHNFqbV3hF8m9dHaYqJ5BrE63xanU 7fNKzS8N/+4B47+9ASLjq1V5PVbIVMQ+QlQX54d1Kb9t2dfQwKYOL7NBs1jmAsBywtAn 64EzU5UzLo7Lym3ObDw959GWqAtUYch7bdjzgiVx7/xyjhNUMybcRybRzwRtHkMTz6iW 8gp7kEMelK3VpYjHgYo+hdksEhRenTbmYMXtAReKazFnClLeVp+KYEbhFO6vzorOUDws Rziw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=FWmm3+4G7HJVcv2X2DUaAz47s+8+x8VIlkxgLxuapbQ=; fh=geO5A8CxBXQ7l2FyQx2tUIkzQ61kgsJ5pfLh6qnJ08k=; b=m9XhzoQq+kG8e2YlznXGdqY/me5MqFleOuXaLZ8xOwQ6etjfiB+wzXvPcPvcYjaC1a HLqb9Y9nITHQFcGKXKGzspGWhCAjDaerBa1ovZKmLxq247XJaO61/voxz08pfo++Ro04 BT2zNX+1v8IXvcPqJhp+aMsiACsb//o7b+hXUeghSKKbg03bIDSf7qE9pjUr5vIz8zbG rXqjsaaqjv62k90r4UiMTApO9hwKedymq75fPfoakQcGL55+Luj/fA7yNMsA+XsfZLPT v6zQ/YHX+mzi0s8ySBWbyMc7zZMqrLCP0nXOPbipX/rafMCosQcyLV5XIX8y+VgamchC cWMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="QWkKs/Uz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id 130-20020a630088000000b005b8ddb9c305si9877653pga.30.2023.12.05.13.58.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 13:58:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="QWkKs/Uz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 8AB76803215A; Tue, 5 Dec 2023 13:58:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346326AbjLEV5q (ORCPT + 99 others); Tue, 5 Dec 2023 16:57:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232285AbjLEV5p (ORCPT ); Tue, 5 Dec 2023 16:57:45 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F46C1B9 for ; Tue, 5 Dec 2023 13:57:51 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3332fc9b9b2so127372f8f.1 for ; Tue, 05 Dec 2023 13:57:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701813469; x=1702418269; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=FWmm3+4G7HJVcv2X2DUaAz47s+8+x8VIlkxgLxuapbQ=; b=QWkKs/UzIBRNkw4Ky1WwfXO6UppOzSgt5dWDbFssSLEb+cD18Hr1joGQDvomUy3CLd xuj40M6g0rxXufQ01ptoLcUdgHr4FPj+88b6HxhfZN0qNwLyKOk/7LQygMGTAJi/TFw3 q8Gp2uEv+H2cVaQ52jPXAi6mE0ouOAafE0tIHD8zlsBfvKM0R6Dp1yxCyXy90J19ylde 3Rw1olXX6F4ebOvfwSoDizeYBqyINu77y3VOqidWoJF4DfYskpSKdLvwehg+bxmFLRK5 7YGN0VtbfFraYGyvDXjdQ8ikpborRF5nK6M4t1+gYDKDG4tjxHEOL1PvpYsoH2Y8faiE PIJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701813469; x=1702418269; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FWmm3+4G7HJVcv2X2DUaAz47s+8+x8VIlkxgLxuapbQ=; b=Dmb2HDf4gYLATIeBNryhduBxA/wB1U+gZh9kOrh+1k5u9ZK9GxeIdPnse/UFQK8bLw t4+Kc04vla+LdcLPIbJY9l9zzSSxLCVut+AhMeicwIiPM59QkOYKGVKTncNOMdIaSuL8 1NWCvU7jwePOPW6xkQc8bW/c357hAFKlEBcAdH81zZpOcRpd4xsccLBW3JjmHgqOzZT9 UIM0HUYerEQSo/pAn09GOXP9M6kOgZrKwgxNuGVCmfew/c7ckHR+Xk4sdShvVebNynai cmf+NbHT4gh2N/b4znGt6ESaE9GWdk0cl7z5PC3er84C4g8kKx08np6y2Cmzny1ag4/B QlGQ== X-Gm-Message-State: AOJu0YwxqwsFUNlRAwkFzJU9vgGCf07/+YOvg1O8wx6nh9FxAx7IlMH3 v5aEp/YpcqI2pmgygRQMI4qEqanmE2mi++JlPZNACg== X-Received: by 2002:a5d:5949:0:b0:333:3cb9:8a54 with SMTP id e9-20020a5d5949000000b003333cb98a54mr1638687wri.189.1701813469476; Tue, 05 Dec 2023 13:57:49 -0800 (PST) MIME-Version: 1.0 References: <20231205-libstringheader-v1-1-7f9c573053a7@gmail.com> <20231205130449.8e330a26ecbed1f7b5ad5d7a@linux-foundation.org> <20231205132452.418722bea8f6878dca88142a@linux-foundation.org> <20231205214359.GF1674809@ZenIV> In-Reply-To: <20231205214359.GF1674809@ZenIV> From: Nick Desaulniers Date: Tue, 5 Dec 2023 13:57:38 -0800 Message-ID: Subject: Re: [PATCH] lib/string: shrink lib/string.i via IWYU To: Al Viro Cc: Andrew Morton , tanzirh@google.com, Kees Cook , Andy Shevchenko , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Nick DeSaulniers , llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 05 Dec 2023 13:58:11 -0800 (PST) On Tue, Dec 5, 2023 at 1:44=E2=80=AFPM Al Viro wr= ote: > > On Tue, Dec 05, 2023 at 01:39:47PM -0800, Nick Desaulniers wrote: > > > The tooling Tanzir is working on does wrap IWYU, and does support such > > mapping (of 'low level' to 'high level' headers; more so, if it > > recommends X you can override to suggest Y instead). > > > > arch/nios/ also doesn't provide a bug.h, which this patch is > > suggesting we include directly. I guess the same goes for > > asm/rwonce.h. > > See include/asm-generic/Kbuild: > mandatory-y +=3D bug.h > ... > mandatory-y +=3D rwonce.h > > IOW, sh will have asm/bug.h and as/rwonce.h copied from asm-generic. Ah, right, Ard had mentioned this file to me once. And mandatory-y is documented in Documentation/kbuild/makefiles.rst. Ok, so we can use include/asm-generic/Kbuild to know that if the .h files listed there are recommended to include as asm/*.h, then we should replace that recommendation with linux/*.h. Our tooling has something where we can automate that. > > Still, includes of asm/*.h had been a massive headache historically > and breeding more of those shouldn't be overdone. > > More painful problem is arch- and config-dependent stuff, though... --=20 Thanks, ~Nick Desaulniers