Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp198449rdb; Tue, 19 Dec 2023 13:48:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IE9jwMX6T/JYczeOyQJH54qmR4was9a+ie+znO5YGP12MjV6hXqPW39M4FUtP2dtrZagvuQ X-Received: by 2002:a05:6808:23ce:b0:3b8:918f:4869 with SMTP id bq14-20020a05680823ce00b003b8918f4869mr22818265oib.59.1703022519933; Tue, 19 Dec 2023 13:48:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703022519; cv=none; d=google.com; s=arc-20160816; b=aMn//Tp5Xsbgcf++xr0eil0AqJNEAjEs1inQGO3lNd5YqnDYprpx6jD9CXERT/fC+G 3UVuqBfNzV5KQMhjA8BmVouV8E/bYyku2vm5g9C7VtXP/MgJGo5vY+yK0INGYJakVOx2 sJrbRUSd5IP7X4CqKShTzXSw7Nro9pZ/zrl+T1yXpT+kjtcZYUv86zMkz/lKk+Zta2TD 96arK0N0tVVitofEhSjMbO8A1BTX73xS2WFuUchzUrLCmsogU+ulwUy7VwoKRaXLRtP2 8/mOxLDO7Ukcc1yJyuk0mM4Fw6YlEqBbDXB3bztjkQ5oMRenAvUKe3zY6R7QATb6xSVx PbHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=r1JR2619YMG5mo1u6s9CGtT+m7a20YcNHq4R9VhkzMY=; fh=3VOwsAxfvKNzz7rYdAID1mV8uRg3QE37/siS3yS05do=; b=HtZQmdKOCKot4z66vu1KpsHcvtw8FAt2/GaD6B9mXMxJ4pvkPfDOjLFcObQN7ZsJVL y/KYq9tJ4NLtpHHDwfgd+Qym2kebkcZkaFN12bNZHYIPnteP4syA0lhyhzITNd76LPp3 7yvmkZ5JpGm5AnLXWlDuZrrXtETJJvVKjIm4BeNWzmpHwfO7iGRMAj+Zyc1biT0qtNuP nYTgC1bis5Dijv+gqXhJ2BYZlaXwqIu+Tt5L36+2lStErRvbovox0YY7SGcbBqCmkiUu /Fnhq5OF47Yh1rI+Kz3waoxLTLhkJ6qpS5sL57qzPY0My8fwO2A/5I+zJxlLkPgPcxCM JaHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ixkhdDCP; spf=pass (google.com: domain of linux-kernel+bounces-5985-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5985-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id h8-20020a0cf408000000b0067a29d9f1besi1133680qvl.132.2023.12.19.13.48.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 13:48:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5985-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=@gmail.com header.s=20230601 header.b=ixkhdDCP; spf=pass (google.com: domain of linux-kernel+bounces-5985-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5985-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 460231C23EF3 for ; Tue, 19 Dec 2023 21:48:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6CD93C48B; Tue, 19 Dec 2023 21:48:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ixkhdDCP" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (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 9EBAF3B194; Tue, 19 Dec 2023 21:48:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-67ee17ab697so39276186d6.0; Tue, 19 Dec 2023 13:48:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703022498; x=1703627298; 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=r1JR2619YMG5mo1u6s9CGtT+m7a20YcNHq4R9VhkzMY=; b=ixkhdDCP4RnxpzsQK2x09S32X3/9FaX5/m88WERcvoWDEiWgc/432tr+iVV6mI5zpT AyuoT0NwPsZMrpbEz0M+FYhToRKOrtzFyjAc5zrfjiP5qh0KVRi+v+QQis8Uov1wZuA3 VlcPIakQZrmOt4uWACxq5AIbKZjFMsHreCWVvVmV3TVnDA+2xjBMFJb/bKOyKJN33mhY 2+BFvoBRwZDht89RRXaZjeiW9SIb9EZNQMOgpvxYU4/0SIrzUAJlAOw3Y2kI/dvsZXX9 gVF1e3SDeaZV60mw8GvqJW8z4USMos/79ESotR9C3iyzVLm+aVlr6zQ7dCz9T50ET+lZ 7Zvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703022498; x=1703627298; 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=r1JR2619YMG5mo1u6s9CGtT+m7a20YcNHq4R9VhkzMY=; b=Ft0YLNtQu3hg8EInzFG4u2oe6uW57fKarB6RcmaxdoO2EY/RNKxn4g4FhdSm9xsxbB y9mNP9oXnE43kWML86Um9FLQ3dxOFpQmknI/ys8b3kCdyzS/uh+mRWcG7MUvNUeVcVTn oCWw3yibK2LaxlBAUJex6Z8ealFA4GoY2oQuqtPOnjzKLck3tGn3l2pM7IKmyT4HBGy/ ef5SDKzWXZmfxWYWnL5DQuhRHEkf8fsGxe+1yq2VzHHTG9Bpv58MGTS0dk9LAN6d9Zy6 TZgcE9ZpSR3e6SbvewqSm4Ia18l3KbUeg6rX0TB6fIXncHU8sfNQCkKsXjbW2fOYg6MN wEnw== X-Gm-Message-State: AOJu0YzWaBYmrxxFt7Cjlf5AOvROGpbbZBrEr6J/8c/6QjlLJLlD1PMb TevJD1X9pcUUojxNKYX+eM6JKglHvN705l3GIP4= X-Received: by 2002:a05:6214:1c09:b0:67f:30ad:26c0 with SMTP id u9-20020a0562141c0900b0067f30ad26c0mr7483675qvc.55.1703022498521; Tue, 19 Dec 2023 13:48:18 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231219-libstringheader-v4-0-aaeb26495d2f@google.com> <20231219-libstringheader-v4-1-aaeb26495d2f@google.com> In-Reply-To: <20231219-libstringheader-v4-1-aaeb26495d2f@google.com> From: Andy Shevchenko Date: Tue, 19 Dec 2023 23:47:42 +0200 Message-ID: Subject: Re: [PATCH v4 1/2] kernel.h: removed REPEAT_BYTE from kernel.h To: Tanzir Hasan Cc: Kees Cook , Nick DeSaulniers , Andy Shevchenko , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Morton , llvm@lists.linux.dev, Al Viro Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Dec 19, 2023 at 8:10=E2=80=AFPM Tanzir Hasan w= rote: > > This patch creates wordpart.h and includes it in asm/word-at-a-time.h > for the all architectures. WORD_AT_A_TIME_CONSTANTS depends on kernel.h for all ("all" doesn't go with article) > because of REPEAT_BYTE. Moving this to another header and including it > where necessary allows us to not include the bloated kernel.h. Making > this implicit dependency on REPEAT_BYTE explicit allows for later > improvements in the lib/string.c inclusion list. ... > --- a/arch/arm/include/asm/word-at-a-time.h > +++ b/arch/arm/include/asm/word-at-a-time.h > -#include > +#include No, please, read what I told you carefully. ... > --- a/arch/x86/include/asm/word-at-a-time.h > +++ b/arch/x86/include/asm/word-at-a-time.h > @@ -3,6 +3,7 @@ > #define _ASM_WORD_AT_A_TIME_H > > #include No, the macros used in this file doesn't require (after your patch) the kernel.h, these are in particular in asm/asm.h and asm/extable_fixup_types.h. I haven't looked at this closely to find a common header that kinda guarantees those two to be included. Otherwise we can use them directly. > +#include ... > #include > #include > -#include > +#include Try to keep it more or less ordered. At list with given context it goes either after the slab.h or below (after those starting with 'f'). > #include > #include > #include ... > --- a/include/asm-generic/word-at-a-time.h > +++ b/include/asm-generic/word-at-a-time.h > @@ -2,7 +2,7 @@ > #ifndef _ASM_WORD_AT_A_TIME_H > #define _ASM_WORD_AT_A_TIME_H > > -#include > +#include > #include Same as in the above remark, read what I said in the previous round of revi= ews. --=20 With Best Regards, Andy Shevchenko