From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 637F7D18153 for ; Mon, 14 Oct 2024 21:17:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E7BCB6B0083; Mon, 14 Oct 2024 17:17:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E2D136B0088; Mon, 14 Oct 2024 17:17:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D1A4D6B0089; Mon, 14 Oct 2024 17:17:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id B51F46B0083 for ; Mon, 14 Oct 2024 17:17:06 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 2898A1C4D39 for ; Mon, 14 Oct 2024 21:16:57 +0000 (UTC) X-FDA: 82673467842.12.1DAC47C Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) by imf22.hostedemail.com (Postfix) with ESMTP id A3AC9C000B for ; Mon, 14 Oct 2024 21:16:56 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b="TPNM+8T/"; spf=pass (imf22.hostedemail.com: domain of surenb@google.com designates 209.85.160.174 as permitted sender) smtp.mailfrom=surenb@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728940577; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rHb7NtoAh9gjfT6eZG97rGp2AF3tFOHSjIj6ouJz5Jk=; b=GyvJC2xWjsku1B+PJ30XtxgGGc/E8+YD9BAlO1RXBHJen+GZpXQOWnBIJ1vdm9qDoedCDC lDzH/fHWTJROtgsZU9y7tg7LUOjalaeOrCEQ65AyrnyiaGp0gjO/REf3gfwJqVtOeVmeZU ydQYH4cxS9fY/2Xpyr9i9Z2hxum49s8= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b="TPNM+8T/"; spf=pass (imf22.hostedemail.com: domain of surenb@google.com designates 209.85.160.174 as permitted sender) smtp.mailfrom=surenb@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728940577; a=rsa-sha256; cv=none; b=6bzeskK/O8i8ZNTm+LIx/asAgQa1uzKrox8MpW8gc6SxpxwxpDyihVkzUyKuTAtfHpPjGU xc54ckrIIbRnZy+FERh5pmau940oDR86CkT0o6BY9fFS+6VVpUs7wRhPLvE55AxjG75MDT sPms/WgxQD+Qz8KO6r75vASu2IveJGA= Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-4601a471aecso501801cf.1 for ; Mon, 14 Oct 2024 14:17:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1728940623; x=1729545423; darn=kvack.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=rHb7NtoAh9gjfT6eZG97rGp2AF3tFOHSjIj6ouJz5Jk=; b=TPNM+8T/kXSy5oLT3cUDh7vMvita3Pc/76o4cdGrzcmMZEWq4yJE9h0Gxc9JxmmmLd zHxuu9dcf9WlwkNtK9K1LhvhIrRSzmZdZOGhCwqHGRd0Tdk446cxPcEHFZ0vWTrU137e 7+3mnyglToAQjSPRWXwb75rMJyKiZW2l7HJIPKdeVMnZQBf5j3FHlUmD9pp/oPAAJ67B F3777YE+lUuFH1/dwwj4DFgS3NXBQkUl3aAV98zF9yvRy2qJtK34p7uY3lroxQadrY4v 1llaT2QvEB2fsXrOOOwBDx4uG/WSMlZ9+2ZWbY4/MxWYiiEWAnfZWDpA4ZjBWk64Xgw9 +rwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728940623; x=1729545423; 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=rHb7NtoAh9gjfT6eZG97rGp2AF3tFOHSjIj6ouJz5Jk=; b=XWQZXWie71x2qTs2Jk+ROA4fK0BPGyFzUhT31MkeLYBux+4Xg4uj0HiiB/5NkUdr1N v2hxE2DZNjTdjL9Ajkxlf59PVUDBKO8rSU5yUrrTIvc4JcbkVfKVoAxjpQRY8+9NpxV9 nUxZfbC5VX1reXOI2eZdbJizdHlzXI56HKp0YzhsNpGS3gdCYvUXk5i/khglEOnYwsWE twLJqNpw31uKLL77dx7RIg09S9b3mifZG/RANU0HmLp159TrnDL8DihxxJRNfnwwNFNU ieClQBBnD8os/XQ8Qh1Gs0Ph6NG/x2wH/XPmjEaypv1WMiEtWDRtUktLlcQCGuVDcQB2 4qeQ== X-Forwarded-Encrypted: i=1; AJvYcCVaxZMP+DJ4NkfroiWMaWJrok9Wy9NVKGSjv1NcLZnLj2fYZEBC8roSxdh/daGTRFm6BpCSnc34hw==@kvack.org X-Gm-Message-State: AOJu0Yz7xAnNgsB+ED2kV8rb2q+eOy8EwMuGMpm1N+22wj9r7BbdDYcY N0LhLH7YdWcMQ6R4XZZmo7KKFesZmMrAH57LH59yyj1RfleX+VIp5aw4cif7ch4cCxLQx7L2ALO uoZJURypYEmOQhSoUX0aWDqEnz09rTlbFcaMm X-Google-Smtp-Source: AGHT+IG1b7oU0kZLAEWD5hgOJFQGchfVhmH4qbX+aT93IIjRDuRwkmmDWWwjoBxrsP4yYyMAPebwXvZWRqMK+tLF+yE= X-Received: by 2002:a05:622a:7d0b:b0:45e:fea6:a3b1 with SMTP id d75a77b69052e-46059c78199mr5347011cf.19.1728940623190; Mon, 14 Oct 2024 14:17:03 -0700 (PDT) MIME-Version: 1.0 References: <20241014125703.2287936-4-ardb+git@google.com> <20241014125703.2287936-5-ardb+git@google.com> In-Reply-To: <20241014125703.2287936-5-ardb+git@google.com> From: Suren Baghdasaryan Date: Mon, 14 Oct 2024 14:16:52 -0700 Message-ID: Subject: Re: [PATCH 1/2] codetag: Use dot prefix for section name To: Ard Biesheuvel Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel , Linus Torvalds , Masahiro Yamada , Nathan Chancellor , Kent Overstreet , Arnd Bergmann , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kbuild@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-Stat-Signature: zgskkhzw51p3ypbm9jzpgzzc9364a6su X-Rspamd-Queue-Id: A3AC9C000B X-Rspamd-Server: rspam11 X-HE-Tag: 1728940616-981224 X-HE-Meta: U2FsdGVkX1+KGkaCuoyM8LwVtnfyu8xBpaZK5VqzTwnb92MGWy/WMjWT4eoaSf4qqpS2RQYeLZp2AGf4TRYKcAjX76VdhFVd1a+lQBimSsgtzrGJkE2z+e3FLsniVeEz9/s77p3ui2iMdOiM3Hvyhw9XWMzbKnchqTPC9+tmDGpODAA4pu8tzZBV3W18S1F0wWXRBp3JcKXcRJwbeujK1ebpmClKDhKBstRkggkgORYDnbZr0snKMCzaRMPItrp6qVa3Z657YCb0r6ilIMqRNYZ1MB8K2cd+wQiz8l4geLL7pYZlQLRj0m2POUZcj8UjIEM5LIptqI4n+cLD0uvQuil4sZQGkXO4QGlV63IJUtxFwzQScKJTHrIyNdYz0Rp3qpwkswKfGr5GLIFUJVXtxTzQlU/a9DjgTjj88nrgcFjErOIhkl6IbNMDLBmK9cCYXugVrxh1/iITeALmRa9mXMXAlBECMVgXeno4XU+UGauo/MaEs9LxGlkMEuYBfOofOkq4YzNvuEsZ6Epo3/npvvBKlGgxsl6U3VtuhhKv/pSb90gdYhFIDyKeYqCeBazOIM4x+wE23JNexPJw6Eyjs+4CP+JxXfzlrkQLywDkH8pYTWjyF+Z+eWnyfTSOMIzc84yWD7QXBE7uLZJdGzC6KNi3UvDXLWR2MtxGfpMeOVE3De9mb9Ys/PVLVG5ebAroNXxzQSMcpsLIfhDneJcLdGXTTHcJy2DXz2zT1/o4bIs+GQDNU2zpJyEvxZgdA1NAZ2ipFody850zZBYBzd90gRq3voCq+IfJ5MORbZO3DTPEtkv7vpV+2yr7BuNx4fSofvGV+trI64VkvRxu6K+ojMMsZkm8fUS6xuV5falsIuDgk5NhdhhyTar0j30oFT+Uil0n+BjzVgtA6NA/vPiXX6IW5rVPxgXxKYwAXyG+OmyECMIRVLf3Y3R6W7sRfPbeeEvQlNzDHRtt8iaENIy 7vBpYhnP vJ1sLoG6penr0OCKxzgDP+8gx/vx+SZ2KnziXu/1t3wFsjKkAVYZ3nAcxEuA9Y5ayQLnfnfyuTSZAYk6X3YmGKSj/Ljz8IdjOKxF8sh5T99/aO8pHTBfskfYhIlkN9ZHwCfG+0h8AFQmQlJLka+Gpn8ijMeg6+efYT3Tug+2Ji0pNDsnrof2mTr7xcIfioyv11DLndfR8XQeO7r+aAENYy7Y6fTNuxJV1kw8uPX9dzRrFeLm/DuTyTjF0jIbrMDLVtjf8E42ix8kCtLnYwgpFBUyy216Z2UPlBGHEbr9rJ7aKDyv3QmvXhiIxMiAXS36Dq6CNE1tLUj8NEL44QiPeDuW8ccuHVUXgbChchH9msF+5+tc0FV5iTtQCIA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000002, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Mon, Oct 14, 2024 at 5:57=E2=80=AFAM Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > Sections typically use leading dots in their names, and deviating from > this breaks some assumptions in the existing code, e.g., in strip_relocs > on x86, which filters out .rela.* and .rela__* sections. > > [65] alloc_tags PROGBITS 0000000000000000 03a57958 > 0000000000026340 0000000000000000 WA 0 0 8 > [66] .relaalloc_tags RELA 0000000000000000 08dbb868 > 0000000000044c40 0000000000000018 I 280 65 8 > > So use a leading dot for the alloc_tags sections. No issues with renaming the section but please note that I posted a patch [1] today that will have conflicts with this renaming. [1] https://lore.kernel.org/all/20241014203646.1952505-3-surenb@google.com/ > > Signed-off-by: Ard Biesheuvel > --- > include/asm-generic/codetag.lds.h | 2 +- > include/linux/alloc_tag.h | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/include/asm-generic/codetag.lds.h b/include/asm-generic/code= tag.lds.h > index 64f536b80380..dcd18351ba2f 100644 > --- a/include/asm-generic/codetag.lds.h > +++ b/include/asm-generic/codetag.lds.h > @@ -5,7 +5,7 @@ > #define SECTION_WITH_BOUNDARIES(_name) \ > . =3D ALIGN(8); \ > __start_##_name =3D .; \ > - KEEP(*(_name)) \ > + KEEP(*(. ## _name)) \ > __stop_##_name =3D .; I think leaving the SECTION_WITH_BOUNDARIES() definition as is and changing its users to pass the name with the dot would be more explicit and more flexible. The only user today is CODETAG_SECTIONS() at [2], so I would add the dot in there instead. [2] https://elixir.bootlin.com/linux/v6.12-rc2/source/include/asm-generic/c= odetag.lds.h#L12 Thanks, Suren. > > #define CODETAG_SECTIONS() \ > diff --git a/include/linux/alloc_tag.h b/include/linux/alloc_tag.h > index 1f0a9ff23a2c..d45a8a582970 100644 > --- a/include/linux/alloc_tag.h > +++ b/include/linux/alloc_tag.h > @@ -76,7 +76,7 @@ DECLARE_PER_CPU(struct alloc_tag_counters, _shared_allo= c_tag); > > #define DEFINE_ALLOC_TAG(_alloc_tag) = \ > static struct alloc_tag _alloc_tag __used __aligned(8) = \ > - __section("alloc_tags") =3D { = \ > + __section(".alloc_tags") =3D { = \ > .ct =3D CODE_TAG_INIT, = \ > .counters =3D &_shared_alloc_tag }; > > @@ -85,7 +85,7 @@ DECLARE_PER_CPU(struct alloc_tag_counters, _shared_allo= c_tag); > #define DEFINE_ALLOC_TAG(_alloc_tag) = \ > static DEFINE_PER_CPU(struct alloc_tag_counters, _alloc_tag_cntr)= ; \ > static struct alloc_tag _alloc_tag __used __aligned(8) = \ > - __section("alloc_tags") =3D { = \ > + __section(".alloc_tags") =3D { = \ > .ct =3D CODE_TAG_INIT, = \ > .counters =3D &_alloc_tag_cntr }; > > -- > 2.47.0.rc1.288.g06298d1525-goog >