From patchwork Sat Jan 11 05:48:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 13935790 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 3A007E7719A for ; Sat, 11 Jan 2025 05:49:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BC33F8D0002; Sat, 11 Jan 2025 00:49:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B73B78D0001; Sat, 11 Jan 2025 00:49:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A3A448D0002; Sat, 11 Jan 2025 00:49:19 -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 827FD8D0001 for ; Sat, 11 Jan 2025 00:49:19 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3A7FE16110D for ; Sat, 11 Jan 2025 05:49:19 +0000 (UTC) X-FDA: 82994093238.21.6D1AD88 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by imf08.hostedemail.com (Postfix) with ESMTP id 49487160005 for ; Sat, 11 Jan 2025 05:49:17 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=daynix-com.20230601.gappssmtp.com header.s=20230601 header.b=QLXqq4fe; spf=pass (imf08.hostedemail.com: domain of akihiko.odaki@daynix.com designates 209.85.214.169 as permitted sender) smtp.mailfrom=akihiko.odaki@daynix.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736574557; 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=A++05IwU2hH06oTSs8Z3YzeXieKYkS+yTHs+0pIja8opuDsloGaC6aBY2rvTN0wbp/zITR LZLWS5vvBENtEAYFwEaSyhowPHhLcZMbVlbCmVA2dInMuec98XsUynBEMlvCK7vA5bggCB 24WcX3Bo+suH6KjcM6o5Mc/vz/V1KyU= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=daynix-com.20230601.gappssmtp.com header.s=20230601 header.b=QLXqq4fe; spf=pass (imf08.hostedemail.com: domain of akihiko.odaki@daynix.com designates 209.85.214.169 as permitted sender) smtp.mailfrom=akihiko.odaki@daynix.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736574557; a=rsa-sha256; cv=none; b=CibhsTMLcwKjvpKjBuku8zabPqgxz13eCrmrUMIxtRhjZg2J0UuSWZxsla/AJX3TxgPeq4 4MY6/UCElNeUm8tHKkT+iGCBzrAtvw12DfxlqNEtkHLcwU+mJSyA3MWFYboD82ggV+nYyu mN22/tJoD/xTCo1+K3BfVmo7InwCuX4= Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-21631789fcdso49859165ad.1 for ; Fri, 10 Jan 2025 21:49:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1736574556; x=1737179356; 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=QLXqq4feUnLEBxR9h8HZaA8m6NtLDPZ3WMhsFqwW/HNqZrS/pogkFz8bdyqFFykjn8 xQ9KJNyRAen3JUkgd3OVbGzuAY43jl+Gc7zKZsHBfw904+V00mpCaYpvFlA/2I9eQDrC 4DAx4w01tUuuLt/YSumhVidAWAYZa+ttoNaHfYt3JeMm59MTuuzhM3S/v3/7CdF6Vx78 cU4s4KFMSY25oh7DFF30ovJOUlzCGiDbj50ITpVxGe2hdiK5Ux9MqhlHvRUjoo5CcKRj fkQA4OGmkc/5t4upIDLKhtEZ+BxIngQG/mhA4bnuckcKYF7h8O1XkedwSoHxlA8sG8eS Vn8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736574556; x=1737179356; 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=nKcep88REIn1NFrPQViPcQ8nerHM9VkCxJK8FUEyd9NKkKWw6Lz2UcTOjOGSf3RArn n/hRcQtgjOQGEwmcfC0cAVM4IVqyZKRcG5iOpktVs6je8GqXlyWwR6q8pGATSotXeL16 8teobPQ1b50uJq2FaJ2C4qHhFrnW16tKAUQqFEihFm60HzD/NIrVm14bWY3waHDgLjC0 KEfOvXxK6IbWai2WQAlX5VhhKblHLpKunkEOigC1IKIJjo0d1t1nLP742XRAP77l3hsT 1GV/n0zsbtm/xdpDknHEdVXrK25u/JbifCOYfxW8EkfTPhf5QtZLOYbCboga37WJ18g3 /bwQ== X-Gm-Message-State: AOJu0YwYZj/4I2Lz42Loj0BNeZMuQFNOewGwHBRzS8KyE9QRubjsAuaN HAb22Eyf+a3JuG5Hl2Nuxxiz1A9qv/72fzlqj7N/CxooxLAqw8WfwN+PbuJNbIw= X-Gm-Gg: ASbGncsYljq69fvXcksG7jGatmtVUemNZYMv8Qy2I/zzZax2thbcKFFJs554hz5faXA vASGAAXNMD5BMv3osMpU80r24Z6YtFH7jDkE9T8+8nX/Q8sfonVbPfYB2pzPGyGkLZ3pXJRut33 0AKRvhjM8q2MAw5/3WjrN47HNQsXw0vOPxIa28OjJa2dVcUfh0vOtb6KzbveKZdRbi6Uo9COaCk tOaSn8grqrEU5yE4Y3eVzE0fBl2rKtZDktJWQliSZrPFcV22cH7keWiJ1E= X-Google-Smtp-Source: AGHT+IGYDl29OCGY4z1owZDP0XWbhTx09xSMaaJapB97QNqOQhHfEZ2TmztXqViOu57Hf/bAEePhOw== X-Received: by 2002:a05:6a20:841d:b0:1d8:d5c0:ad74 with SMTP id adf61e73a8af0-1e89c89888cmr15576349637.1.1736574556053; Fri, 10 Jan 2025 21:49:16 -0800 (PST) Received: from localhost ([157.82.203.37]) by smtp.gmail.com with UTF8SMTPSA id 41be03b00d2f7-a31de806694sm3683573a12.69.2025.01.10.21.49.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Jan 2025 21:49:15 -0800 (PST) From: Akihiko Odaki Date: Sat, 11 Jan 2025 14:48:46 +0900 Subject: [PATCH v4 3/6] powerpc: Use note name macros MIME-Version: 1.0 Message-Id: <20250111-elf-v4-3-b3841fa0dcd9@daynix.com> References: <20250111-elf-v4-0-b3841fa0dcd9@daynix.com> In-Reply-To: <20250111-elf-v4-0-b3841fa0dcd9@daynix.com> To: Eric Biederman , Kees Cook , Catalin Marinas , Mark Brown , Dave Martin , Baoquan He , Vivek Goyal , Dave Young , LEROY Christophe 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-Rspamd-Queue-Id: 49487160005 X-Stat-Signature: uafgfyzeyohei7511i3sqb3ow49pp1st X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1736574557-402343 X-HE-Meta: U2FsdGVkX1/4ePZ9AZV/5fiJQ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fAySAFkw0//BR1zXxL28m3q4zOSKkXkqFOXTElO4i+AkjbFpHHMV/IVEZ9M8GTEzdmw+6BOXdUvcvHJPX2cjVKCbWY/vboe8eoUhlbmW3vg6vTwrogmz6jVYugVYttD+NgRl5u9lxIY67Kf6AyIaE8TOTgClNLhzN4FIS9bDOjyAJDNrVfUQOflZGMRf4v34QNayt2PjoAZNb+QbinpMba+DrYRwZv11gQ= 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)); }