From patchwork Mon Oct 14 12:57:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 13834973 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 5C6DED1625B for ; Mon, 14 Oct 2024 12:57:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E94446B0089; Mon, 14 Oct 2024 08:57:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E44096B008A; Mon, 14 Oct 2024 08:57:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D3C676B008C; Mon, 14 Oct 2024 08:57:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id B1E7A6B0089 for ; Mon, 14 Oct 2024 08:57:15 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id A3E1F1A09F1 for ; Mon, 14 Oct 2024 12:57:01 +0000 (UTC) X-FDA: 82672208136.09.EA6B073 Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) by imf05.hostedemail.com (Postfix) with ESMTP id E011A10000D for ; Mon, 14 Oct 2024 12:57:01 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=D36dIAc6; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf05.hostedemail.com: domain of 3JxUNZwgKCMQk1nl+qs3qyyqvo.mywvsx47-wwu5kmu.y1q@flex--ardb.bounces.google.com designates 209.85.221.74 as permitted sender) smtp.mailfrom=3JxUNZwgKCMQk1nl+qs3qyyqvo.mywvsx47-wwu5kmu.y1q@flex--ardb.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728910587; a=rsa-sha256; cv=none; b=HOlK/rE1M8sRpwx4fegwT86sGGRiAzLweIIttLLZcZeuiiTB+PiGdpS5YQqHZWz69wHHMq dJb2YpBjgQ/nuS1CIWpP1qqVjUYBfe7qEJQrNBamuOmUCLY3i3HIOYOnRdYQo8HjWpJ/6e 7g1nEgJyD1EkgakLXEwgFLNlDdsxcKY= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=D36dIAc6; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf05.hostedemail.com: domain of 3JxUNZwgKCMQk1nl+qs3qyyqvo.mywvsx47-wwu5kmu.y1q@flex--ardb.bounces.google.com designates 209.85.221.74 as permitted sender) smtp.mailfrom=3JxUNZwgKCMQk1nl+qs3qyyqvo.mywvsx47-wwu5kmu.y1q@flex--ardb.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728910587; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/4+Id/JvDOWrciOX+Pt0gw96Ii3oR3apf9+eeU2SPu0=; b=Cu5ACsbglvRCMYRxTh1xDOh9McZB1Q/loG6XpQGzuj2bbWVZLMc4gG3YeUD5PuVTHiL6Vb 6+K7gM+2FPcs/VAAIxerUXczVEfLHQv+jriRbKRgsj8V7EQ+ITXCknUAlEeHLgHDJawnyg aRKmL920B96OlZ9o7Ckv7es6++GA3Ps= Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-37d45de8bbfso2624614f8f.3 for ; Mon, 14 Oct 2024 05:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1728910632; x=1729515432; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=/4+Id/JvDOWrciOX+Pt0gw96Ii3oR3apf9+eeU2SPu0=; b=D36dIAc6sW3iL0KhHKGcD1MvXjtTM1Hp+tsOdGNGlWgOOiuDW5xXLqwEKyjifQQ8sm kjyvHc8K3HihZ9yl9qY+iVg+X97xamiViMpADzliz+tXPo/KO9hhHTEKpqIcpCh2S+bo U+JGd7fhXcQzZwYiWrVpsIUnQwRrRxKS4xsLVuD0q/zZ6TCPONho/RVS7AbXtQ8YciIJ 5kyj5AOwurwdruUo7luVUB9s9TaLtm8fbWhqJYGPF1lcNYspkH4pltA9uLhyHkrMjVpq vgCdFXtRQRA+LhLnUwAtVMHbI33jes+tyLtM5Wzt4juDYtx35YlThBvuxX0YhIeNqwn0 Ydvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728910632; x=1729515432; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/4+Id/JvDOWrciOX+Pt0gw96Ii3oR3apf9+eeU2SPu0=; b=MCB5qGLindEHRNMZ32V8xcFY13ji7IUxcRtS14bjZKmbCn3w7w+czKNqGgtYkGTVXU TMpHpGxMRxvO6opxnghOiLCZFmdZUbeEFuWljkoOMBFEI/fCEP852Tr0s99MwNyg5kvd qd3wO2l8/gS5d0BC4vX3e77GVqvIMXD19kF112UaYle9PdoztsOTgnMcD6ma0t9re1Tp d27GBSML2TG/za7epR9BipPyQql2i9zwVJGIkHD7vzKZI9DUisXfG+FPn0IwFtQPC1KL aFx7EDGxtTSKy0hv7VQRzks5SgQoc7bfNVCJSn3aNO4aI6+MYr0iSiht3yxfetG/RLtQ n+gw== X-Forwarded-Encrypted: i=1; AJvYcCW2enYLU77vXFK8br/XkBnUocJckXEbwSMf7SYQCghH1eCM0pcFE2ccpWmBAc8xZXEfHKKFyHr93Q==@kvack.org X-Gm-Message-State: AOJu0YwzErImuFHMge82stPGQYxyaRJThwz+Ea5zKH8umhRY7HAAbmY6 DVjacd9bTYJ+fWVxnqF48obrpEkEGkzZDj4t2RloCeUbtBH04/FRh0Haeg5jwyyeizbPmA== X-Google-Smtp-Source: AGHT+IGCETarcWcQqRIFRqqHH6KuqwoHb8bPYOCS/I0QvqDwtXW1Y79wZek7+MHKLcfDyEgkZpc9XL2l X-Received: from palermo.c.googlers.com ([fda3:e722:ac3:cc00:7b:198d:ac11:8138]) (user=ardb job=sendgmr) by 2002:a5d:6349:0:b0:37d:496a:af40 with SMTP id ffacd0b85a97d-37d5519e9f7mr14077f8f.1.1728910631360; Mon, 14 Oct 2024 05:57:11 -0700 (PDT) Date: Mon, 14 Oct 2024 14:57:05 +0200 In-Reply-To: <20241014125703.2287936-4-ardb+git@google.com> Mime-Version: 1.0 References: <20241014125703.2287936-4-ardb+git@google.com> X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-Developer-Signature: v=1; a=openpgp-sha256; l=2118; i=ardb@kernel.org; h=from:subject; bh=MtWmIu/XLANHMVww4WyPFLDlQ8/l/C/DRmC5uEQQzio=; b=owGbwMvMwCFmkMcZplerG8N4Wi2JIZ1XVNHwoeS37nPZH8+9jH/hl7bp0+2HPxo3Wze3X9irp 3O/lOVgRykLgxgHg6yYIovA7L/vdp6eKFXrPEsWZg4rE8gQBi5OAZhIpzgjw6WCzw7LSvZtXxIe Jldyg2+rqsRr3031i5gOXjDVZ539rZ+R4Uxopky14DObzLN7jl2QsN2SvWKJyyaVFNYcxV2fhRn P8gEA X-Mailer: git-send-email 2.47.0.rc1.288.g06298d1525-goog Message-ID: <20241014125703.2287936-5-ardb+git@google.com> Subject: [PATCH 1/2] codetag: Use dot prefix for section name From: Ard Biesheuvel To: linux-kernel@vger.kernel.org Cc: Ard Biesheuvel , Linus Torvalds , Masahiro Yamada , Nathan Chancellor , Suren Baghdasaryan , Kent Overstreet , Arnd Bergmann , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kbuild@vger.kernel.org X-Rspam-User: X-Rspamd-Queue-Id: E011A10000D X-Rspamd-Server: rspam01 X-Stat-Signature: cnxdqbws63geu7c3et6ppdkcwweh8uuc X-HE-Tag: 1728910621-351736 X-HE-Meta: U2FsdGVkX1/GxlpMgEGpAAij6LX2zcJ8Knrx4sNQ05CJ+FZi4QM0ggRCH19ItdZ9X8VsXUZ1WHF9LYCZj6lDI1FEUArqNXUP0QSLsXKUR6kM97PmAAADD3266Lv3Lxcbb8NesEnfyrJxRWCLAJlqQssi+Zy4bODWKFq/MO133c4/FkWPDXX8eswIDya5bQ/y09oBdWb1SOPd8RqBCCCuflEYfA6uxuc4XWQT0A960Up5r8KpUl+bOly2E0hFp+Kd3TEuC2wZB1WEepslPPNbSeUy1Gtlmn8ymvZvlXVOqydXxrHuqruLUiyngd39LNXRh13GbKaviJSPgXRX/pgfWQGLuyZrxDZZOVV/c5qT4hLqXwmvsgGKPryZipZnyUv9bElP7km6p1mjaEZ9qciXH30tWVkuPF9lWSyl6UmmXFSjGf8ifksRj/efV6iiJCf/vYm8m3fsA3Oj8Jqmbzv03MITEkuekwx9gMf21P6Y/OC6bZFnJoHKCwbYAPwwy8AUWTFzP1/PVnVcCv5HMVy+rsB4wJNzXvRIkKfs0wa6iOPVC7QhT98qabxpQxo2BC9/3+ps/YoqNPgHZYnmHMncHFVjqdhl4wL0GUURrBq3AV7k00tjVkE1mp+QpBmlg4a6Ph1JDvLeQw7tgNVNqVxnxuw+BajJeafGFPdYsiPNGrCiC57f0C3pDHsJ1aDBvh1oWib9NyPV+s7Izg+TgIvhI7QrKrVT4QwLEPjHlabAn/unH8T94R4YbcVf8yDxSDfaMAIN2exrtp7s73CB3PqENUVHxs/4Gs2iY+sA1dflLBhC6H7+cERXzVY4yZLGnUVPS4yBVqhFcJDb/RnAlLKr4c+tAS9JY68pLFGULQin0IPmX5/d1N7uqR1a4WTrMp6D+mzWBtH+A+3n6Dbr5aC9SKHTrR+L8L97RTTgdVFdVzW2C7NfQPz2EXtpzwJ52xu2umQ1eT+twiLuw2o+cis HL1CGvIr Q5T3H9fIoPB1HDWUm6MmY52RLBuv0t6gifwQlcE4nh4+iOhz1QGs1cEc5WSD7gzFT6R81llaUazyMA9ycKYmgni2cvpSRAm+bc6khnPNiMdpoS/dmQfDMz/NhETxweG4pq4Q1hQS3w/IJps/g/s0skjsclVfI5hZ497NOyg289yMQ+vUGzhT9kgZhXq8262BLS5cu5dg5ZY7LXAg+/iU5iIdzxiJ/95wd5hpagGBnzvX0TImiVBmWJXv5RiKMSsf1PfcbJxiKF+fUSL8r8btKdfSKoicwI1QGdKYr/PS/2Bfy3VVdDJpgjvlt74FhGoh9tALAGRw6VBT0/0Ru1xEk10nXw2jSXKtqnv26z67ic6++K1qIk8lgUruJchzoV4X2UxcG70MXUGXVrmLyGcx4flWHOjFSMEqZbnX78fUWoKgMDty/i06xgA6AZ6hX2aCt5uXgrP+JtQheKQ24XFc6eCYKzzdIfABIu7aAHTR9aL7433XBcJ0pd7l8/jsnVnZsxlovNKwQ20wYM2MIklBYQ5GQ4TdWCQe2qxdS/Yck+pnhqJcs4NjMQE3lHeYqHjGa5Eb4 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000595, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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. 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/codetag.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) \ . = ALIGN(8); \ __start_##_name = .; \ - KEEP(*(_name)) \ + KEEP(*(. ## _name)) \ __stop_##_name = .; #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_alloc_tag); #define DEFINE_ALLOC_TAG(_alloc_tag) \ static struct alloc_tag _alloc_tag __used __aligned(8) \ - __section("alloc_tags") = { \ + __section(".alloc_tags") = { \ .ct = CODE_TAG_INIT, \ .counters = &_shared_alloc_tag }; @@ -85,7 +85,7 @@ DECLARE_PER_CPU(struct alloc_tag_counters, _shared_alloc_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") = { \ + __section(".alloc_tags") = { \ .ct = CODE_TAG_INIT, \ .counters = &_alloc_tag_cntr };