From patchwork Tue Jan 7 12:45:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 13928842 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 95E2EE77197 for ; Tue, 7 Jan 2025 12:48:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 288B76B00B3; Tue, 7 Jan 2025 07:48:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 239976B00BF; Tue, 7 Jan 2025 07:48:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 08B386B00C0; Tue, 7 Jan 2025 07:48:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id DC11B6B00B3 for ; Tue, 7 Jan 2025 07:48:15 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 998CCAF2F0 for ; Tue, 7 Jan 2025 12:48:15 +0000 (UTC) X-FDA: 82980633750.03.92DCD92 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by imf15.hostedemail.com (Postfix) with ESMTP id B54EEA000D for ; Tue, 7 Jan 2025 12:48:13 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=daynix-com.20230601.gappssmtp.com header.s=20230601 header.b=OCj9yLAG; dmarc=none; spf=pass (imf15.hostedemail.com: domain of akihiko.odaki@daynix.com designates 209.85.216.53 as permitted sender) smtp.mailfrom=akihiko.odaki@daynix.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736254093; 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=NDoGkIZOBZADHox4rebBhOBkiub95NT2vaNCAf0u1/w=; b=LcqKm5ADv2IBMbLPOMptZRJeOXrUYT1sln0PzAYNZP6ztPukfBMEKRGXE8zWPT3waTsRmE wDglKJJ9rGY8govmv74HVUeR134I9U/zIGyzWdnOS42m/AJ1kpLpftTn0p3Iqx0yEzqOT7 YhkyUcahgNpTL37sygdhQRJM5Uavfl4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736254093; a=rsa-sha256; cv=none; b=Hokc4CH/NiL/7pumxp4y9cQMasz2Suekd2/9wcZRcxMtDVLENCs04oc8gM31XeEgPVUA0u TjHRLAntIGfx+GW6UNVOepr48c7cCtOxVcqVxy6yma3JTwZ/yxeB2k49yEyH38bjeWPgKS /E+xocVq6ipVJCBjId2Xh+QO/je4QMI= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=daynix-com.20230601.gappssmtp.com header.s=20230601 header.b=OCj9yLAG; dmarc=none; spf=pass (imf15.hostedemail.com: domain of akihiko.odaki@daynix.com designates 209.85.216.53 as permitted sender) smtp.mailfrom=akihiko.odaki@daynix.com Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-2f43d17b0e3so23006709a91.0 for ; Tue, 07 Jan 2025 04:48:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1736254092; x=1736858892; darn=kvack.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=NDoGkIZOBZADHox4rebBhOBkiub95NT2vaNCAf0u1/w=; b=OCj9yLAGUKmfc+dr0Ls7zKSon00cQkNykdPGEwXay0gSvRQQnONafKxvYyOWpbj0bK BqFMU39iSIMm3HiIpCvTzMaeSvqkEj94OscPhOeovfIgI5JkNbbEGpIdJnPdJ6Ei2Dje r26f29lhEIOR3VN+0He9SJImigv3zETjfgjd6bplBCkKFXrWjQwNWEhP0J0WliZ+aNVK w0cEAJ2/25h+pBm46PhwsScxLt3cVk+kZAB0spYyyJvh+O+LCiJKZJESLe0zjmKwX5dR B50kJcbV1U5oeumYB2NEky6wBm1PmoqhOEJniQHTZGzlHiMc4HH5Ac4uzPYvglTSB+T3 rTYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736254092; x=1736858892; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NDoGkIZOBZADHox4rebBhOBkiub95NT2vaNCAf0u1/w=; b=JCxZI0B+VUoX68P0a1I6Hx20ee4nNGUpBVvBzZXg8Tsv7FaFpCNH13cQNkbbSyuwWE HD8vYtZ58X2plwVm0S/6JWa/DV+z793WgQg4bsH3F85F+JBg03xxt55FXPc3DscZg5Qj FtXMtyuXc5v5dZG9oYqPW13Fon0QK4wWv/N/seqgCdSGM5SFOf0Zw/EzX0d3uaYBQieO IJ3sNK5LrpZlT5jbsuzvG+mJ4IF8PIvPU6/TpGFMRXmrb+gvzLQBrKYN4nbVcTsEkMu2 +few1nbNrMQTaLuc/RlHZCb43qp65J59rPhMh1ukPCF5WTI73LqqgY9SMWPJdcwLypRA oP+Q== X-Gm-Message-State: AOJu0YzBPZ8Q1Yw7dWGkFE3F4jgPTCYEe+GjupiO4NR6qZdMvgusbmUX SSCVGl9GhulSshJZnrZgO8pOqNPIhnFQ0yyn/w/EX+1xJiDPV6R4czYYVjhzD2vKkeQhnj2TfWg i X-Gm-Gg: ASbGnctbZrvXT/LjXJrvnH6GPg5BeHdaiK4c4d5kfbNGdEsFM4t1o9k1loUdjIwZ85S +wPFEAmb4dikafrTdVkk/5XBlXGH+Y8L+cB6yKYQN3neQ6u7AbHVQsFDAs2ctuEkpBeOMN0oE4t dY3az7gduG2mHNr4W3N3BTcdPY2cdIdIm4s5DbPC9/LE6oOXJUCbrLJ1+sW/GQYCoy5FGhlip7o b6Hf9jqwOh+dWsoy4SpbydoACg41mXT7Jg3TONEFk9nIEkXAZ5NtsnJko0= X-Google-Smtp-Source: AGHT+IEVKBP005EvKmW5Tl+CNM3WgQ4gF7V3wiTUcNw/Hf4GbFW1YRz6KtZiTE3d5Nc2ByQmLcCTzA== X-Received: by 2002:a05:6a00:240d:b0:71e:6b8:2f4a with SMTP id d2e1a72fcca58-72abde04f6fmr85408908b3a.12.1736254092437; Tue, 07 Jan 2025 04:48:12 -0800 (PST) Received: from localhost ([157.82.203.37]) by smtp.gmail.com with UTF8SMTPSA id d2e1a72fcca58-72aad90c133sm34268685b3a.183.2025.01.07.04.48.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Jan 2025 04:48:12 -0800 (PST) From: Akihiko Odaki Date: Tue, 07 Jan 2025 21:45:54 +0900 Subject: [PATCH v3 3/6] powwerpc: Use note name macros MIME-Version: 1.0 Message-Id: <20250107-elf-v3-3-99cb505b1ab2@daynix.com> References: <20250107-elf-v3-0-99cb505b1ab2@daynix.com> In-Reply-To: <20250107-elf-v3-0-99cb505b1ab2@daynix.com> To: Eric Biederman , Kees Cook , Catalin Marinas , Mark Brown , Dave Martin , Baoquan He , Vivek Goyal , Dave Young Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, kexec@lists.infradead.org, binutils@sourceware.org, devel@daynix.com, Akihiko Odaki X-Mailer: b4 0.14-dev-fd6e3 X-Stat-Signature: 7jxk9aisn3r3ereje1aacjkbga61xjqq X-Rspamd-Queue-Id: B54EEA000D X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1736254093-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3lAaitH2Cpa0tK1bBUO6TSdJt+j/U4dnb5EdwhUw05oLRdjlBO7zJaXhlqAKl7p+9HGoW00htiOMpH16neDfxzSCVSw2H4HKOKQ+HzpMIXJOp5NEyfarzOnFMM+hcKaiXrUbBLYA4pP5bA+Ovq2paLS9RpglhncOkZdgAL7UCHP6Yntk0abfjLgwYWi3KRkOb7bqVl/Q5EYT8D7O5XOk6guSIJCR4vJrhnKR/bApOV1VRKyzFPHGGqx93zMe3MMIXVeyJcJL3QQeHYNXkyINV3Z4FGB1yE= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Use note name macros to match with the userspace's expectation. Acked-by: Baoquan He Signed-off-by: Akihiko Odaki --- arch/powerpc/kernel/fadump.c | 2 +- arch/powerpc/platforms/powernv/opal-core.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index 4b371c738213..d44349fe8e2b 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c @@ -751,7 +751,7 @@ u32 *__init fadump_regs_to_elf_notes(u32 *buf, struct pt_regs *regs) * prstatus.pr_pid = ???? */ elf_core_copy_regs(&prstatus.pr_reg, regs); - buf = append_elf_note(buf, CRASH_CORE_NOTE_NAME, NT_PRSTATUS, + buf = append_elf_note(buf, NN_PRSTATUS, NT_PRSTATUS, &prstatus, sizeof(prstatus)); return buf; } diff --git a/arch/powerpc/platforms/powernv/opal-core.c b/arch/powerpc/platforms/powernv/opal-core.c index c9a9b759cc92..a379ff86c120 100644 --- a/arch/powerpc/platforms/powernv/opal-core.c +++ b/arch/powerpc/platforms/powernv/opal-core.c @@ -149,7 +149,7 @@ static Elf64_Word *__init auxv_to_elf64_notes(Elf64_Word *buf, /* end of vector */ bufp[idx++] = cpu_to_be64(AT_NULL); - buf = append_elf64_note(buf, CRASH_CORE_NOTE_NAME, NT_AUXV, + buf = append_elf64_note(buf, NN_AUXV, NT_AUXV, oc_conf->auxv_buf, AUXV_DESC_SZ); return buf; } @@ -252,7 +252,7 @@ static Elf64_Word * __init opalcore_append_cpu_notes(Elf64_Word *buf) * crashing CPU's prstatus. */ first_cpu_note = buf; - buf = append_elf64_note(buf, CRASH_CORE_NOTE_NAME, NT_PRSTATUS, + buf = append_elf64_note(buf, NN_PRSTATUS, NT_PRSTATUS, &prstatus, sizeof(prstatus)); for (i = 0; i < oc_conf->num_cpus; i++, bufp += size_per_thread) { @@ -279,7 +279,7 @@ static Elf64_Word * __init opalcore_append_cpu_notes(Elf64_Word *buf) fill_prstatus(&prstatus, thread_pir, ®s); if (thread_pir != oc_conf->crashing_cpu) { - buf = append_elf64_note(buf, CRASH_CORE_NOTE_NAME, + buf = append_elf64_note(buf, NN_PRSTATUS, NT_PRSTATUS, &prstatus, sizeof(prstatus)); } else { @@ -287,7 +287,7 @@ static Elf64_Word * __init opalcore_append_cpu_notes(Elf64_Word *buf) * Add crashing CPU as the first NT_PRSTATUS note for * GDB to process the core file appropriately. */ - append_elf64_note(first_cpu_note, CRASH_CORE_NOTE_NAME, + append_elf64_note(first_cpu_note, NN_PRSTATUS, NT_PRSTATUS, &prstatus, sizeof(prstatus)); }